21. November 2011
Abstrakte Uhr: Zuerst sehr abstrakt als schwarzes loch, danach mit Minutenangabe in der Mitte und den Sekunden als sich ständig verändernde Formen, die einen Kreis bilden.int s =second(); int m = minute(); int h = hour(); void setup() { background(0); size(900, 900); smooth(); PFont font; font = loadFont("CourierNewPS-BoldMT-48.vlw"); textFont(font, 80); smooth(); translate(width/2, height/2); } int angle= 0; int x = 0; int y= 0; void draw() { frameRate(1); float randR = random(0, 255); float randG = random(0, 255); float randB = random(0, 255); if (second()==59) { fill(0); ellipse(width/2, height/2, 100, 100); } String clockStr = str(minute()); smooth(); text(clockStr, (width/2)-40, (height/2)+20); int trans=0; fill(0, 0, 0, 20); rect(0, 0, width, height); stroke(255); noFill(); translate(width / 2 + cos(second()) * second()-trans, height / 2 + sin(second()) * second()-trans); println("sekunde: " + second()); noStroke(); fill(255, 255, 255, 30); rotate(second()); beginShape(); vertex(second(), 60); vertex(120, second()/180); vertex(second()/240, 360); endShape(CLOSE); rotate(second()); angle = angle + second(); trans+=2; }