xxxxxxxxxx
53
//credits to https://editor.p5js.org/LindseyPiscitell/sketches/SJgoswgp
//i didnt know how to cite this! i had very little time sorryyy
//i liked the structure of push() pop() this example used
var hr = 12;
var m = 12;
var sec = 12;
function setup() {
createCanvas(400, 400);
}
function draw() {
fill("#703F27");
rectMode(CENTER);
strokeWeight(5);
rect(200,0, 50,1000);
push();
translate (200,200);
rotate (radians (hr));
fill("#FFC800");
strokeWeight(10);
ellipse (0,0,150,150);
strokeWeight(5);
line(0, 50, 0, 0);
hr+=0.087;
pop();
push();
translate (200,200);
rotate (radians (m));
strokeWeight(2);
line(0, 60, 0, 0);
m+=1;
pop();
fill("#000000");
rect(200,135,2,10);
rect(200,265,2,10);
rect(135,200,10,2);
rect(265,200,10,2);
}