fractal_tree_model {fractalforest} | R Documentation |
Build a 2D L-System Tree from Predefined Tree Templates
Description
This function generates 2D L-system trees using predefined templates. Each template is based on a specific tree model, and the function allows you to control the number of iterations to generate the desired tree structure.
Usage
fractal_tree_model(tree_model, n_iter)
Arguments
tree_model |
An integer or a character string specifying the desired tree model. The following models are available:
|
n_iter |
An integer specifying the number of iterations to build the tree. Each tree model has its own default value, but it can be overridden by specifying this parameter. |
Details
This function uses a set of predefined L-system rules to generate the tree structure. The rules for each tree model are stored in the rules
data frame. The default number of iterations (n_iter
) for each tree model is specified in the list above. If n_iter
is not provided, the default value for the selected tree model will be used.
Value
A list representing the L-system tree structure after applying the specified number of iterations.