読者です 読者をやめる 読者になる 読者になる

Daily Creative Coding

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

3D

三次元の再帰木

3D

/** * 3D recursive tree * * @author aa_debdeb * @date 2016/08/12 */ Tree tree; void setup(){ size(640, 480, P3D); tree = new Tree(); } void draw(){ background(60); translate(width / 2, height * (4.0 / 5)); rotateX(map(mouseY, 0, width, -PI…

なびく面

3D

/* * surface in the wind * * @author aa_debdeb * @date 2016/08/06 */ int num = 50; int step = 20; float scale = 0.1; PVector[] offsets; void setup(){ size(500, 500, P3D); fill(220, 20, 60); stroke(0); strokeWeight(1); offsets = new PVector…

キューブの崩壊

3D

/** * destruction of cube * * @author aa_debdeb * @date 2016/07/31 */ int blockNum = 10; float blockSize = 30; ArrayList<Block> blocks; void setup(){ size(500, 500, P3D); noStroke(); initialize(); } void initialize(){ blocks = new ArrayList<Block>(); fl</block></block>…

波の干渉3D

3D

/** * wave interference in 3D * * @author aa_debdeb * @date 2016/07/21 */ float step = 20; float maxAmp = 50; float maxDistance = 300; color c1 = color(22, 199, 175); color c2 = color(199, 21, 133); ArrayList<Oscillator> oscillators; void setup(){ siz</oscillator>…

金の板

3D

/** * golden plate * * @author aa_debdeb * @date 2016/07/20 */ color gold1, gold2; PVector[] noiseOffsets; void setup(){ size(500, 500, P3D); noStroke(); colorMode(HSB, 360, 100, 100); gold1 = color(43, 100, 85); gold2 = color(43, 20, 85);…

たくさんの円を傾けながら重ねて円錐をつくる

3D

/** * penguins * * @author aa_debdeb * @date 2016/07/18 */ float maxR = 100; float maxZ = 300; float vStep = 0.01; ArrayList<Tree> trees; void setup(){ size(640, 480, P3D); colorMode(HSB, 360, 100, 100); initialize(); } void initialize(){ trees </tree>…

水面を漂うオブジェクト

3D

/** * floating objects on water * * @author aa_debdeb * @date 2016/07/17 */ PVector stepSize = new PVector(30, 40); PVector rectSize = new PVector(20, 30); float maxZ = 200; PVector noiseOffset; float noiseScale = 0.003; float timeScale = …

海底探査

/** * seabed exploration * * @author aa_debdeb * @date 2016/07/15 */ float maxLocRadious = 800; float minSize = 10; float maxSize = 100; float noiseX = random(10000); float noiseY = random(10000); float noiseScale = 0.02; float camSpeed = …

都市を見下ろす

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

3D空間を高速移動する

3D

/** * endless rollar coaster * * @author aa_debdeb * @date 2016/07/13 */ float xScale = 750; float yScale = 750; float zScale = 0.001; float speed = 0.005; float eyeZ = 10; float ellipseWidth = 100; float noiseX, noiseY; void setup(){ size…

曲がりくねった道を走る

3D

/** * winding road * * @author aa_debdeb * @date 2016/07/11 */ float xScale = 300; float yScale = 100; float zScale = PI / 1024; float speed = PI / 64; float eyeZ = PI / 8; float routeWidth = 100; void setup(){ size(500, 500, P3D); } void …

ぐにゃぐにゃする球

3D

/** * wriggling sphere * * @author aa_debdeb * @date 2016/07/05 */ float radious = 200; int resolution = 40; PVector noiseOffset; void setup(){ size(500, 500, P3D); fill(160); stroke(200); strokeWeight(1); mousePressed(); } void mousePress…

球を段々と構築する

/** * construction of sphere * * @author aa_debdeb * @date 2016/06/20 */ float radious = 200; int resolution = 30; int num = 0; int numStep = 1; int maxNum = resolution * (resolution / 2); void setup(){ size(500, 500, P3D); fill(255); stro…

sphere()を使わずに球を描く

3D

/** * sphere without sphere() * * @author aa_debdeb * @date 2016/06/19 */ float radious = 200; void setup(){ size(500, 500, P3D); fill(0, 206, 209); stroke(128); strokeWeight(1); } void draw(){ background(0); // lights(); translate(width /…

揺れる球の輪

3D

/** * noisy sphere ring * * @author aa_debdeb * @date 2016/06/18 */ float radious = 200; float noiseScale = 0.01; float timeScale = 0.03; void setup(){ size(500, 500, P3D); } void draw(){ background(255); stroke(60); noFill(); translate(wi…

円を取り囲む線

3D

/** * line surrounding sphere * * @author aa_debdeb * @date 2016/06/10 */ float radious = 200; float radian; void setup(){ size(500, 500, P3D); noFill(); strokeWeight(2); stroke(0, 150); radian = 0.0; } void draw(){ background(255); transl…

球を囲む輪

/** * rings on sphere * * @author aa_debdeb * @date 2016/06/08 */ float radious = 200; ArrayList<Ring> rings; void setup(){ size(500, 500, P3D); rings = new ArrayList<Ring>(); noFill(); strokeWeight(5); stroke(0, 206, 209); } void draw(){ background(3</ring></ring>…

反射と分裂

/** * reflection and fragmentation * * @author aa_debdeb * @date 2016/05/24 */ ArrayList<Particle> particles; float gravity = -0.1; void setup(){ size(500, 500, P3D); particles = new ArrayList<Particle>(); sphereDetail(16); } void draw(){ background(0); trans</particle></particle>…

マウスでカメラを操作する

3D

/** * camera manipulation * * @author aa_debdeb * @date 2016/05/21 */ Cam cam; ArrayList<Obj> objs; void setup(){ size(500, 500, P3D); cam = new Cam(); objs = new ArrayList<Obj>(); for(int i = 0; i < 100; i++){ objs.add(new Obj()); } } void draw(){ </obj></obj>…

カメラがサイン曲線上を移動する

3D

/** * camera on sine curve * * @author aa_debdeb * @date 2016/05/20 */ ArrayList<Block> blocks; float speed = 30; void setup(){ size(500, 500, P3D); noFill(); stroke(0,255, 0); blocks = new ArrayList<Block>(); } void draw(){ background(0); translate(wid</block></block>…

マウスを追いかけるパーティクル(3D)

/** * particles following mouse in 3D * * @author aa_debdeb * @date 2016/05/18 */ float MAX_VEL = 20.0; float MAX_ACC = 1.0; ArrayList<Particle> particles; void setup(){ size(640, 640, P3D); sphereDetail(16); particles = new ArrayList<Particle>(); for(int i =</particle></particle>…

公転軌道上にあるカメラ

3D

/** * view on orbital path * * @author aa_debdeb * @date 2016/05/17 */ ArrayList<Obj> objs; void setup(){ size(500, 500, P3D); objs = new ArrayList<Obj>(); for(int i = 0; i < 200; i++){ objs.add(new Obj()); } noStroke(); } void draw(){ background(0)</obj></obj>…

パーティクルの視点

/** * view from a particle * * @author aa_debdeb * @date 2016/05/16 */ Particle cP; ArrayList<Particle> particles; float radious = 5; void setup(){ size(500, 500, P3D); cP = new Particle(); particles = new ArrayList<Particle>(); for(int i = 0; i < 100; i++){ </particle></particle>…

3D空間の奥から向かってくるオブジェクト

3D

/** * objects from deep * * @author aa_debdeb * @date 2016/05/15 */ ArrayList<Obj> objs; void setup(){ size(500, 500, P3D); objs = new ArrayList<Obj>(); noStroke(); colorMode(HSB, 360, 100, 100); } void draw(){ background(180, 12, 100); // lights();</obj></obj>…

球の中心にあるカメラ

/** * camera in sphere * * @author aa_debdeb * @date 2016/05/14 */ ArrayList<PVector> points; void setup(){ size(500, 500, P3D); points = new ArrayList<PVector>(); float r = width / 2; for(int i = 0; i < 300; i++){ float radian1 = random(PI / 2); float radi</pvector></pvector>…

回転しながら上昇するオブジェクト

3D

/** * tornado * * @author aa_debdeb * @date 2016/05/13 */ ArrayList<Block> blocks; void setup(){ size(500, 500, P3D); blocks = new ArrayList<Block>(); rectMode(CENTER); noStroke(); } void draw(){ lights(); background(220); translate(width / 2, 3 * heigh</block></block>…

3Dのアングルを段々と変える

3D

/** * cloud of box * * @author aa_debdeb * @date 2016/05/11 */ int angleCount = 100; ArrayList<Box> boxes; PVector angle1, angle2; void setup(){ size(500, 500, P3D); noFill(); stroke(255, 192); boxes = new ArrayList<Box>(); for(int i = 0; i < 200; i</box></box>…

ortho() vs perspective()

3D

/** * perspective vs orthographic * * @author aa_debdeb * @date 2016/05/09 */ boolean isPerspective; void setup(){ size(500, 500, P3D); isPerspective = true; fill(0, 255, 157); stroke(128); } void draw(){ lights(); background(255, 228, 225…

流れるブロック

3D

/** * block stream * * @author aa_debdeb * @date 2016/05/08 */ ArrayList<Block> blocks; void setup(){ size(500, 500, P3D); blocks = new ArrayList<Block>(); float z = 200; while(z >= -800){ blocks.add(new Block(z)); z -= 20; } fill(255, 69, 0); noStroke(</block></block>…

点群の回転

3D

/** * cycle of points * * @author aa_debdeb * @date 2016/05/07 */ ArrayList<Particle> particles; void setup(){ size(640, 480, P3D); particles = new ArrayList<Particle>(); for(int i = 0; i < 500; i++){ particles.add(new Particle()); } noStroke(); fill(255, 255</particle></particle>…

金の玉

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

3D空間でカメラを動かす

3D

/** * cameara movement * * @author aa_debdeb * @date 2016/05/04 */ PVector center; float cameraZ; void setup(){ size(500, 500, P3D); center = new PVector(width / 2, height / 2, height / 2); cameraZ = -500; } void draw(){ background(255); f…

パーリンノイズによるパーティクルの流れ 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…

収束する線

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

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

球からなる成長する木

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…

擬似3Dパーティクル

/** * Like 3D * * @author aa_debdeb * @date 2016/02/04 */ ArrayList<Particle> particles; void setup(){ size(500, 500); smooth(); frameRate(30); particles = new ArrayList<Particle>(); for(int i = 0; i < 300; i++){ particles.add(new Particle()); } } void draw()</particle></particle>…

絡み取られた球

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