Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
How to Draw a Tree PowerPoint Presentation
Download Presentation
How to Draw a Tree

How to Draw a Tree

113 Vues Download Presentation
Télécharger la présentation

How to Draw a Tree

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
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: 00110010 00101011 00110011 00110101 2 + 3 5

  7. 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) = { anb | 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) = { anb | 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. 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 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 1 4 9 16 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. 0 1 1 1 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<5 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. 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]

  17. Developmental model using signals:

  18. 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.

  19. Colonization Algorithm: (Runions, Lane, and Prusinkiewicz 2007)

  20. Colonization Algorithm:

  21. Self-Organization Algorithm: (Palubicki 2009)

  22. Self-Organization Algorithm:

  23. 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?

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

  25. Iterated Function System: