3. Exercises¶
Here is another interesting L-System called a Hilbert curve. Use 90 degrees:
L L -> +RF-LFL-FR+ R -> -LF+RFR+FL-
Here is a dragon curve. Use 90 degrees.:
FX X -> X+YF+ Y -> -FX-Y
Here is something called an arrowhead curve. Use 60 degrees.:
YF X -> YF+XF+Y Y -> XF-YF-X
Try the Peano-Gosper curve. Use 60 degrees.:
FX X -> X+YF++YF-FX--FXFX-YF+ Y -> -FX+YFYF++YF+FX--FX-Y
The Sierpinski Triangle. Use 60 degrees.:
FXF--FF--FF F -> FF X -> --FXF++FXF++FXF--
Here are the rules for an L-system that creates something that resembles a common garden herb. Implement the following rules and try it. Use an angle of 25.7 degrees.
H H --> HFX[+H][-H] X --> X[-FFF][+FFF]FX
Here is another L-System. Use an Angle of 25.
F F --> F[-F]F[+F]F