Daily Creative Coding

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

インタラクション

似非流体

/** * fake fluid * * @author aa_debdeb * @date 2016/08/09 */ int cellNum = 200; float cellSize = 2; ArrayList<Particle> particles; void setup(){ size(400, 400); particles = new ArrayList<Particle>(); for(int i = 0; i < 150000; i++){ particles.add(new Particle</particle></particle>…

波の干渉

/** * wave interference * * @author aa_debdeb * @date 2016/08/03 */ float step = 5; float maxAmp = 100; float minAmp = 20; float maxDistance = 300; float minDistance = 50; float maxSpeed = 0.2; float minSpeed = 0.01; float maxInterval = PI…

巻き取れる格子

「c」で回転方向の切り替え。 /** * winding lattice * * @author aa_debdeb * @date 2016/07/28 * * press "c" to toggle the direction of rotation * */ int sampleStep = 2; int lineStep = 10; boolean clockwise = true; PVector[][] points; void set…

マウスを中心にオブジェクトを回転させる

/** * force for rotation * * @author aa_debdeb * @date 2016/07/27 */ ArrayList<PVector> particles; void setup(){ size(500, 500); noStroke(); fill(255, 255, 0, 200); particles = new ArrayList<PVector>(); for(int i = 0; i < 3000; i++){ float radious = map(sqr</pvector></pvector>…

海底探査

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

マウスで線で表された空間をグニャグニャにする

/** * force by mouse to lines * * @author aa_debdeb * @date 2016/07/12 */ int X_STEP = 1; int Y_STEP = 5; int X, Y; float FORCE_RADIOUS = 100; float MAX_FORCE = 5.0; PVector[][] points; void setup(){ size(500, 500); stroke(255, 128); noFil…

円状の虹

/** * rainbow spin * * @author aa_debdeb * @date 2016/07/07 */ float R = 220; float angleStep = 24; void setup(){ size(500, 500); stroke(0); strokeWeight(3); } void draw(){ colorMode(RGB, 255); background(255); colorMode(HSB, 360, 100, 100…

球の中心にあるカメラ

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

スペース・トラベル

/** * space travel * * @author aa_debdeb * @date 2016/05/10 */ ArrayList<Star> stars; float speed; float maxSpeed = 3.0; float speedStep = 0.01; void setup(){ size(640, 480); stars = new ArrayList<Star>(); for(int i = 0; i < 200; i++){ stars.add(new S</star></star>…

弧の間隔が変わらない渦

/** * circular eyes * * @author aa_debdeb * @date 2016/05/02 */ void setup(){ size(500, 500); noStroke(); } void draw(){ background(64); translate(width / 2, height / 2); float radian = 0.0; float radious = 10.0; while(radious <= width){ r…

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

/** * 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のボックスをマウスの動きに合わせて回転させる

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

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

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

重なる市松模様

/** * overlayed checks * * @author aa_debdeb * @date 2016/03/26 */ int CELL_NUM = 200; int CELL_SIZE = 10; void setup(){ size(640, 640); noStroke(); background(255); } void draw(){ translate(mouseX, mouseY); rotate(frameCount * 0.05); for(…

カラールーレット

/** * color roulette * * @author aa_debdeb * @date 2016/03/13 */ void setup(){ size(640, 640); frameRate(60); strokeWeight(2); background(0); colorMode(HSB, 360, 100, 100); } void draw(){ if(mousePressed){ translate(mouseX, mouseY); rotate…

回転する三角形のスタンプ

/** * rotating triangle stamp * * @author aa_debdeb * @date 2016/03/08 */ void setup(){ size(640, 640); background(30); fill(0); stroke(255); strokeWeight(1); } void draw(){ if(mousePressed){ translate(mouseX, mouseY); rotate(frameCount * …

パーティクルの流れ

/** * Noisy Flow for Particles * * @author aa_debdeb * @date 2016/03/04 */ ArrayList<Particle> particles; void setup(){ size(640, 640); particles = new ArrayList<Particle>(); for(int i = 0; i < 1000; i++){ particles.add(new Particle()); } background(255); str</particle></particle>…

網目

/** * Mesh Net * * @author aa_debdeb * @date 2016/02/24 */ ArrayList<PVector> positions; void setup(){ size(500, 500); frameRate(30); background(0); stroke(255, 100); positions = new ArrayList<PVector>(); } void draw(){ if(mousePressed){ float x = mouseX + </pvector></pvector>…

ずれた格子

/** * Unshaped Lattice * * @author aa_debdeb * @date 2016/02/21 */ float noiseX, noiseY; void setup(){ size(500, 500); smooth(); mousePressed(); } void draw(){ } void mousePressed(){ color bgColor = color(random(255), random(255), random(2…

トゲトゲの円

/** * Unshaped Circle * * @author aa_debdeb * @date 2016/02/03 */ void setup(){ size(500, 500); noFill(); mouseMoved(); } void draw(){ } void mouseMoved(){ background(255); beginShape(); float angStep = map(mouseX, 0, width, 30, 1); float …

ペンキをとばす

マウスをクリックする。 /** * Paint Splash * * @author aa_debdeb * @date 2016/01/19 */ void setup(){ size(500, 500); background(255); frameRate(30); colorMode(HSB, 360, 100, 100); } void draw(){ } void mousePressed(){ pushMatrix(); translat…

円でマウスを追いかける

/** * Mouse Followers * * @author aa_debdeb * @date 2016/01/18 */ ArrayList<PVector> pastMouses; void setup(){ size(500, 500); smooth(); frameRate(30); pastMouses = new ArrayList<PVector>(); } void draw(){ background(128, 11, 35); stroke(230, 195, 0); strok</pvector></pvector>…

円で多角形

/** * Polygonal Shape * * @author aa_debdeb * @date 2016/11/14 */ int circleNum = 75; float radious = 180; void setup(){ size(500, 500); frameRate(30); } void draw(){ background(165, 42, 42); translate(width / 2, height / 2); rotate(frameC…

オブジェクトをマウスの動きで回転させる

/** * Gradational Roters * * @author aa_debdeb * @date 2016/01/13 */ float interval = 20; ArrayList<Roter> roters; void setup(){ size(640, 480); frameRate(30); smooth(); rectMode(CENTER); roters = new ArrayList<Roter>(); for(float y = interval / 2; y <=</roter></roter>…

曼荼羅

/** * Mandala * * @author aa_debdeb * @date 2016/01/05 */ void setup(){ size(500, 500); background(64); } void draw(){ if(mousePressed){ PVector mouse = new PVector(mouseX - width / 2, mouseY - height / 2); translate(width / 2, height / 2)…

マウスに向かって泳ぐパーティクル

/** * Swimmer to Mouse * * @author aa_debdeb * @date 2016/01/03 */ float MAX_ACC = 0.05; float MAX_POSVEL = 4.0; float MAX_BEZ_SPD = PI / 12; float VELVARIANT_SIZE = 0.1; float IMPACT_SIZE = 5.0; ArrayList<Swimmer> swimmers; void setup(){ size(500,</swimmer>…

グネグネ

/** * Wiggy Worm * * @author aa_debdeb * @date 2015/12/27 */ void setup(){ size(500, 500); smooth(); } void draw(){ background(240, 255, 240); translate(width / 2, 0); stroke(128, 128, 0); strokeWeight(3); fill(238, 232, 170); beginShape()…

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

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

マウスを避けるドット

/** * Untouchable Dots * * @author aa_debdeb * @date 2015/11/12 */ void setup(){ size(500, 500); smooth(); frameRate(30); } void draw(){ background(255); noStroke(); fill(0); for(int x = 0; x < 50; x++){ for(int y = 0; y < 50; y++){ PVecto…