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

Daily Creative Coding

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

パーティクル

円の交点

/** * intersection points of circles * * @author aadebdeb * @date 2017/03/04 */ var circles; function setup() { createCanvas(windowWidth, windowHeight); circles = []; for (var i = 0; i < 30; i++) { circles.push(new Circle()); } } function …

filter(ERODE)で削られていくリング

/** * eroded ring * * @author aadebdeb * @date 2017/02/27 */ var particles; function setup() { createCanvas(500, 300); frameRate(3); particles = []; for (var i = 0; i < 1000; i++) { particles.push(new Particle()); } background(0); noStroke…

三角形の鳥群

/** * triangle birds * * @author aadebdeb * @date 2017/02/17 */ var particles; var fillColors; function setup() { createCanvas(windowWidth, windowHeight); fillColors = [ color(113, 199, 209), color(212, 211, 202), color(230, 26, 105) ]; fr…

水面から飛び出るパーティクル

/* * particles from water * * @author aa_debdeb * @date 2016/12/26 */ float gravity = 0.15; ArrayList<Particle> particles; color c1 = color(173, 216, 230); color c2 = color(100, 149, 237); void setup(){ size(480, 360); noStroke(); particles = new Ar</particle>…

ピョンピョン跳ねるパーティクル

/** * hopping particles * * @author aa_debdeb * @date 2016/12/07 */ float MAX_VEL = 10; ArrayList<Particle> particles; void setup(){ size(640, 640); particles = new ArrayList<Particle>(); for(int i = 0; i < 50; i++){ particles.add(new Particle()); } } void dr</particle></particle>…

火花

/** * sparks * * @author aa_debdeb * @date 2016/11/28 */ float MAX_VEL = 5; float MAX_SIZE = 8.0; ArrayList<Particle> particles; void setup(){ size(640, 640); noCursor(); noStroke(); particles = new ArrayList<Particle>(); background(0); } void draw(){ fill(0,</particle></particle>…

マウスでエネルギーを与えることができるパーティクル

/** * energizable particles * * @author aa_debdeb * @date 2016/11/27 */ ArrayList<Particle> particles; color c1 = color(79, 208, 255); color c2 = color(255, 127, 80); void setup(){ size(640, 640); particles = new ArrayList<Particle>(); for(int i = 0; i < 15; </particle></particle>…

溢れるパーティクル

/** * spilled particles * * @author aa_debdeb * @date 2016/11/26 */ float MAX_VEL = 15; float MAX_SIZE = 10.0; float GRAVITY = 1.0; ArrayList<Particle> particles; void setup(){ size(640, 640); particles = new ArrayList<Particle>(); } void draw(){ fill(0, 100)</particle></particle>…

パーティクルの衝突に合わせて音を鳴らす

/** * sound by particle's crash * * @author aa_debdeb * @date 2016/11/09 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim mi…

ネットワーク上を動き回る点

/** * movers on network * * @author aa_debeb * @date 2016/10/07 */ int num = 8; float radious = 200; ArrayList<Node> nodes; ArrayList<Mover> movers; color c; void setup(){ size(640, 640); mousePressed(); } void mousePressed(){ nodes = new ArrayList<Node>(); </node></mover></node>…

パーティクルの花

/** * flower of particles * * @author aa_debdeb * @date 2016/09/18 */ ArrayList<Particle> particles; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); particles = new ArrayList<Particle>(); for(int i = 0; i < 50; i++){ particles.add(new Particle())</particle></particle>…

円同士の衝突と反射

/** * collision of circles * * @author aa_debdeb * @date 2016/09/10 */ float e = 1.0; ArrayList<Particle> particles; void setup(){ size(640, 640); fill(255, 105, 180); stroke(255, 153, 204); strokeWeight(3); particles = new ArrayList<Particle>(); while(partic</particle></particle>…

漂う発光体

/** * floating illuminants * * @author aa_debdeb * @date 2016/09/04 */ ArrayList<Particle> particles; void setup(){ size(640, 640); noStroke(); particles = new ArrayList<Particle>(); } void draw(){ background(0); ArrayList<Particle> nextParticles = new ArrayList<Particle>(); for</particle></particle></particle></particle>…

パーティクルでいろいろな形をつくる

/** * morph by particles * * @author aa_debdeb * @date 2016/08/19 */ int state = 0; ArrayList<Particle> particles; void setup(){ size(500, 500, P3D); particles = new ArrayList<Particle>(); for(int i = 0; i < 5000; i++){ particles.add(new Particle()); } } void</particle></particle>…

パーティクルで構成された球

/** * sphere composed of particles * * @author aa_debdeb * @date 2016/08/18 */ float scale = 100; float phi = (1 + sqrt(5)) / 2.0; ArrayList<Particle> particles; void setup(){ size(500, 500, P3D); PVector[] vertices = {new PVector(0, 1, phi), new PV</particle>…

二色のメタボール

/** * two-color metaballs * * @author aa_debdeb * @date 2016/08/07 */ int num = 20; ArrayList<Particle> particles; int cellNum = 200; float cellSize = 2; float[][] cells; color c1 = color(255, 140, 0); color c2 = color(0, 242, 255); void setup(){ si</particle>…

渦の中のパーティクル

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

メタボール(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>…

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

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

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

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

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

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

反射と分裂

/** * reflection and fragmentation * * @author aa_debdeb * @date 2016/05/24 */ ArrayList<Particle> particles; float gravity = -0.1; void setup(){ size(500, 500, P3D); particles = new ArrayList<Particle>(); sphereDetail(16); } void draw(){ background(0); trans</particle></particle>…

マウスを追いかけるパーティクル(3D)

/** * particles following mouse in 3D * * @author aa_debdeb * @date 2016/05/18 */ float MAX_VEL = 20.0; float MAX_ACC = 1.0; ArrayList<Particle> particles; void setup(){ size(640, 640, P3D); sphereDetail(16); particles = new ArrayList<Particle>(); for(int i =</particle></particle>…

パーティクルの視点

/** * view from a particle * * @author aa_debdeb * @date 2016/05/16 */ Particle cP; ArrayList<Particle> particles; float radious = 5; void setup(){ size(500, 500, P3D); cP = new Particle(); particles = new ArrayList<Particle>(); for(int i = 0; i < 100; i++){ </particle></particle>…

円から産まれるパーティクル

/** * particles from eggs * * @author aa_debdeb * @date 2016/04/07 */ float P_RADIOUS = 7; float radious; ArrayList<Particle> particles; void setup(){ size(500, 500); noStroke(); radious = 0; particles = new ArrayList<Particle>(); } void draw(){ background(#F</particle></particle>…

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

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

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

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

パーティクルによる図形

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

血管

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

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

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

追うパーティクル、追われるパーティクル

/** * Following Particles, Followed Particles * * @author aa_debdeb * @date 2016/02/29 */ int PARTICLE_NUM = 1000; float PARTICLE_RADIOUS = 1.5; float PARTICLE_MAX_SPEED = 10.0; float PARTICLE_MAX_ACCELERATION = 1.0; float PARTICLE_SPEED_V…

パーティクルの軌跡

/** * Trail of Particles * * @author aa_debdeb * @date 2016/02/28 */ int PARTICLE_NUM = 1000; float PARTICLE_RADIOUS = 1.5; float PARTICLE_MAX_SPEED = 10.0; float PARTICLE_MAX_ACCELERATION = 1.0; float PARTICLE_SPEED_VARIANT = 0.1; ArrayLi…

パーティクルで色のついた三角形

/** * Colored Triangles by Particles * * @author aa_debdeb * @date 2016/02/26 */ ArrayList<Particle> particles; void setup(){ size(500, 500); frameRate(30); noStroke(); particles = new ArrayList<Particle>(); for(int i = 0; i < 100; i++){ particles.add(new Par</particle></particle>…

パーティクルで三角形

/** * Triangles by Particles * * @author aa_debdeb * @date 2016/02/25 */ ArrayList<Particle> particles; void setup(){ size(500, 500); frameRate(30); fill(255, 100); noStroke(); particles = new ArrayList<Particle>(); for(int i = 0; i < 100; i++){ particles.add</particle></particle>…

2つの輪を泳ぐパーティクル

/** * Particles in Two Rings * * @author aa_debdeb * @date 2016/02/12 */ ArrayList<Particle> particles; PVector center1, center2; float radious; void setup(){ size(600, 400); frameRate(30); noStroke(); background(0); center1 = new PVector(200, heigh</particle>…

ちらつくパーティクル

/** * Flies in Center * * @author aa_debdeb * @date 2016/02/05 */ ArrayList<Particle> particles; void setup(){ size(500, 500); frameRate(30); particles = new ArrayList<Particle>(); for(int i = 0; i < 1000; i++){ particles.add(new Particle()); } } void draw(){</particle></particle>…

擬似3Dパーティクル

/** * Like 3D * * @author aa_debdeb * @date 2016/02/04 */ ArrayList<Particle> particles; void setup(){ size(500, 500); smooth(); frameRate(30); particles = new ArrayList<Particle>(); for(int i = 0; i < 300; i++){ particles.add(new Particle()); } } void draw()</particle></particle>…

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

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

円の中で光を反射させる

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

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

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

音量に応じてパーティクルにノイズを加える

/** * Particles Controlled by Sound * * @author aa_debdeb * @date 2015/12/23 */ import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.effects.*; import ddf.minim.signals.*; import ddf.minim.spi.*; import ddf.minim.ugens.*; int …