Turtle Graphics with Branching 8/15
 
 
   
The turtle’s set of commands can be expanded to include ‘save current position’ and ‘return to previously saved position’ commands. An entire stack of positions can be saved which can be referenced in a last-in, first-out sequence. This logic enables multiple levels of branching. Complex geometries can be thus be produced with a single generation of string.
 
   
 
     
     
 
   
 
     
 
  Index