L-Systems: Patterns with Grammar

Background

In the late 1960s by Aristid Lindenmayer developed L-Systems as a method for modeling plant growth. An L-system is a rewriting system, a way of constructing complex objects by starting with simple objects and recursively replacing parts of the object according to rewriting rules. We begin with an example of a simple L-system that generates the Koch curve, but first, some terminology.

An L-System is made up of an alphabet A, an axiom S, and a set P of production rules.

The alphabet is a set of symbols (we'll take our symbols from +, -, x, y, F, and f), and an L-system describes a rewriting of strings of symbols from the alphabet.

The axiom is the initial string upon which the L-system operates.

The production rules assign to each letter a of the alphabet a string P(a) of letters of the alphabet.

Example 1: generating the Koch curve by L-Systems.

The alphabet need not consist of symbols that involve drawing, moving, and turing. Other symbols can be introduced to allow different substitutions at different parts of a string, as seen in the next example.

Example 2: generating Hilbert's space-filling curve by L-Systems.

Finally, the symbol f is usually interpreted as moving forward one step without drawing a line.

Return to L-Systems: Patterns with Grammar