Thing[] th; float rad; float mx, my, mxold, myold, activity, movelimit; float[] all_active = new float[10]; int arr_count=0; int num = 20; float unit = sqrt(num); void setup (){ size(400,400); background(150); rectMode(CENTER_DIAMETER); framerate(60); noStroke(); rad = width/unit; movelimit = 20; float xnow, ynow; xnow=ynow=rad/2; th = new Thing[num]; for(int i=0;i=width){ xnow=rad/2; ynow+=rad; } } } void loop(){ background(150); for(int i=0;i=all_active.length-1) arr_count=0; float all=0; for(int g=0;g