Daily Creative Coding

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

2016-06-01から1ヶ月間の記事一覧

波模様

/** * pattern of waves * * @author aa_debdeb * @date 2016/06/30 */ float margin = 50; float radious = 15; float theta = 120; color bg, sc; void setup(){ size(500, 500); noFill(); strokeWeight(3); mousePressed(); } void mousePressed(){ bg =…

ペンローズ・タイル

/** * Penrose Tiling * * @author aa_debdeb * @date 2016/06/29 */ float e = 400; color c1, c2; float phi = (1.0 + sqrt(5)) / 2.0; ArrayList<Triangle> triangles; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ trian</triangle>…

ペンローズの三角形(影付き)

/** * Penrose Triangle with Shadow * * @author aa_debdeb * @date 2016/06/28 */ color bg, c1, c2, c3; float e = 70; float w = 75; void setup(){ size(500, 500); stroke(0); strokeWeight(1); colorMode(HSB, 360, 100, 100); mousePressed(); } voi…

ペンローズの三角形

/** * Penrose Triangle * * @author aa_debdeb * @date 2016/06/27 */ color bg, sc, c1, c2, c3; float e = 110; float w = 60; void setup(){ size(500, 500); strokeWeight(1); mousePressed(); } void mousePressed(){ bg = color(random(255), random(…

パーリンノイズで音程と音量を制御する(Minim)

/** * sound conrolled by perlin noise * * @author aa_debdeb * @date 2016/06/26 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Mi…

メタボール(Marching Squaresアルゴリズム)

/** * metaballs (Marching Squares algorithm) * * @author aa_debdeb * @date 2016/06/25 */ int num = 10; ArrayList<Particle> particles; int cellNum = 50; float cellSize = 10; float[][] cells; void setup(){ size(500, 500); cells = new float[cellNum + 1</particle>…

メタボール(低解像度版)

/** * metaballs (low resolution) * * @author aa_debdeb * @date 2016/06/24 */ int num = 10; ArrayList<Particle> particles; int cellNum = 100; float cellSize = 5; float[][] cells; void setup(){ size(500, 500); cells = new float[cellNum + 1][cellNum + </particle>…

メタボール

/** * metaballs * * @author aa_debdeb * @date 2016/06/23 */ int num = 5; float radious = 50; ArrayList<PVector> locs; ArrayList<PVector> vels; float threshold = 2.0; float goo = 1.0; void setup(){ size(500, 500); locs = new ArrayList<PVector>(); vels = new ArrayList<PVector></pvector></pvector></pvector></pvector>…

斜めタイル

/** * skew tiling * * @author aa_debdeb * @date 2016/06/22 */ float e = 20; float theta = PI / 4; float margin = 50; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ fill(random(255), random(255), random(…

斜め交互タイル

/** * skew alternate tiling * * @author aa_debdeb * @date 2016/06/21 */ float e = 20; float theta = PI / 4; float margin = 50; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ fill(random(255), random(255…

球を段々と構築する

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

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

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

斥力を働かせ合う円の中のパーティクル

/** * particles with reputation in circle * * @author aa_debdeb * @date 2016/06/16 */ float G = 1000.0; float MAX_VEL = 5.0; float MAX_ACC = 1.0; float L_RADIOUS = 200; float S_RADIOUS = 10; ArrayList<Particle> particles; void setup(){ size(500, 500</particle>…

斥力を働かせ合うパーティクル(壁からも斥力)

/** * particles with reputation (walls are also repulsive) * * @author aa_debdeb * @date 2016/06/15 */ float G = 1000.0; float MAX_VEL = 5.0; float MAX_ACC = 1.0; ArrayList<Particle> particles; void setup(){ size(500, 500); particles = new ArrayList<Particle></particle></particle>…

斥力を働かせ合うパーティクル

/** * particles with repultion * * @author aa_debdeb * @date 2016/06/14 */ float G = 200.0; float MAX_VEL = 5.0; float MAX_ACC = 1.0; ArrayList<Particle> particles; void setup(){ size(500, 500); particles = new ArrayList<Particle>(); } void draw(){ background</particle></particle>…

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

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

円の中のパーティクル間を線で結ぶ

/** * line drawers in circle * * @author aa_debdeb * @date 2016/06/11 */ float maxRadious = 200; float minVel = 0.5; float maxVel = 1.0; ArrayList<Particle> particles;; void setup(){ size(500, 500); frameRate(180); background(220); colorMode(HSB, 36</particle>…

円を取り囲む線

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…

賽形模様(Cube Pattern)

/** * pattern of pseudo 3d cubes * * @author aa_debdeb * @date 2016/06/09 */ color c1, c2, c3; float e = 30.0; void setup(){ size(500, 500); noStroke(); mousePressed(); } void draw(){ boolean isDisplayed = false; for(float y = -50; y < hei…

球を囲む輪

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

柔らかい発光体

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

ぐるぐる回る輪

/** * looper * * @author aa_debdeb * @date 2016/06/05 */ int num = 100; void setup(){ size(500, 500); noStroke(); background(0); } void draw(){ fill(0, 30); rect(0, 0, width, height); fill(255, 140, 0, 50); translate(width / 2, height / 2)…

弧で歩く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>…