xxxxxxxxxx
38
function setup() {
createCanvas(900, 900);
background(225, 0, 0);
}
function draw() {
s= second();
m = minute();
hr = hour();
//redrawing all everytime it loops, redrawing bg at start of each loop
//starts at 0+15, then grows 15px each, x cannot be bigger than m*15
//they have to be the same # so they step at the same time/every min
push();
background(225, 0, 0);
for(x = 0; x <= (m * 15); x = x + 15) {
noFill();
strokeWeight(1);
stroke(255);
rect(0, 0, x, x)
}
pop();
push();
translate(500, 550);
for(x = 10; x <= (s * 10); x = x + 10) {
noFill();
ellipse(0 , 0, x, x);
}
pop();
push();
for(x = 10; x <= (hr * 38); x = x + 38) {
noStroke();
fill(255, 255, 255, 30)
ellipse(700 , x, 300, 100);
}
pop();
}