aUCBLogo Demos and Tests / meander
			
				
			
			to meander
   ;by Michael Malien
   make "c1 [255 0 0]/255
   make "c2 [0 255 0]/255
   make "c3 [0 0 255]/255
   make "c4 [255 204 153]/255
   make "ll 110 
   make "nr 5 
   make "ee 10 
   make "mode FILL_NORMAL
   disableLineSmooth
;   WindowMode
   repeat :nr [a2]
   home 
   repeat :nr [a3 repcount rt 90 fd 0.9*:ll lt 90]
   home 
   fd 0.9*:ll 
   setfc :c4
   rt 45 
   fd :ll/10 
   (fill :mode)
   pu home
;   setactivearea (se 0 0 0.9*:nr*:ll :ll)
;   gifsave "meander.gif
end
to a2
   repeat :ee-1 [fd :ll-repcount*:ll/10 rt 90]
   fd :ll/10
   repeat :ee-2 [lt 90 fd :ll-(10-repcount)*:ll/10]
   lt 90 pu bk :ll/10 pd
end
to a3 :r
   repeat :nr-1 [fd :ll rt 90 fd :nr*(0.9*:ll) rt 90]
   setfc thing (word "c 1+modulo :r 3)
   pu rt 45 fd :ll/10 (fill :mode) bk :ll/10 lt 45
end