Computational Media – Week 2

Variables… variables… variables

In collaboration with Genevieve Hoffman… we reduced some earlier attempts to a series of very minimal but elegant clocks that seemed reminiscent of the Bauhaus.

Applet and Source

Applet and Source

Applet and Source

/* BAUHAUS CLOCKS - s-m-h-d
By Alex Dodge and Genevieve Hoffman
September 21, 2010 - ITP*/
 
//Sets the current minutes start position
float mc = second()*6; 
//Sets the current hour start position
float hc = ((minute()/60.0)+hour())*30.0; 
//Sets the current day start position
float dc = hour()*15.0;
 
void setup(){
  size(500,500);
  smooth();
  background(255);
  noStroke();
}
 
void draw(){  
 
  //Day Hemisphere
  float d = map(millis(), 0, 86400000, 0, 360);
  fill(0,127,0,50); 
  arc(250,250,400,400,radians(-90+d+dc),radians(90+d+dc));
 
  //Hours Hemisphere
  float h = map(millis(), 0, 3600000, 0, 360);
  fill(255,255,0,50); 
  arc(250,250,300,300,radians(-90+h+hc),radians(90+h+hc));
 
  //Minutes Hemisphere
  float m = map(millis(), 0, 60000, 0, 360);
  fill(0,0,255,50); 
  arc(250,250,200,200,radians(-90+m+mc),radians(90+m+mc));
 
  //Seconds Hemisphere
  float s = map(millis(), 0, 1000, 0, 360);
  fill(255,0,0,50); 
  arc(250,250,100,100,radians(-90+s),radians(90+s));
 
  //semi-opaque matte - creates the fade gradient
  fill(255,255,255,10); 
  rect(0, 0, width, height);
}

This entry was posted in Computational Media, Fall 2010. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">