1 / 28

L-System

L-System. Aristid Lindenmayer (1968), biologist. L-System. A method of constructing a FRACTAL that is also a MODEL for plant growth. The Computational Beauty of Nature – Gary William Flake. Fractal graphics. Plant model. L-System.

yates
Download Presentation

L-System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 -> ab b -> a

  8. Test the generation

  9. Another example Alphabets: a, b Axiom: b Rules: a -> ba b -> 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 -> b A -> 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 -> b (terminal) A -> 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 -> ab (terminal) A -> aAb (non-terminal) Let’s 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 -> b or A -> bC; While Context-Free language uses the rules like, A -> α; where α is any string of both terminal and non-terminal symbols.

  19. Simple exercise Alphabets: F, -, + Axiom: F Rules: F -> F + F - - F + F We have only one production rule with the symbol F. Let’s 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 -> 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/Lsystems/Lsystems.html

  28. Exercise time Can you figure out the rule for this plant?

More Related