The plants images/geometry (no mesh) are generated using L-systems from [1]. For simplicity, we do not consider the stochastic and context sensitive L-systems. We do not generate high-resolution flowers, leaves, and so on, but only generate trees.
-
$V$ , alphabet -
$w\in V^+$ , axiom -
${p_1, p_2, ...}$ , where$p_i=(a, \chi)\in(V, V^*)$ , A set of production rules -
$n$ , #iterationsFrom my understanding, the L-system is very similar to the Context Free Grammar (CFG), where we have
-
$V$ , alphabet -> all non-terminals -
$w\in V$ , a start symbol -> non-terminal -
${p_1, p_2, ...}$ , where$p_i=(a, \chi)\in(V, V^*)$ , A set of production rules- To align with the definition of L-system, I finetuned the definition by removing the terminals, but make the right side of the production rule to be
$V^*$ instead of$V^+$
- To align with the definition of L-system, I finetuned the definition by removing the terminals, but make the right side of the production rule to be
except that, in the L-system
- The axiom can have multiple symbols
- In each iteration, we must replace all the symbols using all the productions at the same time.
- The L-system is parallel, thus representing the growth.
- The Context Free Grammar is linear, which makes it more flexible
-
-
General
-
$l$ , step size -
$F$ (and$F_l, F_r$ ), move towards$H$ for a distance of$l$ -
$f$ , move towards$H$ for a distance of$l$ without drawing a line -
$[$ , start branching, push current node to stack -
$]$ , end branching, pop last node from stack - {, start outlining a leaf
- }, end outlining a leaf
-
$'$ , increase the current index of color -
$A, B, C, ...$ , do nothing
-
-
2-Dimension
-
$H=(H_x, H_y)$ , turtle heading direction -
$P=(P_x, P_y)$ , turtle 2D position -
$\delta=\alpha$ :-
$+$ , turn$H$ towards left for$\alpha$ degree -
$-$ , ... right ...
-
-
Sample 2D non-parametric trees outputs
Parameters refer to Figure 1.24 in Sec 1.6.3 Bracketed OL-systems (p.25) in [1].
-
-
3-Dimension
-
$H=(H_x, H_y, H_z)$ , turtle heading direction -
$L=(L_x, L_y, L_z)$ , turtle left direction -
$U=(U_x, U_y, U_z)$ , turtle up direction -
$P=(P_x, P_y, P_z)$ , turtle 3D position -
$\delta=\alpha$ : (right-hand rule)-
$+$ , rotate around$U$ towards left for$\alpha$ degree -
$-$ , ... right ... - &
-
-