// Dartmouth CS 2, Winter 2009, Chris Bailey-Kellogg // Notes 13 | Sketch 5 // Based on Processing example Topics | Simulate | SmokeParticleSystem int num = 100; // total number of particles int curr = 1; // how many are active Particle[] particles = new Particle[num]; Random generator = new Random(); float wind = 0; // additional x increment void setup() { size(200,200); smooth(); background(0); frameRate(30); // From the referenced Processing example // Create an alpha masked image to be applied as the particle's texture PImage msk = loadImage("texture.gif"); PImage img = new PImage(msk.width,msk.height); for (int i = 0; i < img.pixels.length; i++) img.pixels[i] = color(255); img.mask(msk); // Create the particles for (int i=0; i