aUCBLogo Demos and Tests / butterfly
to rightwing :size
repeat 22 [pd fd :size/100 rt 2]
fd :size*1.6
repeat 67 [fd :size/100 rt 2]
fd :size*1.2
repeat 43 [fd :size/100 rt 2]
fd :size*1.4
lt 165 fd :size/1.2
repeat 60 [fd :size/100 rt 1.5]
fd :size/8
repeat 70 [fd :size/100 rt 1.5]
fd :size/1.4
end
to leftwing :size
repeat 22 [pd fd :size/100 lt 2]
fd :size*1.6
repeat 67 [fd :size/100 lt 2]
fd :size*1.2
repeat 43 [fd :size/100 lt 2]
fd :size*1.4
rt 165 fd :size/1.2
repeat 60 [fd :size/100 lt 1.5]
fd :size/8
repeat 70 [fd :size/100 lt 1.5]
fd :size/1.4
end
to rightantenna :size
fd :size
rt 90 fd 2 lt 90
make "ANG 1
repeat 16 [pd fd :size/25 rt :ANG make "ANG :ANG+1]
end
to leftantenna :size
fd :size
lt 90 fd 2 rt 90
make "ANG 1
repeat 16 [pd fd :size/25 lt :ANG make "ANG :ANG+1]
end
to body :size
pd ellipse :size/8 :size
end
to butterfly [:size 100]
make "X first pos
make "Y last pos
make "N heading
pu setpos (list :X :Y) seth :N
body :size
pu setpos (list :X :Y) seth :N
rightantenna :size
pu setpos (list :X :Y) seth :N
leftantenna :size
pu setpos (list :X :Y) seth :N
fd :size/2
rightwing :size
pu setpos (list :X :Y) seth :N
fd :size/2
leftwing :size
pu setpos (list :X :Y) seth :N pd
end