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.

Wednesday, April 10, 2013

Processing: Maddie Eiden + Candice Adams

We chose to play around with the Processing example file called Noise1D. Eventually we found something we liked and in the process were able to grasp a very basic understanding of some of the different components of the code and which values have greater influence over others on the final product.





/**
 * Noise1D.
 *
 * Using 1D Perlin Noise to assign location.
 */

float xoff = 0.0;
float xincrement = 0.5;

void setup() {
  size(400,400);
  background(0);
  frameRate(5);
  smooth();
  noStroke();
}

void draw()
{
  // Create an alpha blended background
  fill(140, 80);
  rect(50,50,width,height);
 
  //float n = random(0,width);  // Try this line instead of noise
 
  // Get a noise value based on xoff and scale it according to the window's width
  float n = noise(xoff)*width;
 
  // With each cycle, increment xoff
  xoff += xincrement;
 
  // Draw the ellipse at the value produced by perlin noise
  fill(200);
  ellipse(n,height/2,160,200);
}

No comments:

Post a Comment