18. November 2010
die genialste uhr ever..int s,m,h; float sf,mf,hf; float sy,my,hy; void setup() { size(520,460); PFont font; font = loadFont("OCRAStd-48.vlw"); textFont(font, 48); smooth(); } void draw() { background(80); s = second(); m = minute(); h = hour(); sf = map(s,0,60,0,1); mf = map(m,0,60,0,1); hf = map(h,0,24,0,1); fill(72,61,139); rect(160, 120, 40, hy); stroke(65,105,225); fill(65,105,225); rect(210, 120, 40, my); stroke(132,112,225); fill(132,112,225); rect(260, 120, 40, sy); stroke(72,61,139); sy = (300*sf); my = (300*mf); hy = (300*hf); fill(255,255,255); String clockStr = str(hour()) + ":" + str(minute()) + ":" + str(second()) + ":" + str(millis()); text(clockStr,20,70); }