import math
r = 40

Circle(x = 50, y = 50, width=2*r, height=2*r, color='black')
Circle(x = 50, y = 50, width=2*r-2, height=2*r-2, color='white')

def Hand(angle, length):
    sx = 50
    sy = 50
    ex = 50 + length * math.cos(angle) 
    ey = 50 - length * math.sin(angle)
    Line(points = [sx, sy, ex, ey], color = 'black')

def Tick(hour):
    angle = (.5 - hour / 6) * math.pi + .01
    sx = 50 + (r - 3) * math.cos(angle) 
    sy = 50 - (r - 3) * math.sin(angle)
    ex = 50 + r * math.cos(angle) 
    ey = 50 - r * math.sin(angle)
    Line(points = [sx, sy, ex, ey], color = 'black')

for hour in range(12):
	Tick(hour)
    
hour = 8
min  = 25

Hand((.5 - hour / 6) * math.pi + .01, .55 * r)
Hand((.5 - min / 30) * math.pi + .01, .8 * r)

Clock

by xxthe_drama_llamaxx

Created 5 months, 1 week ago.