L-System: Grow Complex Plants with Computer Graphics

In 1968, Aristid Lindenmayer, a Hungarian theoretical biologist and botanist, developed a model on how plants grow. The concept is simple but the expansion of a system can become complex.

Here is the idea.

A set of rules are used to “grow” the system.

A –> ABA

B–>BAC

C–>AC

We start with A. For the next iteration we get ABA because the A was replaced by ABA. The third iteration becomes ABABACABA because the A was replaced by ABA, the B was replaced by BAC and the final A was again replaced by ABA. The fourth iteration continues in this manner replacing each letter by its equivalent, because each letter is replaced by what each letter is equivalent to. The parentheses are use just to help see the substitutions. They have no real meaning and are not needed for the expansion.

A

(ABA)

(ABA)(BAC)(ABA)

(ABA)(BAC)(ABA)(BAC)(ABA)(AC)(ABA)(BAC)(ABA)

And this process continues, over and over again. By assigning what each letter represents, such as A means to grow up one inch, B means to rotate 45 degrees, and C might mean to rotate -45 degrees, we (a computer) can simulate the growing (growth) of a plant. Other letters can be included to represent the thickness of the branches as the L-system “grows.”

Try it out yourself. The rules and axioms are a bit different at the following website. The code there uses – and + for rotations as well as some other conventions. You can also set the iterations and angle used. Keep the iterations fairly low (8 to 13) so you don’t bog down the site. Try the examples first to see the different style rules.

Draw some L-Systems

Here is a picture of how complex plants (trees) can be created by a computer graphics system using L-systems.

L-system Trees

See L-system for more information.