Glossary - mt-sane/lsystem GitHub Wiki
A sequence of charactes.
The function of the system that executes the current axiom to buld the next generation.
A function that is called on rules whenever their character is met in the system's axiom while building the next generation.
The current axiom of the system.
The rules define how the current generation is to be transformed into the next. In the simplest case that is by replacing the charactes of the old axiom by the charactes of the rule.
Each system has it's own pseudo random number generator. That generator does not produce genuine random numbers instead it produces a very long sequence of numbers that are spread quite evenly over the generator's number space.
The number sequences are selected by a seed number.
The seed selects the number sequence generated by the random number generator.
If you set the seed you get reproducable results.
If you don't set the seed explicitly the random number generator is seeded implicitly with os.time()
.
Note that this way all systems that a created within the same second get the same seed and thus produce the same results.
The state carries the information that the rules can use to make their decisions.
There are two kinds of states: global and a local.
Global state is kept from generation to generation.
Local state is reset each generation.
Global state information is set in the LSystem.New
function. It can be read by the build functions of the rules.
Global values can also be set but this is rarely uesfull.
Local state information is set in the LSystem.New
function. It can be accessed and manipulated by the build functions of the rules.
Each call to Build
the local state is reset to it's initial values.
The system is the center piece which contains the other parts. It is used to build the l-system's generations. Generations are essentially axioms that are generated out of the axiom of a previous generation using rules.