Graphics Reference
In-Depth Information
say, one hundred time steps, then approximately one hundred symbols and productions are required. To
avoid this proliferation of symbols and productions, the user can represent the length of the drawing
operation parametrically with the drawing symbol in parametric L-systems .
Parametric L-systems
In parametric L-systems, symbols can have one or more parameters associated with them. These
parameters can be set and modified by productions of the L-system. In addition, optional conditional
terms can be associated with productions. The conditional expressions are in terms of parametric
values. The production is applicable only if its associated condition is met. In the simple example
of Figure 12.18 , the symbol A has a parameter t associated with it. The productions create the symbol
A with a parameter value of 0.0 and then increase the parametric value in increments of 0.01 until it
reaches 1.0. At this point the symbol turns into an F .
Context-sensitive productions can be combined with parametric systems to model the passing of
information along a system of symbols. Consider the production of Figure 12.19 . In this production,
there is a single context symbol on both sides of the left-hand symbol that is to be changed. These pro-
ductions allow for the relatively easy representation of such processes as passing nutrients along the
stem of a plant.
Timed L-systems
Timed L-systems add two more concepts to L-systems: a global time variable , which is accessible to all
productions and which helps control the evolution of the string; and a local age value . t i , associated
with each letter m i . Timed L-system productions are of the form shown in Equation 12.6 . By this pro-
duction, the letter m 0 has a terminal age of b 0 assigned to it. The terminal age must be uniquely assigned
to a symbol. Also by this production, each symbol m i has an initial age of a i assigned to it. The terminal
age assigned to a symbol m i must be larger than its initial age so that its lifetime , b i a i , is positive.
ðm 0 ; b 0 Þ)ððm 1 ; a 1 Þ; ðm 2 ; a 2 Þ; ...; ðm n ; a n ÞÞ
(12.6)
A timed production can be applied to a matching symbol when that symbol's terminal age is
reached. When a new symbol is generated by a production, it is commonly initialized with an age
of zero. As global time progresses from that point, the local age of the variable increases until its ter-
minal age is reached, at which point a production is applied to it and it is replaced by new symbols.
A string can be derived from an axiom by jumping from terminal age to terminal age. At any point
in time, the production to be applied first is the one whose predecessor symbol has the smallest
S
> A (0)
A ( t )
>
A ( t
0.01)
A ( t ) : t 1.0 > F
FIGURE 12.18
Simple parametric L-system.
A ( t 0) A ( t 1) A ( t 2): t 2 t 1 & t 1 t 0 => A ( t 10.01)
FIGURE 12.19
Parametric, context-sensitive L-system production.
 
Search WWH ::




Custom Search