Turtle Graphics with Modular Components 9/15
 
 
   

Strings can contain characters that are not interpretable themselves as turtle graphics commands. Rather, new letters can be defined to be rewritten as series of turtle graphics commands. These new letters can in turn be referenced by other letters. This enables the formation of modular components. For example, 'A' can be defined as a square: A -> F+F+F+F

(where 'F' = move forward, and '+' = turn right)

 
   
 
     
     
 
   
 
     
 
  Index