Plant Growing
By
Ali Lakhia
Motivation
- Artistic: Appreciate beauty in natural
forms.
- Scientific: Understand and simulate plants
and their development.
How to Model Plants?
- L-systems:
- Formulated by biologist Aristid Lidenmayer [1968].
- It is a string rewriting mechanism that models plants effectively.
- Consists of a set of alphabet, a non-empty starting word and a set of productions.
L-system Algorithm
- Begin with start symbol.
- 1 iteration consists of:
- Apply all applicable productions in parallel.
- Symbols are replaced with new symbols to yield a new word.
- Interpret new word to create a graph.
- Visualize graph with geometric information encoded in word.
- Repeat
Simple L-system Example
- 2D Bracketed L-system
- Start symbol: L
- Production: L -> F[+L][-L]
- Interpretation based on LOGO language
- F moves the turtle forward
- L draws the leaf
- + rotates α degrees CCW
- - rotates α degrees CW
Challenges & Solutions
- Challenge: String rewriting cause discrete, non-continuous changes
- Solution: Add a parameter to each symbol
[Prusinkiewicz & Lindenmayer 1990; Hanan 1992], e.g.:
- Start symbol: A7
- Productions: A7 -> F[+A4]F[-A1]FL
- Ai -> Ai+1
- Alternate Solution: Use current time as a
parameter
- Challenge: Plant does not grow
linearly
- Solution: Use Sigmoidal growth
function (shown on right)
Challenges & Solutions (contd)
- Challenge: Real growth is more
randomized
- Solutions:
- Stochastic L-system: One of many
productions for each symbol selected based on probability
- Randomized L-system: Parameters
randomly selected
- Challenge: Maintaining Temporal Coherence
- Depth first traversal: Using same seed
for random generator with each iteration not feasible
- Solution:
- Maintain a tree of states that corresponds to
parse tree of L-system
- Each symbol visited the first time gets a
random state that is saved in a new node in tree
- All other symbols reuse state from tree
Results
- Rendered using RenderMan compatible shader, Pixie: