PImage[] imgs = new PImage[4]; // loaded images PImage img; // current image int curImg = 0; // current image Wanderer[] particles; void setup() { size(300,450); smooth(); for(int i = 0; i < imgs.length; i ++) imgs[i] = loadImage("img-"+(i+1)+"-tiny.jpg"); img = imgs[curImg]; // start it up startParticles(); } void startParticles() { // get the ratio size between the image and the screen float r = (0.5*width)/img.width; // Create a particle for each pixel particles = new Wanderer[img.height*img.width]; int i = 0; // which ball to add next for (int y=0; y