Download LPFG user`s manual - Algorithmic Botany

Transcript
2.2.3 Axiom
The axiom statement defines the L-system's axiom. Its syntax is:
axiom: module-string;
where the module-string is a sequence of modules. Some valid axioms are:
axiom: A(1,2) B() A(0,0);
axiom: A( idx*2, (int)(sin(x*M_PI)) );
If a module has no parameters, you may omit the parentheses:
axiom: A(1,2) B A(0,0);
2.2.4 ignore and consider
These statements have the following syntax:
ignore: module_names;
or
consider: module_names;
where module_names is a sequence of module names. Valid ignore or consider
statements include:
ignore: F P RollR;
consider: G A Circle;
Only one of ignore or consider may be used in an L+C program. They affect
which modules are considered in context matching when applying productions. By
default, all modules are considered when matching contexts. (More or less: see the
Appendix How productions are matched.) When an ignore statement is used, all
modules listed in it are ignored for the purposes of matching context. If a consider
statment is used, only those modules listed are considered in context matching.
SB and EB modules are always considered. Listing them in an ignore or
consider statement has no effect.
2.2.5 Control statements
There are four control statements which are called by lpfg while performing L-system
derivation. The statement Start is called before the string is initialized to the axiom; the
statement StartEach is called before each derivation step; the statement EndEach is
12