This is the fifth in a series of blog posts explaining the usage of the Lindenmayer System Explorer. Clicking on an image will take you to the explorer page, pre-configured to draw that image.
So far, we have seen many different patterns created with the L-system explorer – fractals, dragon curves, snowflakes, and so on. They all have one thing in common: they are made up of a single line.
To create branches, enclose the rules for a branch in square brackets, like so:
[F]+[F]+[F]
Instead of yielding a bent line, it creates a pattern like this:
Not terribly interesting yet, but it does allow for the creation of more interesting shapes. Remember: Astrid Lindenmayer was a botanist, and he originally created this system to model the structure of living plants. If we nest a few brackets, and play around with the angles, we can get patterns like this:
Branch rules can be nested within each other, to the extent that extremely complex patterns can emerge very quickly:
And with a little practice, the patterns can become increasingly plant-like:
So that’s it for branches. In the next post I will show how you can use branching to change the drawing angles, colors, line length and line thickness to create increasingly life-like plants.
More posts on this subject: