Daily Creative Coding

元「30 min. Processing」。毎日、Creative Codingします。

2016-09-01から1ヶ月間の記事一覧

横線のラベル貼り

/** * transverse line labeling * * @author aa_debdeb * @date 2016/09/30 */ void setup(){ size(640, 640); frameRate(5); background(255); noStroke(); } void draw(){ translate(random(width), random(height)); rotate(random(TWO_PI)); float len …

カラフル・タワー

/** * colorful towers * * @author aa_debdeb * @date 2016/09/29 */ float rectSize = 20; float hue; float h; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); background(0, 0, 100); stroke(0, 0, 0); strokeWeight(1); h = 50; } void…

邪悪な目

/** * evil eye * * @author aa_debdeb * @date 2016/09/28 */ int ringNum = 20; void setup(){ size(640, 640); noFill(); stroke(20); } void draw(){ background(230); translate(width / 2, height / 2); rotate(-HALF_PI); for(int ri = 1; ri <= ring…

円環状の全結合ネットワーク

/** * fully connected circular network * * @author aa_debdeb * @date 2016/09/27 */ void setup(){ size(640, 640); } void draw(){ background(230); translate(width / 2, height / 2); float alpha = map(mouseY, 0, height, 0, 255); stroke(20, alp…

揺れる重なった正方形

/** * waving multi-layered squares * * @author aa_debdeb * @date 2016/09/26 */ void setup(){ size(500, 500); rectMode(CENTER); fill(30); stroke(220); } void draw(){ background(220); translate(width / 2, height / 2); for(int i = 0; i <= 40;…

伸び縮みする腕

/** * expanding and contracting arms * * @author aa_debdeb * @date 2016/09/25 */ ArrayList<Float> radiouses; ArrayList<Float> angles; void setup(){ size(640, 640); stroke(230); strokeWeight(2); setCircles(); } void setCircles(){ radiouses = new ArrayList<Float></float></float></float>…

多層の正方形

/** * multi-layered squares * * @author aa_debdeb * @date 2016/09/24 */ int num = 40; void setup(){ size(500, 500); rectMode(CENTER); strokeWeight(1); } void draw(){ background(240); for(int i = 0; i <= num; i++){ stroke(240); fill(30); fl…

線のジャングル

/** * abstract jungle * * @author aa_debdeb * @date 2016/09/23 */ PVector loc; PVector vel; float theta; float len; int lineStep; color c; void setup(){ size(500, 500); background(143, 188, 143); strokeWeight(2); setMover(); } void mousePr…

ネオンライト

/** * neon lights * * @author aa_debdeb * @date 2016/09/22 */ ArrayList<Node> nodes; ArrayList<Edge> edges; color c; void setup(){ size(640, 640); mousePressed(); } void mousePressed(){ nodes = new ArrayList<Node>(); float r = 200; float angStep = TWO_PI / </node></edge></node>…

火星の地表

/** * terrain of Mars * * @author aa_debdeb * @date 2016/09/21 */ int cellNum = 500; float cellSize = 1; float nScale = 0.03; float threshold = 0.015; PVector position; void setup(){ size(500, 500); noStroke(); position = new PVector(0, 0)…

マウスクリックに反応して移動する円

/** * rotating circles * * @author aa_debdeb * @date 2016/09/20 */ float r = 200; int num = 20; ArrayList<Particle> particles; boolean isMoving; int startTime, endTime; void setup(){ size(640, 640); particles = new ArrayList<Particle>(); float angStep = TWO_P</particle></particle>…

惑星の地形

/** * terrain of planet * * @author aa_debdeb * @date 2016/09/19 */ int cellNum = 250; float cellSize = 2; float nScale = 0.03; float threshold = 0.015; PVector position; void setup(){ size(500, 500); noStroke(); position = new PVector(0, …

パーティクルの花

/** * flower of particles * * @author aa_debdeb * @date 2016/09/18 */ ArrayList<Particle> particles; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); particles = new ArrayList<Particle>(); for(int i = 0; i < 50; i++){ particles.add(new Particle())</particle></particle>…

変形する四角形

/** * morphing quad * * @author aa_debdeb * @date 2016/09/17 */ float radious = 150; Particle[] particles; color c1, c2; void setup(){ size(640, 640); noStroke(); particles = new Particle[4]; for(int i = 0; i < 4; i++){ particles[i] = new …

/** * eddy * * @author aa_debdeb * @date 2016/09/16 */ float dir; ArrayList<Particle> particles; void setup(){ size(640, 480); colorMode(HSB, 360, 100, 100); mousePressed(); } void mousePressed(){ background(random(360), random(30), random(100)); st</particle>…

重なる正方形

/** * overlayed squares * * @author aa_debdeb * @date 2016/09/15 */ ArrayList<Square> squares; void setup(){ size(500, 500); strokeWeight(5); colorMode(HSB, 360, 100, 100); mousePressed(); } void mousePressed(){ squares = new ArrayList<Square>(); for(int </square></square>…

拡大するキューブ群2

3D

/** * enlarging crowd of cubes 2 * * @author aa_debdeb * @date 2016/09/14 */ int BOX_NUM = 25; float BOX_SIZE = 20; int[][][] states; int[][][] neighbors; int[][] moves = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {-1, 0, 0}, {0, -1, 0}, {0, 0, -1}…

拡大するキューブ群

3D

/** * enlarging crowd of cubes * * @author aa_debdeb * @date 2016/09/13 */ int BOX_NUM = 50; float BOX_SIZE = 10; int[][][] states; int[][][] neighbors; int[][] moves = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {-1, 0, 0}, {0, -1, 0}, {0, 0, -1}};…

スピンする立方体

3D

/** * spinning cubes * * @author aa_debdeb * @date 2016/09/12 */ ArrayList<Box> boxes = new ArrayList<Box>(); void setup(){ size(640, 640, P3D); noStroke(); boxes = new ArrayList<Box>(); while(boxes.size() < 50){ PVector loc = new PVector(random(width), </box></box></box>…

奥行きのある二次元

/** * 2D with depth * * @author aa_debdeb * @date 2016/09/11 */ float MAX_DEPTH = 10000; float BOTTOM_WIDTH = 5; ArrayList<Circle> circles; void setup(){ size(500, 500); circles = new ArrayList<Circle>(); } void draw(){ background(255, 255, 240); translat</circle></circle>…

円同士の衝突と反射

/** * collision of circles * * @author aa_debdeb * @date 2016/09/10 */ float e = 1.0; ArrayList<Particle> particles; void setup(){ size(640, 640); fill(255, 105, 180); stroke(255, 153, 204); strokeWeight(3); particles = new ArrayList<Particle>(); while(partic</particle></particle>…

球状の雲

3D

/** * sphere of cloud * * @author aa_debdeb * @date 2016/09/09 */ float scale = 100; float phi = (1 + sqrt(5)) / 2.0; float radious = sqrt(sq(1) + sq(phi)); ArrayList<Triangle> triangles; float nScale = 0.5; float tScale = 0.03; PVector nOffset; voi</triangle>…

円からなる再帰的な木

/** * recursive tree of circles * * @author aa_debdeb * @date 2016/09/08 */ float MAX_RADIOUS = 100; float MIN_RADIOUS = 50; float MAX_CIRCLE = 80; float MIN_CIRCLE = 20; int MAX_DEPTH = 6; int BRANCH_NUM = 3; Node root; void setup(){ size…

二重螺旋

3D

/** * double helix * * @author aa_debdeb * @date 2016/09/07 */ void setup(){ size(480, 640, P3D); } void draw(){ background(255); translate(width / 2, 0, 0); rotateY(frameCount * 0.05); fill(152, 251, 152); stroke(152, 251, 152); float h =…

グラデーションの球

3D

/** * gradational sphere * * @author aa_debdeb * @date 2016/09/06 */ float scale = 100; float phi = (1 + sqrt(5)) / 2.0; float radious = sqrt(sq(1) + sq(phi)); ArrayList<Triangle> triangles; color[][] cols; void mousePressed(){ cols = new color[3][2</triangle>…

表面が流れる球

3D

/** * unstable sphere * * @author aa_debdeb * @date 2016/09/05 */ float scale = 100; float phi = (1 + sqrt(5)) / 2.0; float radious = sqrt(sq(1) + sq(phi)); ArrayList<Triangle> triangles; float nScale = 0.2; float tScale = 0.005; PVector nOffset; vo</triangle>…

漂う発光体

/** * floating illuminants * * @author aa_debdeb * @date 2016/09/04 */ ArrayList<Particle> particles; void setup(){ size(640, 640); noStroke(); particles = new ArrayList<Particle>(); } void draw(){ background(0); ArrayList<Particle> nextParticles = new ArrayList<Particle>(); for</particle></particle></particle></particle>…

サーチライト

/** * searchlight * * @author aa_debdeb * @date 2016/09/03 */ ArrayList<Point> points; float rot = 0; void setup(){ size(500, 500); noStroke(); points = new ArrayList<Point>(); for(int i = 0; i < 5000; i++){ points.add(new Point()); } } void draw(){ bac</point></point>…

円の上を回転する円

/** * cirlces on circles * * @author aa_debdeb * @date 20160902 */ int NUM = 30; float RADIOUS = 100; void setup(){ size(500, 500); background(0); } void draw(){ fill(0, 30); noStroke(); rect(0, 0, width, height); noFill(); stroke(255, 100…

桜ふぶき

3D

/** * shower of cherry blossom * * @author aa_debdeb * @date 2016/09/01 */ ArrayList<Triangle> triangles; void setup(){ size(640, 480, P3D); noStroke(); fill(255, 230, 234); triangles = new ArrayList<Triangle>(); } void draw(){ background(255); ArrayList<Triangle> next</triangle></triangle></triangle>…