float rx=0, ry=0, rz=1; // view angles PImage wood; float dt=0; int n = 20; BALL B1 = new BALL(), B2 = new BALL(); BALL B[] = new BALL[n]; v3 W[] = new v3[n]; int method = 1; float g=0.05; void setup() { size(600, 600, P3D); sphereDetail(12); textureMode(NORMALIZED); PFont font = loadFont("Courier-14.vlw"); textFont(font, 14); // load font wood = loadImage("floor.jpg"); // load texture for (int i=0; iheight-r)&&(V.y>0.1)) {float dt=(C.y-height+r)/V.y; move(-dt); V.y=-0.95*V.y; move(dt);}; // backs to collision time, turns, & advances if((C.x>width-r)&&(V.x>0)) V.x=-V.x; if((V.x<0)&&(C.x300-r)&&(V.z>0)) V.z=-V.z; if((V.z<0)&&(C.z<-300+r)) V.z=-V.z; } } // end BALL class void row () {for (int i=0; i