void setup(){
size(500,500);
frameRate(10);
}
void draw(){
background(255);
float randomness = map(mouseX, 0,width, 0,1);
randomness = constrain(randomness, 0,1);
float randomColors = map(mouseX, 0,width, 0,255);
randomColors = constrain(randomColors, 0,255);
color randomBall = color (255,255,255);
for (int i=1; i < 17; i++){
for (int j=1; j < 17; j++){
float x = (i*30) + randomness * random(-30,30);
float y = (j*30) + randomness * random(-30,30);
ellipseMode(CENTER);
randomBall = color(random(0,randomColors),
random(0,randomColors),random(0,randomColors),100);
float randomSize = 20 + randomness * random(-20,20);
fill(randomBall);
ellipse(x,y,randomSize,randomSize);
}
}
}