//modify the code form Shiffman's "Human" & REAS's "Patterns". splash[] splashs= new splash[200]; int total = 0; color somecolor = color(random(255), random(255, 30), random(255,128), 180); int maxSpeed; void setup() { size(400, 400); noStroke(); smooth(); /* for (int i = 0; i < splashs.length; i++) { color somecolor = color(random(255), random(255, 30), random(255,128), 180); splashs[i] = new splash(random(30), somecolor); }*/ } void draw() { // background(0); for (int i = 0; i < total; i++) { splashs[i].render(); // begin draw when mouse pressed. /*if (mousePressed) { splashs[i].variableEllipse(mouseX, mouseY, pmouseX, pmouseY); }*/ } } void mousePressed() { color somecolor = color(random(255), random(255), random(255), 180); splashs[total] = new splash(random(30), somecolor); total = total + 1; if (total == splashs.length) { total = 0; } }