Daily Creative Coding

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

静画

都市を見下ろす

/** * birds-eye view of city * * @author aa_debdeb * @date 2016/07/14 */ void setup(){ size(500, 500, P3D); mousePressed(); } void draw(){ } void mousePressed(){ float maxLocRadious = 500; float minSize = 5; float maxSize = 30; float noise…

青海波模様

/** * Seigaiha pattern * * @author aa_debdeb * @date 2016/07/06 */ float r = 50; float hStep = r / sqrt(3); float[] radians; void setup(){ size(640, 480); noFill(); strokeWeight(2); radians = new float[10]; radians[0] = 0.0; for(int i = 1;…

亀甲模様

/** * hexagonal pattern * * @author aa_debdeb * @date 2016/07/03 */ float e = 15.0; void setup(){ size(640, 480); mousePressed(); } void draw(){ } void mousePressed(){ color c1 = color(random(255), random(255), random(255)); color c2 = col…

波模様

/** * pattern of waves * * @author aa_debdeb * @date 2016/06/30 */ float margin = 50; float radious = 15; float theta = 120; color bg, sc; void setup(){ size(500, 500); noFill(); strokeWeight(3); mousePressed(); } void mousePressed(){ bg =…

ペンローズ・タイル

/** * Penrose Tiling * * @author aa_debdeb * @date 2016/06/29 */ float e = 400; color c1, c2; float phi = (1.0 + sqrt(5)) / 2.0; ArrayList<Triangle> triangles; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ trian</triangle>…

ペンローズの三角形(影付き)

/** * Penrose Triangle with Shadow * * @author aa_debdeb * @date 2016/06/28 */ color bg, c1, c2, c3; float e = 70; float w = 75; void setup(){ size(500, 500); stroke(0); strokeWeight(1); colorMode(HSB, 360, 100, 100); mousePressed(); } voi…

ペンローズの三角形

/** * Penrose Triangle * * @author aa_debdeb * @date 2016/06/27 */ color bg, sc, c1, c2, c3; float e = 110; float w = 60; void setup(){ size(500, 500); strokeWeight(1); mousePressed(); } void mousePressed(){ bg = color(random(255), random(…

斜めタイル

/** * skew tiling * * @author aa_debdeb * @date 2016/06/22 */ float e = 20; float theta = PI / 4; float margin = 50; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ fill(random(255), random(255), random(…

斜め交互タイル

/** * skew alternate tiling * * @author aa_debdeb * @date 2016/06/21 */ float e = 20; float theta = PI / 4; float margin = 50; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ fill(random(255), random(255…

賽形模様(Cube Pattern)

/** * pattern of pseudo 3d cubes * * @author aa_debdeb * @date 2016/06/09 */ color c1, c2, c3; float e = 30.0; void setup(){ size(500, 500); noStroke(); mousePressed(); } void draw(){ boolean isDisplayed = false; for(float y = -50; y < hei…

金の玉

/** * golden balls * * @author aa_debdeb * @date 2016/05/05 */ ArrayList<PVector> points; void setup(){ size(500, 500, P3D); points = new ArrayList<PVector>(); while(points.size() < 500){ float radious = random(200); float radian1 = random(PI); float radian</pvector></pvector>…

再帰的に円を描く

/** * circular fractal * * @author aa_debdeb * @date 2016/04/08 */ void setup(){ size(640, 640); mousePressed(); } void draw(){ } void mousePressed(){ background(255); stroke(255); fill(0); for(int d = 2; d < 9; d++){ float size = width / …

同じ色相でブロックを再帰的に分割する

/** * same hue * * @author aa_debdeb * @date 2016/04/03 */ void setup(){ size(640, 480); noStroke(); colorMode(HSB, 360, 100, 100); mousePressed(); } void draw(){ } void mousePressed(){ float hue = random(360); ArrayList<Block> queue = new ArrayL</block>…

ブロックを再帰的に分割する

/** * recursive segmentation * * @author aa_debdeb * @date 2016/04/01 */ void setup(){ size(640, 480); noStroke(); mousePressed(); } void draw(){ } void mousePressed(){ ArrayList<Block> queue = new ArrayList<Block>(); queue.add(new Block(0, 0, width, he</block></block>…

円のタイル

/** * circular filled tile * * @author aa_debdeb * @date 2016/03/22 */ int CELL_NUM = 25; int CELL_SIZE = 20; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(2…

弧と円のタイル

/** * circular tile * * @author aa_debdeb * @date 2016/03/21 */ int CELL_NUM = 25; int CELL_SIZE = 20; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255)); s…

斜め格子迷路

/** * maze cross tiles * * @author aa_debdeb * @date 2016/03/20 */ int CELL_NUM = 50; int CELL_SIZE = 10; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255))…

格子迷路

/** * maze tiles * * @author aa_debdeb * @date 2016/03/19 */ int CELL_NUM = 50; int CELL_SIZE = 10; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255)); stro…

斜めのタイル

/** * skew tile * * @author aa_debdeb * @date 2016/03/07 */ void setup(){ size(500, 500); noLoop(); background(255); stroke(0); strokeWeight(10); int step = 25; for(int w = 0; w < width; w += step){ for(int h = 0; h < height; h += step){ i…

年輪

/** * Annual Growth Ring * * @author aa_debdeb * @date 2016/02/08 * */ int LOOP_NUM = 60; void setup(){ size(500, 500); noLoop(); smooth(); background(255); ArrayList<ArrayList<Vertex>> verticiesList = new ArrayList<ArrayList<Vertex>>(); float angle = 0.0; ArrayList<Vertex> verticie</vertex></arraylist<vertex></arraylist<vertex>…

ヘアー

/** * Hair * * @author aa_debdeb * @date 2016/02/06 */ void setup(){ size(500, 500); noLoop(); background(255, 239, 213); stroke(139, 69, 19, 100); noFill(); for(int i = 0; i < 1000; i++){ beginShape(); boolean isFirst = true; float x = ra…

輝き

/** * Shine * * @author aa_debdeb * @date 2016/01/28 */ ArrayList<Line> lines; void setup(){ size(500, 500); noLoop(); colorMode(HSB, 360, 100, 100); lines = new ArrayList<Line>(); for(int i = 0; i < 3000; i++){ lines.add(new Line()); } background(0);</line></line>…

絡み取られた球

/** * Entwined Sphere * * @author aa_debdeb * @date 2016/01/21 */ float radious = 150; void setup(){ size(500, 500, P3D); smooth(); sphereDetail(16); background(0); translate(width / 2, height / 2); float px = radious * sin(0) * cos(0); fl…

宇宙

/** * Universe * * @author aa_debdeb * @date 2016/01/07 */ void setup(){ size(640, 480); smooth(); noLoop(); background(30); colorMode(HSB, 360, 100, 100, 100); float noiseX = random(100); float noiseY = random(100); for(int i = 0; i < 200…

星空

/** * Starry Sky * * @author aa_debdeb * @date 2016/01/01 */ void setup(){ size(500, 300); smooth(); noLoop(); background(30); colorMode(HSB, 360, 100, 100, 100); for(int i = 0; i < 200; i++){ PVector pos = new PVector(random(width), rando…

画像をドロネー分割して三次元のモザイクにする

/** * 3D Color Image by Delaynay Triangulation * * @author aa_debdeb * @date 2015/12/22 */ Delaynay delaynay; void setup(){ size(512, 512, P3D); smooth(); noLoop(); PImage image = loadImage("lena.jpg"); image(image, 0, 0); ArrayList<Point> points</point>…

画像をドロネー分割してモザイクにする

/** * Color Image by Delaynay Triangulation * * @author aa_debdeb * @date 2015/12/21 */ Delaynay delaynay; void setup(){ size(512, 512); smooth(); noLoop(); PImage image = loadImage("lena.jpg"); image(image, 0, 0); ArrayList<Point> points = new A</point>…

画像からドロネー図をつくる

入力画像 出力画像 入力画像を工夫しないと上手くいかない. /** * Image by Delaynay Triangulation * * @author aa_debdeb * @date 2015/12/13 */ Delaynay delaynay; void setup(){ size(540, 360); smooth(); noLoop(); PImage image = loadImage("photo…

ドロネー三角形分割(コード改良版)

前に書いたドロネー三角形分割のコードを改良した.マウスをクリックすると新しい点を追加することができる. ドロネー三角形分割 - 30 min. Processing /** * Delaynay Triangulation * * @author aa_debdeb * @date 2015/12/12 */ Delaynay delaynay; void…

ドロネー三角形分割

/** * Delaunay Triangulations * * @author aa_debdeb * @date 2015/12/02 */ void setup(){ size(500, 500); background(255); smooth(); noLoop(); ArrayList<Point> points = new ArrayList<Point>(); for(int i = 0; i < 100; i++){ points.add(new Point(random(widt</point></point>…