Program TIME

Create a clock that communicates the passage of time through graphical quantity or imagery rather than numerical symbols.


basic clock:


int s,m,h;
String time;
PFont myfont;

int x = 65;
int y = 60;

void setup() {
size(300,100);
myfont = loadFont("Garamond-48.vlw"); textFont(myfont);

}

void draw() { background(0);

s = second();
m = minute();
h = hour();

time = h + ":" + m + ":" + s;

text(time,x,y);

}


line clock:


void setup() {

size(100,100); stroke(255);

}

void draw () {
background(0);
float s = map(second(),0,60,0,100);
float m = map(minute(),0,60,0,100);
float h = map(hour(),0,60,0,100);
line (s,0,s,33);
line (m,34,m,66);
line (h,67,h,100);

}