Created by LCSI MicroWorlds

Procedures Page

Project Author: Rupert Russell
Date: 26 April 2001
;to tree procedure modified from original found at:

to tree  :length :ang :st
 wait delay
 if :length < :st [stop]                  ;bail out clause
 fd :length
 lt :ang
 tree :length / 2 :ang :st                ;recursive call
 rt :ang
 tree :length  / 2  :ang :st              ;recursive call
 rt :ang
 tree :length / 2  :ang :st               ;recursive call
 lt :ang
 bk :length

to draw_tree
 snapshot                                 ;copy current background
 ifelse delay = 0 [ht] [st]               ;if delay = 0 ht else st
 tree height angle detail

to seed :angle
 ht                                       ;hide turtle for maximum drawing speed
 if :angle > 50 [stop]                    ;bail out clause
 make "angle :angle + 10                  ;increment the value of angle by 10
 tree height :angle detail
 seed :angle                             ;recursive call to seed procedure

Created: April 26, 2001
Last modified: September 6, 2006
rupert at rupert dot id dot au