As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Saturday, October 6, 2018

Processing Experiment: Mouse 2D Remixed

For this experiment, I changed the size of the window, the shape of the objects, and the colors of all elements. At first I was confused by void setup(), thinking it was the individual elements and not the entire window. I also learned that the colors are all done in RGBA, so I was able to make the colors lighter and more friendly than the original.


Remixed code:

/**  * Mouse 2D.
 *
 * Moving the mouse changes the position and size of each box.
 */

void setup() {
  size(720, 720);
  noStroke();
  rectMode(CENTER);
}

void draw() {
  background(245);
  fill(255, 204, 55, 200);
  ellipse(mouseX, height/2, mouseY/2+10, mouseY/2+10);
  fill(50, 204, 255, 200);
  int inverseX = width-mouseX;
  int inverseY = height-mouseY;
  ellipse(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10);
}

No comments:

Post a Comment