Description Usage Arguments Details Value See Also
This is the central function for rewriting an initial string of symbols (the axiom) into a new string using production rules. Production rules are very simple: if the symbol is A, turn it into something. If it is B, turn it into something else. Production rules typically contain instructions about moving while drawing, moving w/o drawing, changing direction, or storing the current state for re-use later.
1 |
init |
A character string giving variables (symbols) to use as the initial string Also known as the axiom. |
rules |
A data frame containing columns "inp" and "out". These contain the input
variables and the corresponding replacement string. See the examples in
|
n |
An integer giving the number of cycles or iterations desired. |
retAll |
Logical. If |
verbose |
An integer giving the level of information desired as the calculation
proceeds. |
The job of this function is to take an input "axiom" and apply the "production
rules" and other paramters to create a new string of drawing instructions. The
"language" or character set of the axiom and production rules are arbitary, and
the internet and literature contains many different examples. The same fractal
could be drawn using completely different sets of symbols. The string produced
by this function is processed by drawLsys
. See there for further
explanation and examples.
If retAll = FALSE
, a character vector of length 1 giving the string
at the end processing. Otherwise, a character vector of length n + 1
containing init
plus the results at the end of each iteration.
drawLsys
for examples, including plotting.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.