As always, this documention assumes some general familiarity with L-systems and only describes JFLAP's implementation of these structures. JFLAP allows a user to define an L-system and to render that system with an arbitrary level of substitution in three dimensions. The formal definition of an L-system requires three components, to which we add one to aid in drawing:
While the rules of replacement, the presence of an axiom, and soforth are universal to L-systems, the interpretation of those symbols to render a graphic is not part of the mathematical definition. At present there is one L-system renderer in JFLAP, and its description, including the symbols it recognizes, may be found here.
You can also have multiple symbols on the left side of the rewriting rule. JFLAP offers rules that are sensitive to context. These rules take the form of i a0 a1 ... ai-1 ai ai+1 ... an-2 an-1. In this list of n+1 symbols, the i symbol is an integer from 0 inclusive to n exclusive; the symbol ai is the symbol potentially being rewritten, but only if the string of symbols a0 a1 ... ai-1 come before it and ai+1 ... an-2 an-1 come after it. For example, the rewriting rule 2 a b c d x y z, in an expansion c would be rewritten with x y z if preceeded by the two symbols a b and the symbol d.
If multiple replacement rules dictate that a symbol is to be rewritten, one of the rules will be chosen uniformly at random when the expansion of symbols occurs. Additionally, lambda productions are allowed and indicate simply that the symbol should be removed.
Above the right scroll bar, just to the right of the "Parameter" column label, there is a small button. If you press it, you will see a popup menu with a list of those parameters the L-system renderer in JFLAP recognizes (one can't remember them all, can we?). For a full description of these parameters, view the pages for the L-system Renderer When you select a parameter name from this list, it will be entered into the table, and you will begin editing the value for that parameter. If you select a parameter that already exists in the table, then you will begin editing the parameter value for the existing entry.
The axiom field
holds the starting point
of the L-system.
The middle table
displays the rewriting rules.
You edit them here!
Rewriting rules look
like a grammar production
with left and right sides.
A rule's left side holds
the symbol to replace in
derivation strings.
The right side contains
what symbols the left symbol
will be replaced with.
The strings of symbols
in JFLAP's L-systems are
space delimited.
Strings without whitespace
should therefore be considered
a single symbol.
That is important!
Don't mistake "gfgg"
for "g f g g"!
The bottom table
holds drawing parameters
for the L-system.
Parameters set
in this table change how the
L-system renders.
The left column "Name"
holds the parameter name.
Right holds the value.
As an example,
set "color" to the value "green"
and "g" draws green lines!
Also, consider
setting "distance" to "18".
Lines are that length now.
You click in the box
above the table's scroll bar
for a list of names.
Choose one of these names,
and that named parameter
shows in the table.
Want to render this?
You choose the menu item
named "Render System"