// tools to create and edit discks int maxn = 10000; // max number of discks int n=103; // current number of disks pt [] P = new pt[maxn]; // points: disk centers vec [] F = new vec[maxn]; // forces: for distributing discks float [] R = new float[maxn]; // radii of disks boolean [] visible = new boolean[maxn]; // visibility status of disks boolean [] touched = new boolean[maxn]; // status indicating whether a disk has been touched during computation of visibile disks float r = 8; int p=0; // index to the selected point being dragged float clr = 4; // desired clearance around disks void declare() {for (int i=0; iheight-clr/2) F.add((height-clr/2-myRay.Q.x)/2.,0); if (myRay.Q.y>height-clr/2) F.add(0,(height-clr/2-myRay.Q.y)/2.); for (int j=0; jheight-clr-R[i]) F[i].add((height-clr-R[i]-P[i].x)/3.,0); for (int i=0; iheight-clr-R[i]) F[i].add(0,(height-clr-R[i]-P[i].y)/3.); for (int i=0; i