//// x5: collisions //// CST 112 day 10/9/2015 //// author Yixing Tao //// GLOBALS: pool table, 3 colored balls String title= "COLLISIONS (x5.java)"; String news= "Use 'r' key to restet."; String author= "Yixing Tao"; float let, right, top ,bottom; float middle; float blax, blay, blaDx, blaDy; float yelx, yely, yelDx, yelDy; float redx, redy, redDx, redDy; float bluX, bluY, bluDX, bluDY; ////SETUP: size and table void setup() { size( 600, 400 ); left= 60; right= width-60; top= 100; bottom= height-40; middle= left - (right-left)/2; // reset(); } void reset() { blax= le