Daily Creative Coding

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

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

パーリンノイズによるパーティクルの流れ 3D

3D

/** * flow in 3D box * * @author aa_debdeb * @date 2016/04/30 */ float depth = 500; PVector[] nOffset; float nScale = 0.01; float stepSize = 3; ArrayList<Particle> particles; void setup(){ size(500, 500, P3D); nOffset = new PVector[3]; for(int i = 0</particle>…

ブロックを積み上げて都市をつくる

3D

/** * city builder * * @author aa_debdeb * @date 2016/04/29 */ int[][] blocks; int num = 50; int bsize = 10; void setup(){ size(500, 500, P3D); blocks = new int[num][num]; for(int x = 0; x < num; x++){ for(int y = 0; y < num; y++){ blocks[…

3Dのブロックを積み上げる

3D

/** * stack of blocks * * @author aa_debdeb * @date 2016/04/28 */ int[][] blocks; int num = 50; int bsize = 10; void setup(){ size(500, 500, P3D); blocks = new int[num][num]; for(int x = 0; x < num; x++){ for(int y = 0; y < num; y++){ bloc…

伸び縮みする弧

/** * elastic arcs * * @author aa_debdeb * @date 2016/04/27 */ ArrayList<Arc> arcs = new ArrayList<Arc>(); void setup(){ size(500, 500); arcs = new ArrayList<Arc>(); for(int i = 0; i < 10; i++){ arcs.add(new Arc()); } } void draw(){ colorMode(RGB, 255); </arc></arc></arc>…

色がグラデーショナルに変化するスプレー

/** * color spray * * @author aa_debdeb * @date 2016/04/26 */ color c1, c2; void setup(){ size(640, 640); frameRate(360); background(255); noStroke(); c1 = color(random(255), random(255), random(255)); c2 = color(random(255), random(255), …

サイケデリック・スタンプ

/** * psychedelic stamps * * @author aa_debdeb * @date 2016/04/25 */ void setup(){ size(640, 640); background(255); colorMode(HSB, 360, 100, 100); noStroke(); } void draw(){ if(mousePressed){ float diameter = sqrt(sq(pmouseX - mouseX) - sq…

収束する線

3D

/** * converged lines * * @author aa_debdeb * @date 2016/04/24 */ void setup(){ size(500, 500, P3D); stroke(0, 30); } void draw(){ background(255); for(int w = 0; w <= width; w += 20){ for(int h = 0; h <= height; h += 20){ line(w, h, -1000…

パリーンノイズによる3D上での表面

3D

/** * 3d noise surface * * @author aa_debdeb * @date 2016/04/23 */ float stepSize = 10; float maxDepth = 200; void setup(){ size(640, 640, P3D); noFill(); stroke(0, 0, 255); strokeWeight(2); } void draw(){ background(32); for(float w = 0; …

回転する球の輪

/** * ring absorption * * @author aa_debdeb * @date 2016/04/22 */ float radious1 = 200; float radious2 = 80; void setup(){ size(640, 640, P3D); noStroke(); fill(255); } void draw(){ background(32); lights(); translate(width / 2, height / 2…

マウスによるボックスの回転

3D

/** * box rotation by mouse * * @author aa_debdeb * @date 2016/04/21 */ float maxVel = PI / 16; float velStep = PI / 64; color c1 = color(255, 20, 146); color c2 = color(51, 4, 29); ArrayList<Box> boxes; void setup(){ size(640, 640, P3D); strok</box>…

球状での流れ

3D

/** * flow on earth * * @author aa_debdeb * @date 2016/04/20 */ float radious = 250; ArrayList<Particle> particles; PVector noiseOffset1, noiseOffset2; float noiseScale = 0.01; float maxVel = PI / 32; void setup(){ size(640, 640, P3D); mousePressed(</particle>…

球状でのパーティクルの軌跡

3D

/** * track on sphere * * @author aa_debdeb * @date 2016/04/19 */ float radious = 250; ArrayList<Particle> particles; PVector rNoise1, rNoise2; float nScale = 3.4; float maxVel = PI / 2048; float velStep = PI / 20480; void setup(){ size(640, 640, P3</particle>…

球の表面でのパーティクルの移動

3D

/** * surface on sphere * * @author aa_debdeb * @date 2016/04/18 */ float radious = 250; ArrayList<Particle> particles; PVector rNoise1, rNoise2; float nScale = 3.4; float maxVel = PI / 2048; float velStep = PI / 20480; void setup(){ size(640, 640, </particle>…

円形のパーリンノイズ

/** * circular perlin noise * * @author aa_debdeb * @date 2016/04/17 */ CircularNoise cNoise; void setup(){ size(500, 500); colorMode(HSB, 360, 100, 100); stroke(330, 30, 70); strokeWeight(2); fill(90, 30, 70); cNoise = new CircularNoise(0…

3次元空間における四角形

3D

/** * rectangle in 3D * * @author aa_debdeb * @date 2016/04/16 */ float bg, sat, bri; void setup(){ size(500, 500, P3D); rectMode(CENTER); strokeWeight(30); mousePressed(); } void draw(){ background(bg, sat, bri); translate(width / 2, heig…

3Dフラッシュ

3D

/** * flash in 3D * * @author aa_debdeb * @date 2016/04/15 */ ArrayList<PVector> points; float bg; void setup(){ size(500, 500, P3D); frameRate(15); noStroke(); mousePressed(); } void mousePressed(){ points = new ArrayList<PVector>(); for(int i = 0; i < 200</pvector></pvector>…

中心からの視点

3D

/** * view from center * * @author aa_debdeb * @date 2016/04/14 */ ArrayList<PVector> points; void setup(){ size(500, 500, P3D); noStroke(); fill(255); points = new ArrayList<PVector>(); for(int i = 0; i < 150; i++){ float r = random(100, 150); float rad1 =</pvector></pvector>…

振幅変調による波の二次元での可視化

/** * fluctuation * * @author aa_debdeb * @date 2016/04/13 */ ArrayList<PVector> points; float[] av; float[] ph; void setup(){ size(500, 500); mousePressed(); } void mousePressed(){ points = new ArrayList<PVector>(); colorMode(RGB, 255); background(32); col</pvector></pvector>…

球からなる成長する木

3D

/** * growing tree of spheres * * @author aa_debdeb * @date 2016/04/12 */ ArrayList<PVector> spheres; float radious = 20; void setup(){ size(500, 500, P3D); noStroke(); spheres = new ArrayList<PVector>(); spheres.add(new PVector(0, 0, 0)); } void draw(){ ba</pvector></pvector>…

重なって回転するボックス

3D

/** * overlapping boxes * * @author aa_debdeb * @date 2016/04/11 */ ArrayList<PVector> speeds; void setup(){ size(500, 500, P3D); noStroke(); speeds = new ArrayList<PVector>(); for(int i = 0; i < 10; i++){ PVector speed = new PVector(random(-1, 1), random(-</pvector></pvector>…

3Dのボックスをマウスの動きに合わせて回転させる

/** * rotating boxes * * @author aa_debdeb * @date 2016/04/10 */ void setup(){ size(500, 500, P3D); } void draw(){ background(64); lights(); for(float w = 0; w <= width; w += 50){ for(float h = 0; h <= height; h += 50){ pushMatrix(); trans…

四角形の輪

/** * circle of rectangles * * @author aa_debdeb * @date 2016/04/09 */ void setup(){ size(500, 500); fill(255, 50); stroke(255); strokeWeight(1); rectMode(CENTER); } void draw(){ background(0); translate(width / 2, height / 2); rotate(fram…

再帰的に円を描く

/** * 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 / …

円から産まれるパーティクル

/** * particles from eggs * * @author aa_debdeb * @date 2016/04/07 */ float P_RADIOUS = 7; float radious; ArrayList<Particle> particles; void setup(){ size(500, 500); noStroke(); radious = 0; particles = new ArrayList<Particle>(); } void draw(){ background(#F</particle></particle>…

成長

/** * growth * * @author aa_debdeb * @date 2016/04/06 */ ArrayList<Bubble> bubbles; void setup(){ size(640, 480); background(255); fill(255); stroke(0); bubbles = new ArrayList<Bubble>(); } void draw(){ PVector target = new PVector(mouseX, mouseY); for(Bu</bubble></bubble>…

色相 ± 60°、背景色 + 180°

/** * hue +- 60, bg + 180 * * @author aa_debdeb * @date 2016/04/05 */ color c0, c1, c2, cbg; ArrayList<Ball> balls; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); noStroke(); mousePressed(); balls = new ArrayList<Ball>(); } void mousePre</ball></ball>…

色相 ± 60°

/** * hue +- 60 * * @author aa_debdeb * @date 2016/04/04 */ color c0, c1, c2, cbg; ArrayList<Ball> balls; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); noStroke(); mousePressed(); balls = new ArrayList<Ball>(); } void mousePressed(){ cb</ball></ball>…

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

/** * 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>…

振幅変調

/** * amplitude modulatoin * * @author aa_debdeb * @date 2016/04/02 */ ArrayList<Float> values; float ac, as, avc, avs; void setup(){ size(500, 500); frameRate(180); stroke(255); noFill(); ac = 0.0; as = 0.0; avc = PI / 64; avs = PI / 16; values </float>…

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

/** * 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>…