Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
last_sec = second()
|
||||
|
||||
def draw():
|
||||
global last_sec
|
||||
if last_sec != second():
|
||||
draw_clock()
|
||||
last_sec = second()
|
||||
|
||||
def draw_clock():
|
||||
background(192)
|
||||
translate(width / 2, height / 2)
|
||||
s = second() * TWO_PI / 60.0
|
||||
m = minute() * TWO_PI / 60.0
|
||||
h = hour() * TWO_PI / 12.0
|
||||
rotate(s)
|
||||
strokeWeight(1)
|
||||
line(0, 0, 0, -width * 0.5)
|
||||
rotate(-s + m)
|
||||
strokeWeight(2)
|
||||
line(0, 0, 0, -width * 0.4)
|
||||
rotate(-m + h)
|
||||
strokeWeight(4)
|
||||
line(0, 0, 0, -width * 0.2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue