aUCBLogo Demos and Tests / stars
to stars
;by Juan J. Paredes G., Brian Harvey & AM
setsc rgb 0 0 0
white=rgb 1 1 1
setpc white
setfc white
for [sides 3 32]
[ pr (se "star sides 300)
star sides 300
waitms 500
if Key? [stop]
]
end
to star sides size
blankscreen
sides=int sides
centralpoint=pos
pu
lt 360/sides/2
fd size/3
ipos=pos
setpc hsb 360*0.5/sides 1 1
TessStart
bk size/3
rt 360/sides/2
repeat sides
[ fd size
epos=pos
setpc hsb 360*#/sides 1 1
pu setpos ipos
pd setpos epos pu
bk size
rt 360/sides/2
fd size/3
ipos=pos
setpc hsb 360*(#+0.5)/sides 1 1
pu setpos epos
pd setpos ipos pu
bk size/3
rt 360/sides/2
]
TessEnd
pu setpos centralpoint pd
updateGraph
end
to blankscreen
WindowMode cs pu home pd ht
end