Random circles using arrays

try

void draw() {
  background(255);
  fill(0);
  text(nf(frameRate,1,1),width-100,20);
  noFill();
  generateCircles(myArr);
}

to see your actual frame rate.
and

  frameRate(0.5);

in setup to change it.

  1. drawing a circle on mouseclick would be
void mousePressed() {
 ellipse(mouseX, mouseY, 10, 10); 
}

could be a idea, but just for 1/60 sec
as the background erases it / anyhow not the job ? at start?? mouse position

  1. yes,
  • you draw many circles at the same position with generateCircles
  • you draw these 60 times per second so it looks like they are jumping around
    but if you disable background you see 60 times this concentric circles add up per second…

so over all you add 2 * 60 * ?50? circles
instead 1
every 2 secs

1 Like