Lindenmayer Systems (L-Systems)

In this lesson, we will use a java applet, called "Fractal Grower" in a separate window to explore the language of L-Systems. This simple but powerful language allows us to harness the power of iteration to create realistic looking plant-like structures, as well as many other interesting fractals.

Before we launch the Fractal Grower program, we'll look at the basic grammar of the L-System language.
Let's examine the growth of an extremely simplified tree.


In the 0'th iteration, we have a straight vertical line. We call this starting condition the 'axiom,' and we will denote this line with the symbol 'f'.
Next we will apply a rule to the line f, and in this case, the rule is to split apart and form two new branches. We will describe this rule as:
f = f [ +f ][ -f ]

This rule means that the next iteration will consist of a line 'f' with a branch 'f' angling to the right (+) and a branch 'f' angling left (-).
We then apply this rule again, recursively, to each of the new branches, creating the next iteration (2) in the figure above. We keep repeating this process again, with each of the new branches, to create the 3'd and then the 4th iterations of the tree.

Notice how iteration 3 consists of two copies of iteration 2, and iteration 4 consists of four copies of iteration 2. Thus we can see that the L-System rule creates self-similar patterns.



After opening the program, choose the option to "Start in Full L-System mode". The applet then launches in a big display window and a smaller control panel.
From the top of the control panel, you can access a number of preset L-Systems. Choose the one called "Twig". Use the "Previous" and "Next" buttons at the bottom to raise or lower the number of iterations. Adjust the slider labelled "Turn Angle". Adjust the other sliders to see what they do.
Note the panels that display the Axiom and the Rules. These fields are editable, and you may feel free to experiment with changing the axiom and the rule.

There are a few more symbols to know about. the letters a-f determine what color the line will be drawn.
The '!' symbol tells the program to scale the lines at each iteration, which is controlled by the 'Growth' slider.
The symbol 'g' is an invisible line, useful for creating blank spaces in a pattern.

On the next page, we will do some exercises to create fractal patterns of your own.