# Lengths and substitution in L-systems

Am looking into writing up a Lindenmayer systems implementation. I've looked at a few example implementations and the one thing that's giving me trouble at this stage is how symbols and substitutions are meant to work (if this is even specified in the original treatise).

For example, the implementations I've seen tend in most cases to start with axioms based on A. Let's take the simplest example of this where the Axiom is (just) A.

When this is drawn (depth 0), what should I expect to see? If otherwise undefined, is A meant to render as anything at all? Or does it need to be defined as one full length (whichever symbol is used for this; I have seen pipe being used to this purpose) before it will render out?

Taking a second example, let us say that A renders out, irrespective of what the answer to the above is. If part of F's definition is B, and B is not defined, should B render as a full length?

The way I would expect this to work is that without F being defined at all, nothing should be drawn at depth 0 and subsequently at no other depth, either.

Yet in L-systems Explorer (LSE) and in this web-based implementation, even where a symbol is not defined, it will still be rendered as a full length. The question is, why?

• I don't understand your question. Can you try to be more precise? What is "renders out"? What is F? What is full length? An L-System is specified as a triple $(V,\omega,P)$, where $V$ is the alphabet, $\omega$ is the initial string (or axiom), and $P$ is the production rules. I can guess $V$ and $\omega$ from your questions, but without you explicitly stating your production rules $P$ the system is unspecified. Sep 6 '11 at 10:45
• At depth 0 (iteration 0) the Axiom is rendered. At depth 1 (iteration 1), axiom is expanded and the resulting "tree" (string) is rendered. Each variable of the string is usually rendered with a fixed length straight line. Its origin and angle obviously depends on its "position/nesting" in the rendered string and the convetion used for constants. For example [+X] usually means render X as a right branch starting from the current position. I think Wikipedia is clear enough: en.wikipedia.org/wiki/L-system Sep 6 '11 at 16:38

L-systems, are more about general : Abstract rewriting systems rather then to concrete application.

Agree, a wide range of L-systems applications is in computer graphics (generating nature, textures etc), while from mathematical point of view, they are still, the same model.

As stated in referred by you L-systems definition :

Using L-systems for generating graphical images requires that the symbols in the model refer to elements of a drawing on the computer screen.