Draw a clock: Difference between revisions
m
→{{header|Amazing Hopper}}
No edit summary |
|||
Line 267:
=={{header|Amazing Hopper}}==
{{Trans|bbcbasic}}
{{Trans|bacon}}
"Clock" dibujado en modo texto con Hopper-Jambo.
[[File:Captura_de_pantalla_de_2022-10-11_01-10-51.png|200px|thumb|right|Caption]]
Line 306 ⟶ 307:
Color back '0'
Draw a line (xp, yp, #(xp+(hs*sin(d2r(lasth)))),
Draw a line (#(xp
#(yp+(hs*cos(d2r(lasth)))) )
Draw a line (#(xp+1), #(yp+1), #(xp+(hs*sin(d2r(lasth)))),\
#(yp+(hs*cos(d2r(lasth)))) )
Draw a line (xp, yp, #(xp+(ms*sin(d2r(lastm)))),
Draw a line (#(xp-1), #(yp-1), #(xp+(ms*sin(d2r(lastm)))),\
#(yp+(ms*cos(d2r(lastm)))) )
Draw a line (xp, yp, #(xp+(ss*sin(d2r(lasts)))),
#(yp+(ss*cos(d2r(lasts)))) )
Let ( lasts := #(s*6-90) )
Line 320 ⟶ 327:
Color back '15'
Draw a line (xp, yp, #(xp+(hs*sin(d2r(lasth)))),
Draw a line (#(xp
#(yp+(hs*cos(d2r(lasth)))) )
Draw a line (#(xp+1), #(yp+1), #(xp+(hs*sin(d2r(lasth)))),\
#(yp+(hs*cos(d2r(lasth)))) )
Color back '3'
Draw a line (xp, yp, #(xp+(ms*sin(d2r(lastm)))),
Draw a line (#(xp-1), #(yp-1), #(xp+(ms*sin(d2r(lastm)))),\
#(yp+(ms*cos(d2r(lastm)))) )
Color back '13'
Draw a line (xp, yp, #(xp+(ss*sin(d2r(lasts)))),
#(yp+(ss*cos(d2r(lasts)))) )
Return
|