simple graphic clock
Posted: Sun Dec 06, 2015 11:42 pm
Just getting started.
Code: Select all
print "Graphic Clock"
print
graphics 500 500
gcls
gosub [drawhour]
gosub [drawminute]
end
[drawhour]
mytime = time("hour")
x = mytime * 15
x = x / 57.29577951
xx = sin(x)
xx = xx * 200
xx = 250 + xx
yy = cos(x)
yy = yy * 200
yy = 250 - yy
line 250 250 xx yy
return
[drawminute]
mytime = time("min")
x = mytime * 6
x = x / 57.29577951
xx = sin(x)
xx = xx * 200
xx = 250 + xx
yy = cos(x)
yy = yy * 200
yy = 250 - yy
line 250 250 xx yy 12
return