NaranS_DMA2016_Processing/map_code/map_code.pde
// Sets the background gray value based on the distance 
// of the mouse from the center of the screen
void setup() {
  size(300,300);
}

void draw() {
  noStroke();
  float d = dist(width/2, height/2, mouseX, mouseY);
  float maxDist = dist(0, 0, width/2, height/2);
  float gray = map(d, 0, maxDist, 0, 255);
  fill(gray);
  rect(0, 0, width, height);
}