home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
proglang
/
ladybug1.arj
/
MISC.BUG
< prev
next >
Wrap
Text File
|
1984-03-12
|
1KB
|
19 lines
DEFINE "spiralsq [[ :s][rsquare :s][rt 45][spsq 1.414 * :s ]]
define "rays [[ :angle :incangle :dist :incdist ][setheading :angle][fd :dist][bk :dist][rays :incangle + :angle :incangle :incdist + :dist :incdist]]
define "tree [[ :l][if :l < 5 then stop][left 45][fd :l][tree :l / 1.616][back :l][right 90][fd :l][tree :l / 1.616][back :l][left 45]]
define "corner.tri [[ :size][if :size < 10 then stop][repeat 3 [fd :size corner.tri :size / 2 rt 120]]]
to "cornerpoly :size :angle :totalturn
if :size < 10 then stop
forward :size
cornerpoly :size / 2 0 - :angle 0
right :angle
if :totalturn + :angle \ 360 = 0 then stop
cornerpoly :size :angle :totalturn + :angle
end
define "nested.triangle [[ :size][if :size < 10 then stop][repeat 3 [nested.triangle :size / 2 fd :size rt 120]]]
define "insert [[ :size][left 120][outward.tri :size / 2][right 120]]
define "outward.tri [[ :size][if :size < 20 then stop][repeat 3 [fd :size / 2 insert :size fd :size / 2 rt 120]]]