2016-07-01から1ヶ月間の記事一覧
/** * 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>…
/** * flash of metaballs * * @author aa_debdeb * @date 2016/07/30 */ int cellNum = 200; float cellSize = 2; float[][] cells; ArrayList<Ball> balls; void setup(){ size(int(cellNum * cellSize), int(cellNum * cellSize)); noStroke(); cells = new flo</ball>…
/** * particles in vortices * * @author aa_debdeb * @date 2016/07/29 */ ArrayList<Vortex> vortices; ArrayList<Particle> particles; void setup(){ size(500, 500); vortices = new ArrayList<Vortex>(); for(int i = 0; i < 15; i++){ vortices.add(new Vortex()); } particles</vortex></particle></vortex>…
「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>…
/** * two-color layers * * @author aa_debdeb * @date 2016/07/26 */ PVector nOffset1, nOffset2; void setup(){ size(500, 500); noStroke(); nOffset1 = new PVector(random(10000), random(10000), random(10000)); nOffset2 = new PVector(random(100…
/** * leaf arrangement by golden ratio * * @author aa_debdeb * @date 2016/07/25 */ color[] colors = {color(25, 25, 112), color(199, 21, 133), color(255, 255, 0), color(220, 20, 60)}; float[] cStep = {0.0, 0.3, 0.4, 1.0}; void setup(){ size…
/** * marble pattern by perlin noise * * @author aa_debdeb * @date 2016/07/24 */ float noiseX, noiseY; void setup(){ size(400, 400); noiseX = random(10000); noiseY = random(10000); stroke(255, 140, 128); } void draw(){ background(255, 250,…
/** * ameba by perlin noise * * @author aa_debdeb * @date 2016/07/23 */ color c1 = color(238, 130, 238); color c2 = color(130, 237, 130); float noiseX, noiseY; void setup(){ size(400, 400); stroke(255, 255, 0); noiseX = random(10000); nois…
/** * contour line for perlin noise * * @author aa_debdeb * @date 2016/07/22 */ color c1 = color(238, 130, 238); color c2 = color(130, 237, 130); float noiseX, noiseY; void setup(){ size(400, 400); stroke(255, 255, 0); noiseX = random(1000…
/** * 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>…
/** * 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);…
/** * binary image for camera by perlin noise * * @author aa_debdeb * @date 2016/07/19 */ import processing.video.*; Capture camera; PVector offset; float scale = 0.01; float tScale = 0.1; color c1 = color(255, 20, 147); color c2 = color(2…
/** * 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>…
/** * 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 = …
/** * pink clouds * * @author aa_debdeb * @date 2016/07/16 */ color c1 = color(255, 0, 128); color c2 = color(0, 255, 255); PVector nOffset1, nOffset2; float nScale = 0.007; float tScale = 0.03; float step = 5.0; void setup(){ size(750, 20…
/** * 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…
/** * 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…
/** * 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…
/** * 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 …
/** * turing pattern by CA * * @author aa_debdeb * @date 2016/07/10 */ int cellNum = 250; float cellSize = 2; int[][] cells; int innerNeighbor = 2; int outerNeighbor = 4; float w; color bg, fc; void setup(){ size(500, 500); frameRate(10); …
/** * Diffusion Limited Aggregation (DLA) * * @author aa_debdeb * @date 2016/07/09 */ int num = 10000; ArrayList<Walker> nonwalkers; ArrayList<Walker> walkers; int[][] moves = {{0, -1}, // up {1, 0}, //right {0, 1}, // down {-1, 0}}; //left void setup(){ </walker></walker>…
/** * BZ reaction by simple cellular automata * * @author aa_debdeb * @date 2016/07/08 */ int cellNum = 100; float cellSize = 5; int[][] cells; int[][] dir = {{0, 1, 0, -1}, {-1, 0, 1, 0}}; // up, right, down, left void setup(){ size(500, …
/** * 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…
/** * 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;…
/** * 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…
/** * Hexagonal Life Game * * @author aa_debdeb * @date 2016/07/04 */ float e = 6.0; int X = 50; int Y = 50; int[][] states; void setup(){ size(640, 480); frameRate(10); stroke(30); states = new int[X][Y]; for(int x = 0; x < X; x++){ for(i…
/** * 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…
/** * cell automaton for diffusion * * @author aa_debdeb * @date 2016/07/02 */ int cellNum = 50; float cellSize = 10; float[][] cells; int[][] dir = {{0, -1, 0, 1, 1, 1, 0, -1, -1}, {0, -1, -1, -1, 0, 1, 1, 1, 0}}; void setup(){ size(500, …