1 / 20

L-System

Taku Komura. L-System. What is an L-System ?. Lindenmayer system, or L-System, was introduced in 1968 by the biologist Aristid Lindemmayer Conceived as a mathematical theory on plant development. In the 'bible' of L-Systems, ``The Algorithmic Beauty of Plants'' he wrote:

feleti
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. Taku Komura L-System

  2. What is an L-System ? Lindenmayer system, or L-System, was introduced in 1968 by the biologist Aristid Lindemmayer Conceived as a mathematical theory on plant development. In the 'bible' of L-Systems, ``The Algorithmic Beauty of Plants'' he wrote: ``The central concept of L-systems is that of rewriting. In general, rewriting is a technique for defining complex objects by successively replacing parts of a simple initial object using a set of rewriting rules or production.''

  3. L-Systems Expanding the strings based on the deterministic rules The rewriting process start from an initial string called the axiom. At each derivation step, all letters in the current string are replaced simultaneously by applying their associated productions. L-System is defined as a tuple Variables Constants Axiom Rules

  4. Example Variables: a, b Constants: none Axiom : a Rules: a->b, b->aa How does it go on then? Step #0 : a (axiom)‏ Step #1 : b // a -> b Step #2 : a a // b -> aa Step #3 : b b // a -> b Step #4 : a a a a // b -> aa Because there is exactly one rewriting rule for each letter, the resulted strings will be deterministic . Because each letter was replaced regardless what neighbours it has, the rewriting rules arecontext-free

  5. Exercise • Variables: a, b • Constants: none • Axiom : a • rules: a->aba, b->bbb • Solution • Step #0 : a (axiom)‏ • Step #1 : aba • Step #2 : aba bbb aba • Step #3 : aba bbb aba bbb bbb bbb aba bbb aba • Step #4 : ...

  6. Turtle interpretation of L-strings A turtle is sitting on a sheet of paper facing in a certain direction, The tail of the turtle is a bit dirty. Thus, it leaves a trail along the paper. By interpreting a L-string, the turtle leaves the trail along the paper

  7. Turtle interpretation of L-strings • In 2D, for example, the state of the turtle is defined by its position and its heading vector • Given the step size d and the angle increment , the turtle's movements can respond to the commands represented by the L-symbols : • F  Move forward a step of length d and connect the new position with the last position by a line segment. • +  Turn left by angle (counter clockwise) • -  Turn right by angle (clockwise).

  8. Turtle interpretation of L-strings

  9. Example • Variables: a • Constants: +, F • Axiom: a • Rules: a -> a+bF • Solution • Step 0: a • Step 1: a+bF • Step 2: a+bF+bF • Step 3: a+bF+bF+bF

  10. Bracketed L-systems • In order to specify the data structure for presenting axial trees, the concept of ``strings with brackets'' was introduced by A.Lindenmeyer in 1968. The L-system's alphabet is extended by two new commands • [  Push the current state of the turtle onto a stack. • ]  Pop a state from the stack and make it the current state of the turtle.

  11. L-System 4 • http://www.geocities.com/tperz/L4About.htm • Tool to create 3D images with L-System syntax

  12. Syntax • Functions • F: Move forward • +: Turn left • -: Turn right • ^: Turn up • &: Turn down • c: Change color • [ ]: Bracket

  13. Sample Program • 4 # number interaction • 45 # rotation angle • 10 # line thickness • A # axiom • A=AF+ # rule • @ # run

  14. Example • 1 • 90 • 25 • A • A=AF+AF-AF-AF+AF • @ • Step = 1 • Step = 2 • Step = 3

  15. Example • 71591YYYY=X&X&X&X&XX&X&X&X&X=[+(90)AB[A]]A=A'BB=F'&FF&F@

  16. Example • 9 • 19 • 25 • >(90)&(90)A • A=U[---P]a • a=U[-P]B • B=U[+++P]b • b=U[+P]A • C=V[-D][+D] • D=V[-E][+E] • E=VV[-G][+G] • G=V-VV • P=WV[-C][+C] • U=f[---f+++X][+++f---Y]FFFFF • V=fFF • W=f[---F++++++F]F • X=FFFF • Y=X • @

  17. Stochastic L-systems To avoid the artificial regularity of models generated by deterministic L-system, variation of turtle interpretation and/or randomization of L-productions are needed.For example, the productions : p1 : a -> (0.7) b a p2 : a -> (0.3) c aare 2 rewriting rules for the letter a. In one derivation step, either p1 or p2 will be applied to each occurrence of a, according to the given distribution (0.7 and 0.3).

  18. Parametric L-systems In order to model continuous phenomena, A. Lindenmeyer proposed that numerical parameters be associated with L-system symbols. Parametric L-system operate on parametric words, which are strings of modules consisting of their symbolic names with associated parameters.

  19. Timed L-systems Changing the state of the leafs as time passes For animation purpose

  20. Conclusion • L-System • Overwrite simultaneously • Tuple • Variables • Constants • Axiom • Rules • L-System 4

More Related