sketch
function setup() {
createCanvas(600, 400);
}
function draw() {
var H = hour();
var M = minute();
var S = second();
var Mil = millis();
var glac = (sin(radians(Mil/3600/1000*180))); var shadR =(cos(radians(Mil/12/3600/1000*180))) var penR = abs(sin(radians(Mil/1000/60*180)));
var snow = [0,2,4];
var centX = width/2;
var centY = height/2;
background(117, 230, 232);
textSize(15); fill("darkblue");
textFont("Courier New");
text(nf(H, [], 0), 110, 30);
text(":", 130, 30);
text(nf(M, [], 0), 140, 30);
text(":", 160, 30);
text(nf(S, [], 0), 170, 30);
fill(42, 135, 232); noStroke();
rect(0,100, 600, 300);
fill(230,232,232); strokeWeight(2);
beginShape();
vertex(0, 70);
vertex(100, 80);
vertex(120, 110);
vertex(110, 115);
vertex(80, 115);
vertex(80, 110);
vertex(0, 110);
endShape(CLOSE);
beginShape();
vertex(200, 100);
vertex(230, 85);
vertex(240, 100);
endShape(CLOSE);
beginShape();
vertex(380, 105);
vertex(370, 80);
vertex(520, 83);
vertex(520, 75);
vertex(600, 75);
vertex(600, 110);
endShape(CLOSE);
fill(225, 255, 236);
strokeWeight(1);
stroke(0);
ellipse(300, 250, 200+200*glac, 100+100*glac);
fill(140);
noStroke();
push();
translate(centX, 260);
rotate(shadR);
ellipse(0,50, 50, 100);
pop();
fill(255,238,95);
triangle(290, 240, 285, 260, 295, 260); triangle(310, 240, 305, 260, 315, 260);
fill(14, 25, 41);
noStroke();
ellipse(300, 220-50*penR, 30+25*penR, 60+50*penR); ellipse(300, 180-50*penR, 20+25*penR, 30+50*penR); ellipse(300, 240-15*penR, 40+10*penR, 40+10*penR); push();
translate(310+15*penR, 210-40*penR);
rotate(radians(-30)); ellipse(0,0, 10, 40);
pop();
push();
translate(290-15*penR, 210-40*penR);
rotate(radians(30));
ellipse(0,0, 10, 40); pop();
fill(240);
ellipse(300, 230-50*penR, 15+25*penR, 50+50*penR);
fill(255, 238, 95);
noStroke(); beginShape();
vertex(300, 180-60*penR);
vertex(305, 182-60*penR);
vertex(300, 184-60*penR);
vertex(295, 182-60*penR);
endShape(CLOSE);
fill(255);
ellipse(295, 175-60*penR, 10, 5); ellipse(305, 175-60*penR, 10, 5); fill(0);
ellipse(295, 175-60*penR, 2,2); ellipse(305, 175-60*penR, 2,2);
for(i=0; i<width; i+=100) { for(j=0; j<height; j+=100) {
fill(255);
noStroke();
ellipse(i*random(0,2), j*random(0, 2), 5,5);
}
}
}
The clock incorporates three different elements to tell change in time. The penguin grows and shrinks by the second, the iceberg it stands on also grows and shrinks by the minute, while the shadow of the penguin rotates by the hour. There is no absolute measure of time in my clock, but it only shows the change. Though in the beginning, I imagined a penguin hatching out of an egg to grow as time goes by, but that turned out unfeasible with my coding skills…