Graphics Reference
In-Depth Information
S
FAT
A T [ FBF ]
A F F
B
S
FAT
F[ FBF]F
F[ F[ FAF]F]F
[
FAF ]
T F
Production rules
String sequence
FIGURE 12.17
Context-sensitive L-system production rules.
Context free versus context sensitive
So far, only context-free L-systems have been presented. Context-sensitive L-systems add the ability to
specify a context, in which the left-hand side (the predecessor symbol) must appear in order for the
production rule to be applicable. For example, in the deterministic productions of Figure 12.17 , 3
the symbol A has different productions depending on the context in which it appears. The context-
sensitive productions shown in the figure have a single right-side context symbol in two of the pro-
ductions. This concept can be extended to n left-side context symbols and m right-side context symbols
in the productions, called ( n , m ) L-systems , and, of course, they are compatible with nondeterministic
L-systems. In ( n , m ) L-systems, productions with fewer than n context symbols on the left and m on the
right are allowable. Productions with longer contexts are usually given precedence over productions
with shorter contexts when they are both applicable to the same symbol. If the context is one-sided, then
L-systems are referred to as n L-systems, where n is the number of context symbols and the side of the
context is specified independently.
12.2.3 Animating plant growth
There are three types of animation in plants. One type is the flexible movement of an otherwise static
structure, for example, a plant being subjected to a high wind. Such motion is an example of a flexible
body reacting to external forces and is not dealt with in this section. The other types of animation are
particular to plants and involve the modeling of the growth process.
The two aspects of the growth process are (1) changes in topology that occur during growth and (2)
the elongation of existing structures. The topological changes are captured by the L-systems already
described. They occur as discrete events in time and are modeled by the application of a production that
encapsulates a branching structure, as in A ) F [
þF ] B .
Elongation can be modeled by productions of the form F )
FF. The problem with this approach
is that growth is chunked into units equal to the length of the drawing primitive represented by F .If
F represents the smallest unit of growth, then an internode segment can be made to grow arbitrarily
long. But the production rule F )
FF lacks termination criteria for the growth process. Additional
drawing symbols can be introduced to represent successive steps in the elongation process, resulting
in a series of productions F 0 ) F 1 , F 1 ) F 2 , F 2 ) F 3 , F 3 ) F 4 , and so on. Each symbol would rep-
resent a drawing operation of a different length. However, if the elongation process is to be modeled in,
3 In the notation used here, as it is in the topic by Prusinkiewicz and Lindenmayer [ 16 ], the predecessor is the symbol on the
“greater than” side of the inequality symbols. This is used so that the antecedent can be visually identified when using either
left or right contexts.
 
Search WWH ::




Custom Search