int howmany = 50; Circle[] Cir = new Circle[howmany]; void setup () { size(400,500); framerate(30); init_Circles(); } void init_Circles() { for (int i=0;i= 400) { xpos = 400-x_bnd; xspeed *= -1; } else if (xpos-x_bnd <= 0) { xpos = x_bnd; xspeed *= -1; } } void ymove() { ypos += yspeed; if (ypos+y_bnd >= 400) { ypos = 400 - y_bnd; yspeed *= -1; } else if (ypos-y_bnd <= 0) { ypos = y_bnd; yspeed *= -1; } } }