# Sample L-System file for drawing a 3D extended Hilbert curve. # # Created by Rob Lindeman # 2005-11-16 # # The structure of the file is: # 1. Some number of comment lines, each beginning with a '#' in the first position. # 2. A line beginning with the word "len" followed by a colon, a space, and then a # single integer representing the length of each segment to draw. # 3. A line beginning with the word "iter" followed by a colon, a space, and then a # single integer representing the number of iterations to apply. # 4. A line beginning with the word "rot" followed by a colon, a space, and then three # floating-point numbers, separated by spaces, representing the X, Y, and Z rotations, # respectively. # 5. Zero or more lines beginning with the word "rep" followed by a colon, a space, and then # a pair of characters "X,Y". These are used to go through the string that results after # applying the production rules "iter" times. For each occurence of "X" in this string, # it is replaced with the character "Y". "Y" may be ommitted, in which case all # occurences of "X" are removed from the string. # 6. A line beginning with the word "start" followed by a colon, a space, and then # the initial turtle string. # 7. Some number of production rules of the form: "L: R", where "L" is a single # character representing the left-hand side of the rule, and "R" is a sequence # of characters representing the replacement string for "L". len: 1 iter: 2 rot: 90.0 90.0 90.0 rep: A, rep: B, rep: C, rep: D, start: A A: B-F+CFC+F-D&F^D-F+&&CFC+F+B// B: A&F^CFB^F^D^^-F-D^|F^B|FC^F^A// C: |D^|F^B-F+C^F^A&&FA&F^C+F+B^F^D// D: |CFB-F+B|FA&F^A&&FB-F+B|FC//