Daily Creative Coding

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

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

レスラーアトラクター

/** * Rossler Attractor * * @author aa_debdeb * @date 2016/01/31 */ float param1 = 0.2; float param2 = 0.2; float param3 = 5.7; float time; float timeStep; float x, y, z; int c1 = color(240, 248, 255); int c2 = color(70, 130, 180); void se…

小さな虫の集まりみたいなパーティクル

/** * Flies * * @author aa_debdeb * @date 2016/01/30 */ ArrayList<Particle> particles; void setup(){ size(300, 300); particles = new ArrayList<Particle>(); for(int i = 0; i < 1000; i++){ particles.add(new Particle()); } } void draw(){ background(0); noStroke(</particle></particle>…

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

輝き

/** * Shine * * @author aa_debdeb * @date 2016/01/28 */ ArrayList<Line> lines; void setup(){ size(500, 500); noLoop(); colorMode(HSB, 360, 100, 100); lines = new ArrayList<Line>(); for(int i = 0; i < 3000; i++){ lines.add(new Line()); } background(0);</line></line>…

ヘノンアトラクター

/** * Henon Attractor * * @author aa_debdeb * @date 2016/01/27 */ float alpha = 1.4; float beta = 0.3; float x, y; void setup(){ size(500, 500); smooth(); frameRate(360); background(0); x = map(random(1), 0, 1, -0.1, 0.1); y = map(random(1…

ローレンツアトラクター

/** * Lorenz Attractor * * @author aa_debdeb * @date 2016/01/26 */ float time; float timeStep; float x, y, z; int c1 = color(240, 248, 255); int c2 = color(70, 130, 180); void setup(){ size(500, 500, P3D); smooth(); frameRate(360); sphereD…

円の中で光を反射させる

/** * Reflection of Light in Circle * * @author aa_debdeb * @date 2016/01/25 * */ float lradious = 200; float sradious = 5; ArrayList<Particle> particles; void setup(){ size(500, 500); frameRate(60); smooth(); background(0); particles = new ArrayList<Particle></particle></particle>…

円の中での反射

/** * Reflection in Circle * * @author aa_debdeb * @date 2016/01/24 * */ float lradious = 200; float sradious = 5; ArrayList<Particle> particles; void setup(){ size(500, 500); frameRate(30); smooth(); particles = new ArrayList<Particle>(); for(int i = 0; i < </particle></particle>…

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

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

2つの波の重なり

/** * Two Pulse * * @author aa_debdeb * @date 2016/01/22 */ void setup(){ size(500, 500); frameRate(30); } void draw(){ background(0); noFill(); strokeWeight(3); for(float i = 0; i <= 1.0; i += 0.01){ float r = map(i, 0, 1, 0, 500 * sqrt(2…

絡み取られた球

/** * Entwined Sphere * * @author aa_debdeb * @date 2016/01/21 */ float radious = 150; void setup(){ size(500, 500, P3D); smooth(); sphereDetail(16); background(0); translate(width / 2, height / 2); float px = radious * sin(0) * cos(0); fl…

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

ペンキをとばす

マウスをクリックする。 /** * 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>…

湧き出るひし形

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

車輪の回転

/** * Wheel Rotation * * @author aa_debdeb * @date 2016/01/15 */ void setup(){ size(500, 500); frameRate(30); smooth(); } void draw(){ background(255); fill(220, 20, 60); noStroke(); float posRad = frameCount * 0.3; float posR = 100; trans…

円で多角形

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

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…

エネルギーを拡散させるセルオートマトン

/** * Cellular Automata for Diffusion * * @author aa_debdeb * @date 2016/01/11 * */ ArrayList<Cell> cells; void setup(){ size(500, 500); smooth(); frameRate(30); colorMode(HSB, 360, 100, 100); Cell[][] cellArray = new Cell[50][50]; for(int y = 0</cell>…

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

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

渦巻く花

/** * Vortical Flower * * @author aa_debdeb * @date 2016/01/08 */ void setup(){ size(500, 500); smooth(); frameRate(60); noStroke(); } void draw(){ float time = frameCount * 0.01; background(0); translate(width/2, height/2); for(int angle …

宇宙

/** * Universe * * @author aa_debdeb * @date 2016/01/07 */ void setup(){ size(640, 480); smooth(); noLoop(); background(30); colorMode(HSB, 360, 100, 100, 100); float noiseX = random(100); float noiseY = random(100); for(int i = 0; i < 200…

カメラから取得した画像を立方体のテクスチャにする

/** * Texture by Camera * * @author aa_debdeb * @date 2016/01/06 */ import processing.video.*; Capture camera; void setup(){ size(500, 500, P3D); camera = new Capture(this, 480, 360); camera.start(); } void draw(){ background(255); transla…

曼荼羅

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

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

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

泳ぐパーティクル

/** * Swimmer * * @author aa_debdeb * @date 2016/01/02 */ ArrayList<Swimmer> swimmers; void setup(){ size(500, 500); smooth(); frameRate(30); swimmers = new ArrayList<Swimmer>(); for(int i = 0; i < 50; i++){ swimmers.add(new Swimmer()); } } void draw(){ bac</swimmer></swimmer>…