float r; float g; float b; float mx; float my; void setup() { size(400,500); frameRate(60); smooth(); } void draw() { background(255); mx = mouseX; my = mouseY; drawCircle(width/2,height/2,mx,my); } void drawCircle(float x, float y, float radius,float ypos) { r = 20; g = 20; b = 20; if (mousePressed) { r = random(20,220); g = random(20,220); b = random(20,220); } stroke(0); fill(r,g,b,75); ellipse(x,y,radius,ypos); if(radius > 40) { drawCircle(x + radius/2, y, radius/2, ypos/2); drawCircle(x - radius/2, y, radius/2, ypos/2); drawCircle(x, y + radius/2, radius/2, ypos/2); drawCircle(x, y - radius/2, radius/2, ypos/2); } }