int c = int(random(100)); int d = 50; boolean dr = true; int last_change; int delay_sec = 20; void setup() { colorMode(HSB, 100); //size(1280, 800); size(800, 600); background(c, random(40, 100), random(20, 100)); noStroke(); last_change = millis(); } void draw() { if (millis() > last_change + delay_sec*1000) { c = int(random(100)); last_change = millis(); } fill(c, random(40, 100), random(20, 100)); int i = int(random(width/10, width/3)); if (dr) {ellipse(random(width), random(height), i, i);} delay(d); } void keyPressed() { switch(key) { case ' ': c = int(random(100)); break; case 'p': case 'P': dr = !dr; break; } }