Daily Creative Coding

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

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

彩度と明度

/** * brightness & saturation * * @author aa_debdeb * @date 2016/03/31 */ float step = 2; void setup(){ size(500, 500); colorMode(HSB, 360, 100, 100); noStroke(); } void draw(){ float rad = atan2(mouseY - height / 2, mouseX - width / 2); f…

補色

/** * complementary color * * @author aa_debdeb * @date 2016/03/30 * */ ArrayList<PVector> ps1; ArrayList<PVector> ps2; color bgc, pc1, pc2; void setup(){ size(640, 480); noStroke(); colorMode(HSB, 360, 100, 100); ps1 = new ArrayList<PVector>(); for(int i = 0; i < 7</pvector></pvector></pvector>…

HSB色空間

/** * HSB * * @author aa_debdeb * @date 2016/03/29 */ float angStep = 1.0; void setup(){ size(500, 500); noStroke(); colorMode(HSB, 360, 100, 100); } void draw(){ translate(width / 2, height / 2); for(float ang = 0; ang < 360; ang += angSt…

カラーパレット

/** * color mosaic * * @author aa_debdeb * @date 2016/03/28 */ void setup(){ size(500, 500); noStroke(); mousePressed(); } void draw(){ } void mousePressed(){ float hcenter, hwidth, smin, smax, bmin, bmax; hcenter = random(360); hwidth = r…

線の波

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

重なる市松模様

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

延々と現れるカラフルな三角形

/** * Endless Color Triangles * * @author aa_debdeb * @date 2016/03/25 */ ArrayList<Triangle> triangles; void setup(){ size(500, 500); colorMode(HSB, 360, 100, 100); triangles = new ArrayList<Triangle>(); Triangle root = new Triangle(); triangles.add(root); f</triangle></triangle>…

延々と現れる三角形

/** * Endless Triangles * * @author aa_debdeb * @date 2016/03/24 */ ArrayList<Triangle> triangles; void setup(){ size(500, 500); stroke(255); strokeWeight(1); noFill(); triangles = new ArrayList<Triangle>(); Triangle root = new Triangle(); triangles.add(root)</triangle></triangle>…

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

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

円のタイル

/** * circular filled tile * * @author aa_debdeb * @date 2016/03/22 */ int CELL_NUM = 25; int CELL_SIZE = 20; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(2…

弧と円のタイル

/** * circular tile * * @author aa_debdeb * @date 2016/03/21 */ int CELL_NUM = 25; int CELL_SIZE = 20; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255)); s…

斜め格子迷路

/** * maze cross tiles * * @author aa_debdeb * @date 2016/03/20 */ int CELL_NUM = 50; int CELL_SIZE = 10; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255))…

格子迷路

/** * maze tiles * * @author aa_debdeb * @date 2016/03/19 */ int CELL_NUM = 50; int CELL_SIZE = 10; void setup(){ size(500, 500); mousePressed(); } void draw(){ } void mousePressed(){ background(random(255), random(255), random(255)); stro…

誘引・反発されるパーティクルの軌跡

/** * color drawing by attractor and repulser * * @author aa_debdeb * @date 2016/03/18 */ float G = 1.0; ArrayList<Particle> particles; ArrayList<Attractor> attractors; void setup(){ size(640, 640); frameRate(60); particles = new ArrayList<Particle>(); for(int i = 0; i </particle></attractor></particle>…

誘引・反発されるパーティクルの軌跡

/** * drawing by attractor and repulser * * @author aa_debdeb * @date 2016/03/17 */ float G = 1.0; ArrayList<Particle> particles; ArrayList<Attractor> attractors; void setup(){ size(640, 640); frameRate(120); particles = new ArrayList<Particle>(); for(int i = 0; i < 300</particle></attractor></particle>…

ライン・ブラインド

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

リパルサーに反発するパーティクルの軌跡

/** * drawing by repulser * * @author aa_debdeb * @date 2016/03/15 */ float G = 1.0; ArrayList<Particle> particles; ArrayList<Attractor> attractors; void setup(){ size(640, 640); frameRate(60); particles = new ArrayList<Particle>(); for(int i = 0; i < 300; i++){ particl</particle></attractor></particle>…

アトラクターに誘引されるパーティクルの軌跡

/** * drawing by attractors * * @author aa_debdeb * @date 2016/03/14 */ float G = 1.0; ArrayList<Particle> particles; ArrayList<Attractor> attractors; void setup(){ size(640, 640); frameRate(60); particles = new ArrayList<Particle>(); for(int i = 0; i < 300; i++){ parti</particle></attractor></particle>…

カラールーレット

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

パーティクルによる図形

/** * Shape by Particles * * @author aa_debdeb * @date 2016/03/12 */ int PARTICLE_NUM = 15; float PARTICLE_RADIOUS = 1.5; float PARTICLE_MAX_SPEED = 6.0; float PARTICLE_MAX_ACCELERATION = 0.4; float PARTICLE_IMPACT_SPEED = 300; float PARTI…

引っかき傷

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

カメラから取得した映像をラインで表現する

/** * Line Camera * * @author aa_debdeb * @date 2016/03/10 */ import processing.video.*; int pointNum = 1500; float nearDist = 50; PVector[] points; boolean[][] distMap; Capture camera; void setup(){ size(640, 480); points = new PVector[po…

リサージュ図形

/** * Lissajous figure * * @author aa_debdeb * @date 2016/03/09 */ void setup(){ size(500, 500); frameRate(180); background(0); stroke(255, 50); strokeWeight(1); } void draw(){ float x = map(sin(frameCount * 0.0334435), -1, 1, 0, width); f…

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

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

斜めのタイル

/** * skew tile * * @author aa_debdeb * @date 2016/03/07 */ void setup(){ size(500, 500); noLoop(); background(255); stroke(0); strokeWeight(10); int step = 25; for(int w = 0; w < width; w += step){ for(int h = 0; h < height; h += step){ i…

血管

/** * blood vessels * * @author aa_debdeb * @date 2016/03/06 */ ArrayList<Particle> particles; float radianNoiseX, radianNoiseY; void setup(){ size(640, 640); particles = new ArrayList<Particle>(); for(int i = 0; i < 1000; i++){ particles.add(new Particle());</particle></particle>…

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

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

パーティクルの流れ

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

回転する重なった円

/** * rotating circles * * @author aa_debdeb * @date 2016/03/03 */ void setup(){ size(500, 500); frameRate(30); stroke(0); strokeWeight(1); } void draw(){ background(255); translate(width / 2, height / 2); rotate(frameCount * 0.3); for(flo…

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

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