// Based on code 31-03 (p. 281) Spot[] sps = new Spot[36]; void setup() { size(750, 2775); //size(200, 200); smooth(); noStroke(); ellipseMode(CENTER_RADIUS); randomSeed(0); for(int i=0; i width-radius) || (x < radius)) { directionX = -directionX; // Change direction } y += speedY * directionY; if ((y > height-radius) || (y < radius)) { directionY = -directionY; // Change direction } } }