290 likes | 427 Views
L-Systems. Lindenmayer Systems. Prusinkiewicz and Lindenmayer. Recursive branching structure. Complex but constrained. Recursive Branching Structure. Botany - structure. Stems, roots, buds, leaves, flowers. Herbaceous or woody. Dichotomous or monopodial. Terminal bud or lateral bud.
E N D
L-Systems Lindenmayer Systems Prusinkiewicz and Lindenmayer Recursive branching structure Complex but constrained.
Botany - structure Stems, roots, buds, leaves, flowers Herbaceous or woody Dichotomous or monopodial Terminal bud or lateral bud Vegetative bud or flower bud Alernate, opposite, or whorled.
Botany - growth influences Lineage - age Cellular descent - nutrients and hormones Tropisms - e.g., phototropism, geotropism Obstacles - collision response: temporary or permanent.
DOL-Systems Production rules: ai -> bi D - deterministic 0 - zero contextual systems (context-free) Axiom - initial string Parallel rewriting rules.
Geometric replacement - replace each symbol of string with a graphic element - connectivity assumptions Turtle graphics - each symbol is a command to a drawing pen. Geometric Interpretation of String
A -> BCB B -> XX C -> TT Axiom: A Geometric Replacement - Example A BCB XXTTXX
X: T: X X T T X X Geometric Replacement XXTTXX
Parameters - d: linear step size - d: angular step size. Turtle Graphics “drawing turtle” is controlled by symbols of string Symbols read from string in left to right order State of turtle: position and direction: (x, y, a)
F Move forward a distance d while drawing a line. Its state will change from (x,y,a) to (x+d*cos a, y+d*sin a, a) f Move forward a distance d without drawing a line. Its state will change as above. + Turn left by an angle d. Its state will change from (x,y, a) to (x,y, a + d) - Turn right by an angle d. Its state will change from (x,y, a) to (x,y, a - d). Turtle Graphics
A -> BCB B -> FF C -> TT T -> -F++F- Axiom: A Turtle Graphics - Example A BCB FFTTFF FF -F++F- -F++F- FF
d: d: 45 degrees Initial state: (10,10,0) F F -F++F- -F++F- F F Turtle Graphics - Example FF -F++F- -F++F- FF
Bracketed L-Systems Brackets - push and pop states - multiple types of brackets - brackets have attachment semantics X X [ XX ] { XX } X X
Properties Can be recursive - reduce size based on branching level - self-similarity under scale Attribute symbols: line length, width, color, etc. Database amplification Track string development => growth process.
S -> F A F A -> [ + F B F ] F [ + F F F ] F F F F A -> F B -> [ - F B F ] B -> F Axiom: S F [ + F [ - F F F ] F ] F Non-Deterministic
Stochastic L-Systems S 1.0 -> F A F A 0.8 -> [ + F B F ] A 0.2 -> F B 0.4 -> [ - F B F ] B 0.6 -> F
Context-Sensitive L-Systems S -> F A T A>T -> [ + F B F ] A>F -> F F<B -> [ - F A F ] F<B >F -> [ - F A F ] T -> F
F -> F1 F1 -> F2 F2 -> F3 F 3-> F4 Animating Plant Growth Flexible movement of structure Changes in topology due to growth process Elongation of existing structures F -> FF
Parametric L-Systems S -> A(0) A(t) -> A(t+1) A(t): t>=1.0 -> F
Timed L-Systems Global time variable Local age value (u0, b0) -> ( (u1,a1), (u2, a2), … , (un, an) ) Jump from terminal age to terminal age.
Interacting with the Environment Physical obstacles Wind Gravity Nutrients, moisture from soil Sunlight: length of day, shadows.
Open L-Systems Mech and Prusinkiewicz Communication terms - Request and transmit information w/ environment - Distribution of nutrients, sunlight, etc.
L-Systems - Summary Branching structure, self-similarity Controlled complexity , data base amplification Geometric replacement, Turtle graphics Non-deterministic, stochastic, context sensitive, timed, open Animation - dynamics of static structure - time-varying drawing parameters - topology changes - growth of individual elements.