Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to Draw a Tree L-Systems in Computer Graphics Steven Janke.

Similar presentations


Presentation on theme: "How to Draw a Tree L-Systems in Computer Graphics Steven Janke."— Presentation transcript:

1 How to Draw a Tree L-Systems in Computer Graphics Steven Janke

2 Natural Trees

3 Tree Shapes

4 Euclidean Geometry Approach

5 Self-Similarity of Organic Forms

6 Computation = Processing Strings
Input: Output: aababccacabb adfeeefg Computer Interpretation:

7 Alphabet of characters.
L-System (Named after biologist Astrid Lindemayer in 1970’s) Alphabet of characters. First string called the axiom. Set of productions showing how to replace characters. All appropriate productions applied at once. Example: Alphabet: {a, b} Axiom: ab Productions: a bab , b a Derivation: ab baba abababab

8 Languages: L(G) = set of strings that can be derived from the system G. Example 1: Axiom: ab Productions: a a b ab ab aab aaab aaaab L(G) = { an b | n > 0 } Example 2: Axiom: a Productions: a b b ab a b ab bab abbab bababbab L(G) = ?

9 Languages: L(G) = set of strings that can be derived from the system G. Example 1: Axiom: ab Productions: a a b ab ab aab aaab aaaab L(G) = { an b | n > 0 } Example 2: Axiom: a Productions: a b b ab a b ab bab abbab bababbab L(G) = { s | s0 = a, s1 = b, sn = sn-2 sn-1 }

10 Turtle Interpretation:
Simple L-System: Alphabet: { F, +, - } Axiom: F-F-F-F Production: F FF Turtle Interpretation: F means draw a line segment in current direction. + means turn left. - means turn right. Start Initial direction F-F-F-F means: Delta = 90 degrees

11 Branching L-Systems: Add two characters to alphabet: [ and ]
Interpret [ to mean “start branch”. Interpret ] to mean “end branch”. F[+F][-F] means: Initial Direction Start Delta = 45 degrees

12 Turtles in 3D: + = left turn - = right turn & = pitch down
Head Up + = left turn - = right turn & = pitch down ^ = pitch up / = roll right \ = roll left

13 Growth Functions: F(k) = length of the kth word in the derivation sequence. Example: a aa Axiom: a F(k) = 2k a abcc b bcc c c Axiom: a a abcc abccbcccc abccbccccbcccccc F(k) = k2 F(

14 Growth Functions: G: a b b ab Axiom: b
ak = number of a’s at iteration k. bk = number of b’s at iteration k. ak bk ak+1 bk+1 = Theorem: Every growth function for an L-system is a linear combination of terms that are polynomials times exponential functions. Problem: Plants usually grow according to a logistic (or sigmoidal) function.

15 Parametric L-Systems:
Axiom: A(3) A(x) : x< B(x+1)A(x*r) B(y) : * F(y)[+F(y/2)][-F(y/2)] Interpretation: F(x) means draw a segment of length x. +(x) means turn left x degrees.

16

17

18 Context Sensitive L-Systems
Axiom: SFFFFA Production: SF FS SA B SFFFFA FSFFFA FFSFFA FFFSFA FFFFSA FFFFB Axiom: S[FA][FFA] S[FA][FFA] [FSA][FSFA] [FB][FFSA] [FB][FFB]

19 Developmental model using signals:

20

21 L-System Extensions: Gravity - pull on branches.
Phyllotaxis - angle and position of branches. Phototropism - towards the light. Self-Organizing - branch into free spaces. Implementation: At each iteration, interpret the string and then decide based on the geometry and environment how to apply productions for the next iteration.

22 Colonization Algorithm: (Runions, Lane, and Prusinkiewicz 2007)

23 Colonization Algorithm:

24 Self-Organization Algorithm: (Palubicki 2009)

25 Self-Organization Algorithm:

26 Equivalence: G1: a bb b a Axiom: b b a bb aa bbbb
G2: a b b aa Axiom: a a b aa bb aaaa L(G1) = L(G2) Is there an algorithm for determining if two L-Systems are equivalent?

27 Connection between Languages and Machines
Recursively Enumerable Context Sensitive Context Free Regular L-Systems

28

29

30

31

32

33

34 Iterated Function System:


Download ppt "How to Draw a Tree L-Systems in Computer Graphics Steven Janke."

Similar presentations


Ads by Google