Lecture 6

Extensions to Rule-Based Plants.

Last time around, we did simple context-free L-systems in 2D. That was great as an introduction to the idea and as the foundation for the first Small Project.

Today, we'll first look at L-systems in their full context-sensitive, parameterized and stochastic glory (as seen in one of Prusinkiewicz's later papers).

Then we'll look a few other extensions which I find interesting. That would be interactions with the environment and the use of position information. I think these extensions are interesting because they blur the line be localized and globalized algorithms

The final extension we'll look at is animation. This extension is interesting because it makes a more powerful turtle and addresses issues in directability.

The following L-system shows all the bells and whistles of an L-system:

(1)
\begin{array} {ll} \omega : & A(1)B(3)A(5) \\ p_1 : & A(x) \rightarrow A(x+1): 0.4 \\ p_2 :& A(x) \rightarrow B(x-1): 0.6 \\ p_3 :& A(x) \langle B(y) \rangle A(z) : y < 4 \rightarrow B(x+z)[A(y)] \end{array}

Context Sensitive L-systems (5.6)

unlike other grammars, in L-systems, one explicitly defines the context.
It appears that the target is a single letter and never a string (still working to confirm this in original papers though…)

Interaction with the environment (5.9)

Prusinkiewcz's paper on Synthetic Topiary

(2)
\begin{array} {lll} L = & \{A,B,F,P, \mu, \% \}, & \\ S = & \{A\}, & \\ R = & \{r_1: A \rightarrow [+B][-B]F?P(x,y)A, & \mbox{make a branch along the spine} \\ & \ r_2: B \rightarrow F?P(x,y)\mu B, & \mbox{grow a branch} \\ & \ r_3: ?P(x,y): 4x^2 + (y-10)^2 > 10^2 & \mbox{split the end of a branch} \\ & \ \ \ \ \ \ \rightarrow [+(2y)F][-(2y)F]\% & \\ \end{array}

the derivation is

(3)
\begin{array} {l} A \\ \Rightarrow (+B)(-B)F?P(x,y)A \\ \Rightarrow (+F?P(x,y)\mu B)(-F?P(x,y)\mu B) F?P(x,y) (+B)(-B)F?P(x,y) A \\ \Rightarrow (+F?P(x,y)\mu F?P(x,y)\mu B)(-F?P(x,y)\mu F?P(x,y)\mu B) F?P(x,y) (+F?P(x,y)\mu B)(-F?P(x,y)\mu B)F?P(x,y) (+B)(-B)F?P(x,y) A \end{array}

Use of position information (5.10)

[By Luther] As far as I can tell, only the toy problems in Prusinkiewicz's papers have productions that use the queries as the replacement target; in his presented algorithms, the queries are used only as context. I therefore propose that their insertion into the string is entirely unnecessary; if the rewriting step keeps track of the turtle location as it applies replacements, it can answer queries on the fly without actually storing any "?P(x,y,z)" substrings. If a context contains a query module/letter/literal/whatever we call them, the rewriting interpreter automatically substitutes the appropriate values into the parameter variables.

page revision: 5, last edited: 24 Jan 2008 23:38