aUCBLogo Demos and Tests / juans_stars
to juans_stars
ht
WindowMode
clearScreen
; perspective
disableLineSmooth
setPenSize 0
aa1
aa2
aa3
aa4
aa5
; pu setxy 200 200 pd
; hebrewstar 200
end
to aa1
cs ct home WindowMode ht
;scrollx 0 scrolly 0 zoom 1
make "y 300
repeat 8 [make "x -400
fivepinstarline 20
make "x -380
make "y :y-40
fivepinstarline 20
make "y :y-40]
pu st home pd
updateGraph
end
to aa2
cs ct home WindowMode ht
;scrollx 0 scrolly 0 zoom 1
make "y 300
repeat 8 [make "x -400
sixpinstarline 20
make "x -380
make "y :y-40
sixpinstarline 20
make "y :y-40]
pu st home pd
updateGraph
end
to aa3
cs ct home WindowMode ht
;scrollx 0 scrolly 0 zoom 1
make "y 300
repeat 8 [make "x -400
fivetipstarline 20
make "x -380
make "y :y-40
fivetipstarline 20
make "y :y-40]
pu home st pd
updateGraph
end
to aa4
cs ct home WindowMode ht
;scrollx 0 scrolly 0 zoom 1
make "y 300
repeat 8 [make "x -400
hebrewstarline 20
make "x -380
make "y :y-40
hebrewstarline 20
make "y :y-40]
pu home st pd
updateGraph
end
to aa5
cs ct home perspective ;ht
;scrollx 0 scrolly 0 zoom 1
make "y 300
repeat 8
[ make "x -400
hebrewstarline 20
make "x -380
make "y :y-40
hebrewstarline 20
make "y :y-40
updateGraph
]
pu home st pd
setorientation [90 0 0]
make "y 300
repeat 8
[ make "x -400
hebrewstarline 20
make "x -380
make "y :y-40
hebrewstarline 20
make "y :y-40
updateGraph
]
pu home st pd
end
to coloredfivepinstar
cs home ht
for [size 250 25 -25][fivepinstar :size]
end
to coloredfivepinstars
cs home ht
for [size 250 25 -25][fivepinstar :size]
coloredfivepinstars
end
to coloredfivetipstar
cs home ht
for [size 250 25 -25][fivetipstar :size]
end
to coloredfivetipstars
cs home ht
for [size 250 25 -25][fivetipstar :size]
coloredfivetipstars
end
to coloredhebrewstars
make "size 400
repeat 10 [setpc [0 0 0]
setfc (list random 255 random 255 random 255)
hebrewstar :size
(fill FILL_SMALL)
make "size :size/2]
end
to coloredsixpinstar
cs home ht
for [size 250 25 -25][sixpinstar :size]
end
to coloredsixpinstars
cs home ht
for [size 250 25 -25][sixpinstar :size]
coloredsixpinstars
end
to fivepinstar :size
make "centerdot pos
make "north heading
pu setpos :centerdot
seth :north
fd :size
setpc [0 0 0]
setfc (list random 255 random 255 random 255)
repeat 5 [pd
rt 90+63.732302197692
fd :size*0.664065516777181
lt 63.732302197692-8.267698314002
fd :size*0.664065516777181
lt 8.267698314002+18]
pu
setpos :centerdot
pd
(fill FILL_SMALL)
end
to fivepinstarline :size
repeat 20 [pu setpos (list :x :y)
fivepinstar :size
make "x :x+(:size*2)]
end
to fivetipstar :size
make "centerdot pos
make "north heading
pu
setpos :centerdot
seth :north
fd :size
rt 144+18
setpc [0 0 0]
setfc (list random 255 random 255 random 255)
repeat 5 [pd
fd :size*sin 46.5
lt (144+18)-90
fd :size*sin 46.5
rt 144]
pu
setpos :centerdot
seth :north
pd
(fill FILL_SMALL)
end
to fivetipstarline :size
repeat 20 [pu setpos (list :x :y)
fivetipstar :size
make "x :x+(:size*2)]
end
to hebrewstar :size
make "centerdot pos
make "north heading
setpc RGB 0 0 0
setfc RGB rnd rnd rnd
pu
fd :size
rt 120+30
repeat 6 [pd
fd :size/sqrt 3
lt 60
fd :size/sqrt 3
rt 120]
pu
setpos :centerdot
seth :north
pd
updateGraph
;pause
fill
end
to hebrewstarline :size
repeat 20 [pu setXY :x :y
hebrewstar :size
make "x :x+(:size*2)
updateVars
]
end
to sixpinstar :size
make "centerdot pos
make "north heading
pu setpos :centerdot
seth :north
fd :size
setpc [0 0 0]
setfc (list random 255 random 255 random 255)
repeat 6 [pd
rt 90+66.206023183591
fd :size*0.619656839195123
lt 66.206023183591+6.206022405549
fd :size*0.619656839195123
lt 23.793977594451]
pu
setpos :centerdot
pd
(fill FILL_SMALL)
end
to sixpinstarline :size
repeat 20 [pu setpos (list :x :y)
sixpinstar :size
make "x :x+(:size*2)]
end