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

Daily Creative Coding

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

ランダム

パーリンノイズの風景

/** * landscape of perlin noise * * @author aa_debdeb * @date 2016/08/02 */ void setup(){ size(500, 500); noFill(); mousePressed(); } void draw(){} void mousePressed(){ float noiseX = random(10000); float noiseY = random(10000); float[][] …

ランダムの風景

/** * landspace of randomness * * @author aa_debdeb * @date 2016/08/01 */ void setup(){ size(500, 500); noFill(); mousePressed(); } void draw(){} void mousePressed(){ float[][] values = new float[width][height]; for(int x = 0; x < width; x…

瞬くメタボール

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

二色の地層

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

パーリンノイズでマーブル模様

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

ピンクの雲

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

拡散律速凝集 Diffusion Limited Aggregation (DLA)

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

波模様のアニメーション

/** * animation of abstract waves * * @author aa_debdeb * @date 2016/07/01 */ float margin = 20; float radious = 18; float theta = 120; float noiseScale = 0.005; float timeScale = 0.01; PVector noiseOffset1, noiseOffset2, noiseOffset3; voi…

パーリンノイズで震える格子

/** * perlin net * * @author aa_debdeb * @date 2016/06/17 */ float stepNum = 25; float stepSize = 20; float noiseScale = 0.005; float timeScale = 0.01; void setup(){ size(500, 500); } void draw(){ noStroke(); fill(30, 144, 255, 30); rect(0…

ノイズ表面上での近傍探索

/** * nearest search on noisy surface * * @author aa_debdeb * @date 2016/06/13 */ int num = 3000; float noiseScale = 0.01; ArrayList<PVector> reached; ArrayList<PVector> unreached; void setup(){ size(500, 500); frameRate(300); reached = new ArrayList<PVector>(); unr</pvector></pvector></pvector>…

円の中の近傍探索

/** * nearest search in circle * * @author aa_debdeb * @date 2016/06/12 */ int num = 3000; ArrayList<PVector> reached; ArrayList<PVector> unreached; void setup(){ size(500, 500); frameRate(300); reached = new ArrayList<PVector>(); unreached = new ArrayList<PVector>(); for(in</pvector></pvector></pvector></pvector>…

柔らかい発光体

/** * soft illuminant * * @author aa_debdeb * @date 2016/06/07 */ PVector nStart; float hue; void setup(){ size(500, 500); noStroke(); nStart = new PVector(random(1000), random(1000), random(1000)); background(30); hue = 0; } void draw(){ …

地獄の太陽

/** * evil sun * * @author aa_debdeb * @date 2016/06/06 */ PVector xStart, yStart; void setup(){ size(500, 500); noStroke(); xStart = new PVector(random(1000), random(1000), random(1000)); yStart = new PVector(random(1000), random(1000), r…

弧で歩く2

/** * arc walkers 2 * * @author aa_debdeb * @date 2016/06/04 */ ArrayList<Drawer> drawers; void setup(){ size(500, 500); background(255); colorMode(HSB, 360, 100, 100); drawers = new ArrayList<Drawer>(); for(int i = 0; i < 100; i++){ drawers.add(new Drawe</drawer></drawer>…

円弧で歩く

/** * arc walkers * * @author aa_debdeb * @date 2016/06/03 */ ArrayList<Drawer> drawers; void setup(){ size(500, 500); drawers = new ArrayList<Drawer>(); for(int i = 0; i < 30; i++){ drawers.add(new Drawer()); } background(255); noStroke(); } void draw(){</drawer></drawer>…

パーティクルの間に線をひく3

/** * movers for drawing lines 3 * * @author aa_debdeb * @date 2016/06/02 */ ArrayList<Mover> movers; void setup(){ size(500, 500); frameRate(120); background(0); movers = new ArrayList<Mover>(); for(int i = 0; i < 30; i++){ movers.add(new Mover()); } b</mover></mover>…

パーティクルの間に線をひく2

/** * movers for drawing lines 2 * * @author aa_debdeb * @date 2016/06/01 */ ArrayList<Mover> movers1; ArrayList<Mover> movers2; void setup(){ size(600, 600); movers1 = new ArrayList<Mover>(); for(int i = 0; i < 10; i++){ movers1.add(new Mover(0)); } movers2 =</mover></mover></mover>…

パーティクルの間に線を描く

/** * movers for drawing lines * * @author aa_debdeb * @date 2016/05/31 */ ArrayList<Particle> particles; void setup(){ size(640, 480); frameRate(360); particles = new ArrayList<Particle>(); for(int i = 0; i < 10; i++){ particles.add(new Particle()); } backgr</particle></particle>…

線によるパーリンノイズの可視化

/** * visualization of 2d perlin noise by lines * * @author aa_debdeb * @date 2016/05/30 */ void setup(){ size(500, 500); stroke(0, 255, 128, 255); strokeWeight(1); } void draw(){ background(255); for(int w = -10; w < width + 10; w += 3){ …

菊の花

/** * flower of chrysanthemum * * @author aa_debdeb * @date 2016/05/29 */ float gray; float grayStep; float offset1, offset2; void setup(){ size(500, 500); background(0); gray = 128; grayStep = 0.5; offset1 = random(10000); offset2 = rando…

相反する2つの重力

/** * contrary gravity * * @author aa_debdeb * @date 2016/05/01 */ ArrayList<Particle> particles; float nOffset1, nOffset2; float nScale1 = 0.01; float nScale2 = 0.004; float gravity = 0.3; float velMax = 5.0; color c1 = color(255, 0, 255); color c2</particle>…

伸び縮みする弧

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

円形のパーリンノイズ

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

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

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

線の波

/** * waving lines * * @author aa_debdeb * @date 2016/03/27 */ float noiseW, noiseH, noiseT; void setup(){ size(500, 500); stroke(255, 200); strokeWeight(1); noFill(); noiseW = random(100); noiseH = random(100); noiseT = random(100); } voi…

点群でパーリンノイズを可視化

/** * Points Noise * * @author aa_debdeb * @date 2016/03/23 */ float wNoise, hNoise, tNoise; float noiseScale = 0.003; float step = 10; void setup(){ size(500, 500); frameRate(30); wNoise = random(1000); hNoise = random(1000); tNoise = ran…

ライン・ブラインド

/** * line blind * * @author aa_debdeb * @date 2016/03/16 */ float offset; float[] values; float offsetNoise; float valueNoise1, valueNoise2; void setup(){ size(500, 500); frameRate(20); offset = 0; values = new float[51]; for(int i = 0; i …

引っかき傷

/** * scratch * * @author aa_debceb * @date 2016/03/11 */ float margin = 50; float base; float baseStep = 1.3; float y[]; float gray; float gStep = 0.3; void setup(){ size(640, 640); strokeWeight(1); background(255); gray = 0; base = 0; y …

カラーパーティクルの流れ

/** * Noisy Flow for Color Particles * * @author aa_debdeb * @date 2016/03/05 */ ArrayList<Particle> particles; float radianNoiseX, radianNoiseY; float rNoiseX, rNoiseY; float gNoiseX, gNoiseY; float bNoiseX, bNoiseY; void setup(){ size(640, 640); p</particle>…

ランダム・加速度・ウォーカー

/** * random acceleration walkers * * @author aa_debdeb * @date 2016/03/02 */ ArrayList<Particle> particles; void setup(){ size(640, 640); frameRate(60); particles = new ArrayList<Particle>(); for(int i = 0; i < 100; i++){ particles.add(new Particle()); } bac</particle></particle>…

曖昧な円

/** * ambiguous circle * * @author aa_debdeb * @date 2016/03/01 */ int vertexNum = 50; void setup(){ size(500, 500); frameRate(30); background(255); noFill(); stroke(0, 10); } void draw(){ strokeWeight(map(noise(frameCount * 0.02 + 10000),…

blurを繰り返しかける

/** * blur blur blur * * @author aa_debdeb * @date 2016/02/27 */ void setup(){ size(500, 500); frameRate(30); } void initialize(){ background(random(255), random(255), random(255)); stroke(random(255), random(255), random(255)); strokeWeig…

形成と崩壊

/** * Formation And Collapseß * * @author aa_debdeb * @date 2016/02/22 */ int state; ArrayList<Block> blocks; void setup(){ size(500, 500); frameRate(60); stroke(230, 200); fill(192, 200); state = 0; } void draw(){ if(state == 0){ initialize(); s</block>…

ずれた格子

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

月のクレーター

/** * Crater on Moon * * @author aa_debdeb * @date 2016/02/11 */ float radious = 250; ArrayList<Crater> craters; void setup(){ size(500, 500); frameRate(180); background(0); stroke(255, 32); strokeWeight(1); craters = new ArrayList<Crater>(); for(int i = </crater></crater>…

波打つ年輪

/** * Waving Annual Growth Ring * * @author aa_debdeb * @date 2016/02/09 * */ int LOOP_NUM = 40; ArrayList<ArrayList<Vertex>> verticiesList; float time; void setup(){ size(500, 500); frameRate(60); smooth(); time = 0; verticiesList = new ArrayList<ArrayList<Vertex>>(); float</arraylist<vertex></arraylist<vertex>…

2つの波で囲まれた区間

/** * Region Shaped By Two Waves * * @author aa_debdeb * @date 2016/02/07 */ Wave wave1; Wave wave2; void setup(){ size(500, 500); frameRate(30); wave1 = new Wave(); wave2 = new Wave(); } void draw(){ background(0); translate(0, height / 2…

二次元のパーリンノイズを格子状に可視化する

/** * Perlin Noise in Grid * * @author aa_debdeb * @date 2016/02/02 * */ int X = 25; int X_INTERVAL = 20; int Y = 25; int Y_INTERVAL = 20; float noiseX; float noiseY; float noiseT; float noiseXScale; float noiseYScale; float noiseTScale; v…

3本の線影

/** * Three Color Lines * * @author aa_debdeb * @date 2016/01/29 */ ArrayList<Line> lines; void setup(){ size(500, 500); frameRate(30); background(0); lines = new ArrayList<Line>(); lines.add(new Line(color(255, 182, 193, 50))); lines.add(new Line(col</line></line>…

マスクで円を虫食いにする

/** * Uncertain Circle * * @author aa_debdeb * @date 2016/01/23 */ float globalRadious = 200; PGraphics mask; ArrayList<Hole> holes; void setup(){ size(500, 500); smooth(); frameRate(30); noStroke(); mask = createGraphics(width, height); holes =</hole>…

blendModeのADDを使う

Processing3.0が必要。 ADDを使うときは、背景を暗めの色にして、それから明るめの色を足していく。 /** * blendMode Test * * @author aa_debdeb * @date 2016/01/20 * * Processing 3.0 is required for this sketch. */ ArrayList<Field> fields; void setup(){ </field>…

湧き出るひし形

/** * rhombus * * @author aa_debdeb * @date 2016/01/17 */ ArrayList<Frame> frames; void setup(){ size(500, 500); smooth(); frameRate(30); frames = new ArrayList<Frame>(); frames.add(new Frame()); } void draw(){ background(255); translate(width / 2, heig</frame></frame>…

マスクでスケッチを穴あきにする

/** * Hole Mask * * @author aa_debdeb * @date 2016/01/16 */ ArrayList<Particle> particles; ArrayList<Hole> holes; PGraphics mask; void setup(){ size(500, 500); smooth(); frameRate(30); mask = createGraphics(width, height); particles = new ArrayList<Particle>(); for</particle></hole></particle>…

2Dのパリーンノイズをサイケデリックに可視化する

/** * Psychedelic Perlin 2D * * @author aa_debdeb * @date 2016/01/12 */ float noiseX; float noiseY; float noiseT; void setup(){ size(500, 500); frameRate(30); colorMode(HSB, 360, 100, 100); noiseX = random(100); noiseY = random(100); noise…

パーリンノイズで円の大きさに対する周波数を変化させる

/** * 2D Perlin Oscilallator * * @author aa_debdeb * @date 2016/01/10 */ float noiseX, noiseY; ArrayList<Osc> oscs; void setup(){ size(500, 500); smooth(); frameRate(30); noiseX = random(100); noiseY = random(100); oscs = new ArrayList<Osc>(); for(i</osc></osc>…

スノーフォールライト

/** * Snowfall Lights * * @author aa_debdeb * @date 2015/01/09 */ ArrayList<Flow> flows; void setup(){ size(500, 500); smooth(); frameRate(30); background(0); flows = new ArrayList(); for(int i = 0; i < 100; i++){ flows.add(new Flow()); } } void</flow>…

曼荼羅

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

マウスの近くに線を出現させる

/** * Lines * * @author aa_debdeb * @date 2015/01/04 */ ArrayList<Line> lines; void setup(){ size(500, 500); frameRate(30); lines = new ArrayList<Line>(); for(int i = 0; i < 300; i++){ float s1 = random(width); float s2 = random(width); float t = rand</line></line>…