/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://bard117f12.sketchpad.cc/sp/pad/view/ro.HqqFMobrU3V/rev.2
*
* authors:
* dpark
* Victoria Castiglione
*
* Cole Berry-Miller
* David Bull
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/*David Bull
(09/23/2012)
[email protected]
Clock*/
void setup() {
size(400, 400);
smooth();
frameRate(30.0);
background(255);
}
void draw() {
drawClock();
}
void drawClock() {
float myHour = hour();
float myMinute = minute();
float mySecond = second();
float myMinRad = (TWO_PI*myMinute)/60.0;
float myHourRad = (TWO_PI*myHour)/24.0;
float mySecRad = (TWO_PI*mySecond)/60.0;
noStroke();
fill(255, 3, 3);
arc(200, 200, 350, 350, 0, myHourRad);
fill(255);
ellipse(200, 200, 300, 300);
fill(3, 0, 255);
arc(200, 200, 250, 250, 0, myMinRad);
fill(255);
ellipse(200, 200, 200, 200);
fill(0, 255, 14);
arc(200, 200, 150, 150, 0, mySecRad);
fill(255);
ellipse(200, 200, 100, 100);
}