Title: LSystem
1 L-System
Aristid Lindenmayer (1968), biologist
2 L-System
A method of constructing a FRACTAL that is also a
MODEL for plant growth. The
Computational Beauty of Nature Gary William
Flake
3 Fractal graphics
4 Plant model
5 L-System
L-systems use an AXIOM as a starting STRING and
ITERATIVELY apply a set of PARALLEL string
substitution rules to yield one long string that
can be used as instructions for drawing the
fractal.
6 Production systems
String concatenation of alphabets
(symbols). Axiom the first initial
symbol(s). Production rules the description of
how one string of symbols generate another.
7 An example
Alphabets a, b Axiom b Rules a -gt ab b -gt a
8 Test the generation
9 Another example
Alphabets a, b Axiom b Rules a -gt ba b -gt
ab
10 Test the generation
11 Terminal and non-terminal symbols
We can use lower and UPPER case alphabets to
represent the terminal and non-terminal
symbols. Terminal symbols are those need no
further expansion. Non-terminal symbols are those
can further expand using the production rules.
12 Terminal and non-terminal symbols
Rules A -gt b A -gt bA In this case, A is a
non-terminal symbol b is a terminal symbol. The
rules state that A can generate b and stop. A can
also expand to bA where the A on the right hand
side can expand again using the two rules.
13 Terminal and non-terminal symbols
Rules A -gt b (terminal) A -gt bA
(non-terminal) The results will be, b, bb, bbb,
bbbb, Remember the regular expression last
time, bb
14 Exercise time
Alphabets A, a, b Axiom A Rules A -gt ab
(terminal) A -gt aAb (non-terminal) Lets see
what can be generated.
15 Answer
16 Language
Remember that the Finite State Automata can
generate a language we called Regular Expression.
The L-system can also generate another language
we named Context-Free language.
17 Language
- According to Noam Chomsky, there are 4
types/hierarchies of Formal Language. We have
learnt the, - Regular expression,
- Context-free language.
- There are two more, namely the,
- Context-sensitive language,
- Unrestricted language.
18 Production rules
Regular expression uses the rules, A -gt b or A -gt
bC While Context-Free language uses the rules
like, A -gt a where a is any string of both
terminal and non-terminal symbols.
19 Simple exercise
Alphabets F, -, Axiom F Rules F -gt F F - -
F F We have only one production rule with the
symbol F. Lets see what happens.
20 Any meaning?
We have not touched on any ideas about meaning
semantics yet. The language we generated is pure
syntactic. We can, however, assign external
meaning to the symbols and see what happens.
21 Any meaning?
22 Any meaning?
23 Any meaning?
24 The meaning
Now we assign meaning to the symbols. F draw a
line segment forward turn anti-clockwise
60 - turn clockwise 60 The rule F -gt F F
- - F F will become
25 The meaning
-
-
F
F
F
F
26 Turtle graphics
That is the Turtle Graphics (Logo) we learnt in
primary school. The commands are,
27 L-system applet
Try to create the graphics using the applet
at http//www.cs.utah.edu/jshepher/java/Lsyste
ms/Lsystems.html
28 Exercise time
Can you figure out the rule for this plant?