Lindenmayer Systems
Main Concept
A Lindenmayer System (or L-System) consists of the following:
an alphabet of symbols that can be used to make strings.
production rules mapping each symbol into some larger string of symbols.
an axiom: an initial string from which to begin construction.
a rewriting system: a mechanism for translating the generated strings into geometric structures.
An L-System is constructed by starting with the axiom string, and then repeatedly applying the production rules in parallel to each symbol in the string. Symbols not having production rules are left alone. Each application of the production rules is called an iteration.
Each iterate string corresponds to a geometric structure via the rewriting system. The most basic rewriting system maps each symbol in the alphabet to a specific geometric action, and a geometric image results. The same production rules are applied repeatedly in order to create this. As a result, the generated strings and corresponding images tend to have a repetitive, or self-similar internal structure. They are often described as fractals.
Example
Here is one example of an L-System that produces a version of the Koch curve:
Axiom:
A
Production Rules:
A : ↗B↘↘B↗
B: ↘A↗↗A↘
Rewriting system:
A : draw forward 1
B : draw forward 1
↗ : turn 30° left
↘ : turn 30° right
1st iteration: ↗B↘↘B↗
2nd iteration: ↗↘A↗↗A↘↘↘↘A↗↗A↘↗
3rd iteration:
4th iteration:
6th iteration:
8th iteration:
Note: L-Systems often grow exponentially in length. The example above grows to a string with length 5⋅2n−4 after n iterations.
Using the App
Input an axiom into the text box labeled 'Start', define the symbols and their associated production rules and actions in the adjacent input areas. The syntax for the actions consist of plotting commands of the form 'command1:arg1;command2:arg2;...;commandN:argN'. The commands are interpreted from left to right.
L-System Plotting Commands
Command
Argument
Description
draw
n: integer or floating-point value
Draw forward n units at the current angle
turn
Turn n degrees (2-D L-Systems only)
turnx
Turn n degrees around the x-axis (3-D L-Systems only)
turny
Turn n degrees around the y-axis (3-D L-Systems only)
push
'angle' or 'position'
Push the current angle or position onto its respective stack
pop
Pop the top angle or position from the respective stack
After the axiom, rules and constants are chosen, press the 'Start' button to initialize the L-System and plot the axiom (0th iteration). To iterate the current L-System press the 'Iterate' button and the new L-System will automatically be drawn.
Alternatively, choose one of the preset example L-Systems from the drop down list. You can also save an L-System to this list, but note that it will only survive as long as the worksheet is open and has not been restarted.
Set L-System parameters
User definedSierpinski TriangleTreeKoch CurveFractal PlantDragon CurveGosper CurveBoxSeaweedCrystalRingsCarpetPenrose TilingMaple LeafKoch Snowflake
BlackRedBlueGreenPurpleOrangeYellow
Production Rule
Action
More MathApps
MathApps/AlgebraAndGeometry
Download Help Document