artificial life

Chapter 4: Lindenmayer Systems

4.2 Graphical L-Systems

Two of Lindenmayer’s graduate students, Ben Hesper and Pauline Hogeweg, realized that L-Systems could do more than simply model things like the growth patterns of algae. Hesper and Hogeweg felt that L-Systems could be used to actually generate images that resembled botanic forms [Prusinkiewicz, et al, 1989].

Their system for creating images used L-System grammars with special characters that controlled a LOGO style cursor to draw the image. The grammar for the LOGO based system is described next.


F -> Move the cursor forward one unit, drawing as it goes

f -> Move the cursor forward one unit, without drawing

+ -> rotate the cursor clockwise by given angle d

- -> rotate the cursor counterclockwise by given angle d

[-> push the current cursor state down onto a stack

] -> pop from the cursor stack


Using this grammar the string “F+F+F+F” creates a square as shown in Figure 4.1.


Figure 4.1 : Drawing “F+F+F+F”

Figure 4.1 : Drawing “F+F+F+F”


By adding the rule F->F+F-F-FF+F+F-F the square quickly becomes more complex after just a few iterations, as illustrated in Figure 4.2. The fractal that results from this system is also known as a quadric Koch island.


Figure 4.2 : Progressive iterations of a Graphical L-System

Figure 4.2 : Progressive iterations of a Graphical L-System


By adding a cursor stack to the system branching is gained. This allows for much more organic looking structure. Figure 4.3 shows some examples of Graphical L-Systems using branching.


Figure 4.3 : Graphical L-Systems using branching

Figure 4.3 : Graphical L-Systems using branching


These images show a complexity arising from these simple rules. From these simple rules and a few regenerations it is possible to create images that mimic the structure of trees, bushes and ferns. These systems certainly seem to fulfill the a-life goal of synthesizing phenomena found in life using computers and logic.