// Henry DeBey
// Exercise 3c.
// 11. 15. 04 

float[] mx;
float[] my;
float temp; 
 
void setup() { 
  size(300, 300); 
  background(255);
  mx = new float[width];
  my = new float[width]; 
  framerate(60);  
} 
 
void draw() 
{ 
    //rands[0] = mouseX; 
    for(int i=width-1; i>=1; i--) { 
    mx[i] = mouseX/i; 
    my[i] = mouseY;
  } 
  
  for(int i=0; i<width; i++) 
  {
    temp = (mx[i]/300)*255;  //finds a percentage of the screen and makes it a percentage of 255  

    if(mousePressed == true) 
    {noStroke();
     rect(0, 0, 300, 300);} 
    else
    {stroke(temp, 240, 240);}
    line(mouseX, 220, mouseX, 0);
    line(mouseX*4, 100, mouseX*4, 280);
    stroke(temp, 20, 40);
    line(mouseX*2, 120, mouseX*2, 90);
    line(mouseX, 230, mouseX, 190);  
    stroke(temp, 250, 60);
    line(mouseX*3, 270, mouseX*3, 50);
    line(mouseX, 300, mouseX, 90);
  }
  
}
Exercise 3.C: Gesture
Write a program which records data from the mouse into an array and converts this data into visual form. Either record and display the data continuously or build a structure for separate recording and playback modes.