//***************************************************************************** // TITLE: Project 1 (template) // DESCRIPTION: Prediction // AUTHOR: Prof Jarek Rossignac // DATE CREATED: January 20. 2008 // EDITS: //***************************************************************************** boolean showText = true; // toggled by pressing the 'h'key to show/hide help text boolean printIt=false; // temporarily set when the '?' key is pressed and used to print some debugging values int n=4; // number of points pt [] PP = new pt[n]; // decalres an array of n points int p=0; // index to the point being dragged color red, yellow, green, cyan, blue, magenta, dred, dyellow, dgreen, dcyan, dblue, dmagenta, white, black, orange, grey, metal; // declares colors void setup() { size(600, 600); smooth(); colorMode(HSB,121); strokeJoin(ROUND); strokeCap(ROUND); // set up window and drawing modes red = color(0, 120, 120); yellow = color(20, 120, 120); green = color(40, 120, 120); cyan = color(60, 120, 120); blue = color(80, 120, 120); magenta = color(100, 120, 120); dred = color(0, 120, 60); dyellow = color(20, 120, 60); dgreen = color(40, 120, 60); dcyan = color(60, 120, 60); dblue = color(80, 120, 60); dmagenta = color(100, 120, 60); white = color(0, 0, 120); black = color(0, 120,0); grey = color(0, 120,60); orange = color(10, 100, 120); metal = color(70, 60, 100); PFont font = loadFont("Courier-14.vlw"); textFont(font, 14); // load font for (int i=0; i