Lsystem
Introduction


return to main index



Introduction

Lindenmayer systems, aka Lsystems, are based on the pioneering research of Aristid Lindenmayer. The principles they embody were first applied to graphics by Przemyslaw Prusinkiewicz. In addition to generating organic/branching forms such as plants, Lsystems have also been adapted, more recently and with intriguing results, by architects [ 1  2  3 ]. The Wikipedia link at the top of this page leads to many fascinating examples of the applications of Lsystems.

Modeling with an Lsystem is entirely different to using an interactive package where, typically, an artist must directly attend to each detail of a model. In contrast to the explicit interactive approach, shapes emerge from an Lsystem as a result of an artist changing the rules by which a sequence of characters, known as an Lstring, are generated and interpreted.

For example, the lattice shown in figure 1 was generated by a sequence of characters (letters). The lattice was made by replacing each '4' in following input string, called the axiom,
      4<z4<z4<z4
by a sequence of substitution characters.
      44<z4>z4<z4<z44


This produced another string - Lstring generation 1,
      44<z4>z4<z4<z44<x44<z4>z4<z4<z44<
      z44<z4>z4<z4<z44<x44<z4>z4<z4<z44

The process is repeated several times. For example, Lstring generation 2 is shown below.
      44<z4>z4<z4<z4444<z4>z4<z4<z44<z44<z4>z4<z4<z44>z
      44<z4>z4<z4<z44<z44<z4>z4<z4<z44<z44<z4>z4<z4<z44
      44<z4>z4<z4<z44<z44<z4>z4<z4<z4444<z4>z4<z4<z44<z
      44<z4>z4<z4<z44>z44<z4>z4<z4<z44<z44<z4>z4<z4<z44
      <z44<z4>z4<z4<z4444<z4>z4<z4<z44<z44<z4>z4<z4<z44
      44<z4>z4<z4<z44<z44<z4>z4<z4<z44>z44<z4>z4<z4<z44
      <z44<z4>z4<z4<z44<z44<z4>z4<z4<z4444<z4>z4<z4<z44
      <z44<z4>z4<z4<z4444<z4>z4<z4<z44<z44<z4>z4<z4<z44
      >z44<z4>z4<z4<z44<z44<z4>z4<z4<z44<z44<z4>z4<z4<
      z4444<z4>z4<z4<z44


Figure 1


The substitutions shown above, in effect define a rule that says, "all instances of the numeral '4' in an input string must be (repeatedly) replaced by the characters of a replacement string". In other words,

    find each     and replace it with
       "4"         "44<z4>z4<z4<z44"

Interpretation

After an Lstring has been generated it is post-processed as if it were a long sequence of instructions. Figure 1 was produced, in Maya, as a result of interpreting the characters '4', '<', '>' and 'z' to mean the following,.


  '4'     "insert a straight line (curve), and move
          the coordinate system to the end of the line"
  '>'     "make subsequent rotations positive"
  '<'     "make subsequent rotations negative"
  'z'     "rotate around the z-axis of the current
          coordinate system"


The characters in an Lstring generally insert geometry into a 3D scene or alter the coordinate system into which the geometry will be placed. There are, however, other ways in which the Lstring can be interpreted. The symbols in an Lstring could generate instructions for a MIDI system, or they could move character models across a "floor". An Lsystem might form the basis of (experimental) choreography.


Lsystem Terminology


Lstring a long sequence of (keyboard) characters.
axiom a short string from which an Lstring is generated.
string rewriting a number of rules that identify which characters should be replaced (rewritten) by other characters.
generation - the number of times string rewriting occurs.
string interpretation - the geometric operations assigned to the characters in an Lstring.





© 2002- Malcolm Kesson. All rights reserved.