Daily Creative Coding

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

3D

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

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…

カメラから取得した画像を立方体のテクスチャにする

/** * Texture by Camera * * @author aa_debdeb * @date 2016/01/06 */ import processing.video.*; Capture camera; void setup(){ size(500, 500, P3D); camera = new Capture(this, 480, 360); camera.start(); } void draw(){ background(255); transla…

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

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

カメラから取り込んだ映像を三次元のメッシュに加工する

/** * Camera by Square Mesh * * @author aa_debdeb * @date 2015/12/14 */ import processing.video.*; Capture camera; float gridWidth = 12; float maxZ = -100; void setup(){ size(640, 480, OPENGL); smooth(); camera = new Capture(this, width, h…

FFTを三次元の高さで可視化する

/** * Visualization of FFT by 3D Height * * @author aa_debdeb * @date 2015/12/10 */ import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.effects.*; import ddf.minim.signals.*; import ddf.minim.spi.*; import ddf.minim.ugens.*; …

球の色が変わり続ける

3D

/** * Color Sphere * * @author aa_debdeb * @date 2015/12/03 */ int step; color nextColor; color currentColor; void setup(){ size(500, 500, P3D); smooth(); sphereDetail(24); nextColor = color(random(255), random(255), random(255), 30); setC…

三次元のボールが向かってくる

3D

/** * Coming Ball * * @author aa_debdeb * @date 2015/11/29 */ ArrayList<Ball> balls; void setup(){ size(500, 500, P3D); smooth(); frameRate(30); sphereDetail(16); background(0); balls = new ArrayList<Ball>(); } void draw(){ noStroke(); fill(0, 30); re</ball></ball>…

三次元の線を重ねる

3D

/** * 3D Lines * * @author aa_debdeb * @date 2015/11/28 */ float gray; float radious; float theta1; float theta2; int grayStep; float radiousNoise; float theta1Noise; float theta2Noise; void setup(){ size(500, 500, P3D); background(255); s…

三次元のホワイトノイズ

3D

/** * 3D White Noise * * @author aa_debdeb * @date 2015/11/27 */ void setup(){ size(500, 500, P3D); smooth(); frameRate(30); } void draw(){ background(255); stroke(0); strokeWeight(1); fill(128, 128); lights(); rotateX(-PI / 4); rotateY(-P…

マウスの近くの球が近づく

/** * Pop Up Surface * * @author aa_debdeb * @date 2015/11/26 */ void setup(){ size(500, 500, P3D); smooth(); sphereDetail(10); } void draw(){ background(0); noStroke(); fill(255); lights(); for(int x = -100; x < width + 100; x += 20){ for…

三次元の表面を波立たせる

3D

/** * Waving Surface * * @author aa_debdeb * @date 2015/11/25 */ void setup(){ size(500, 500, P3D); smooth(); sphereDetail(5); } void draw(){ background(0); noStroke(); lights(); fill(0, 128, 128); for(int x = 0; x <= width; x += 20){ for(…

カメラ画像を三次元の色付きボックスで表現する.

飛び出る3Dみたい. /** * Color Box Image * * @author aa_debdeb * @date 2015/11/24 * */ import processing.video.*; Capture camera; void setup(){ size(640, 480, P3D); smooth(); camera = new Capture(this, width, height); camera.start(); } voi…

カメラ画像を三次元のボックスで表現する

/** * Box Image * * @author aa_debdeb * @date 2015/11/23 * */ import processing.video.*; Capture camera; void setup(){ size(640, 480, P3D); smooth(); camera = new Capture(this, width, height); camera.start(); } void draw(){ background(255)…

パーティクル

3D

JavaScriptモードだとcamera関数が機能しない? /** * 3D Particle System * * @author aa_debdeb * @date 2015/10/03 */ float PARTICLE_RADIOUS = 3.0; float PARTICLE_NUM = 1000; float FORCE = 2.0; ArrayList<Particle> particles; void setup(){ size(500, 500,</particle>…

パーリンノイズでブロックを波立たせる

3D

JavaScriptモードとJavaモードで描かれるものが異なる. Javaモードを推奨. /** * 3D Perlin Blocks * * @author aa_debdeb * @date 2015/09/28 */ void setup(){ size(500, 500, P3D); smooth(); frameRate(24); lights(); camera(1500, 500, 1200, 500, 5…

xy格子をz軸に対して回転させる

3D

JavaScriptモードとJavaモードで描かれるものが異なる. Javaモードを推奨. /** * Rotation of XY Grid * * @author aa_debdeb * @date 2015/09/27 */ void setup(){ size(500, 500, P3D); smooth(); frameRate(24); camera(1500, 500, 1500, 500, 500, 0, …

カメラを回転させる

3D

/** * Rotation of Camera * * @author aa_debdeb * @date 2015/09/26 */ float CAMERA_RADIOUS = 1000; float CAMERA_RADIAN_SPEED = PI / 64; float radian1; float radian2; float radianSpeed1; float radianSpeed2; float centerX; float centerY; floa…

球の周りに小さな球を公転させる

3D

/** * 3D Orbital System * * @author aa_debdeb * @date 2015/09/25 */ float ORBITAL_RADIOUS = 100; int SPHERE_NUM = 50; float SPHERE_RADIOUS = 5; float SPHERE_RADIAN_SPEED = PI / 32; ArrayList<Sphere> spheres; void setup(){ size(500, 500, P3D); smoo</sphere>…

x軸を回転させる

3D

/** * Rotation of X Angle * * @author aa_debdeb * @date 2015/09/24 */ float rotationX = 0.0; float rotationXStep = PI / 64; void setup(){ size(500, 500, P3D); smooth(); frameRate(24); } void draw(){ rotationX += rotationXStep; if(abs(rotat…

camera関数の使い方チェック

3D

カメラ位置 x方向にマイナス:a x方向にプラス:d y方向にマイナス:w y方向にプラス:x z方向にマイナス:↑ z方向にプラス:↓ javascriptモードだとキーボード入力がうまくいかない? /** * 3D Camera Check 1 * * @author aa_debdeb * @date 2015/09/23 */…

球を箱状に並べる

3D

/** * 3D Box Spheres * * @autor aa_debdeb * @date 2015/09/22 */ void setup(){ size(500, 500, P3D); smooth(); background(255); sphereDetail(40); lights(); camera(0, 0, 0, width / 2, height/2, 100, 0, 1, 0); noStroke(); for(int xi = 0; xi < …