//Justin Faria "Data Culture Assignment 2" //11/1/07 // This is based off the basic loop program from the processing //website. I've changed the lines to rectangles and the modified //the loop control so that it is controled by the duration per //mouse click. // In short this program operates via a click principle, so that //while either of the mouse buttons is being held down the //rectagles move. Once the mouse button is released they stop. // I have replaced the standard dark grey background with an //array which to make it a little more interesting. However the //array slows the framerate somewhat, however to compensate you //can control the timing. Comments on the the coding are found //under the the section of code. float[][] distances; float maxDistance; // distance measure for the background array void setup() { size (400, 400); stroke (255); noLoop(); frameRate(90); } float y = 400; //setting the basic perameters for the program objects void draw() { background(0); maxDistance = dist(width/2, height/2, width, height); distances = new float[width][height]; for(int i=0; i