Papers
Topics
Authors
Recent
Search
2000 character limit reached

L-System-Based Tree Framework

Updated 7 July 2026
  • L-System-Based Tree Framework is a computational formalism that represents complex, branching structures using recursive symbolic rewriting and state-based operations.
  • It integrates methods such as 2D image-to-sequence translation, CAD-based 3D simulation, and local admissibility constraints to ensure unique and well-formed tree renderings.
  • Applications include biological modeling, forest synthesis, and digital reconstruction, offering practical insights into bridging discrete grammar rules with continuous geometric designs.

An L-System-based tree framework is a computational formalism in which tree-like or arborized structure is represented, generated, reconstructed, or abstracted through a Lindenmayer-system description, a tree model derived from admissibility constraints, or a formally equivalent continuous generator. In the cited literature, such frameworks range from direct image-to-L-System translation for 2D tree topologies, to 3D simulation by combining bracketed rewriting with CAD meshes, to web-based abstraction of arborized biological models, and to smooth analytic-generator trees whose finite-depth scaffold remains isomorphic to a classical discrete specification (Magnusson et al., 2023, Tanveer et al., 2020, Nielen et al., 2024, Mulder, 24 Jan 2026, Krivochen, 2021).

1. Formal representations of tree structure

The corpus presents several nonidentical formalizations of tree structure. In the image-captioning setting, the tree is encoded by a 2D probabilistic Lindenmayer-System

G=(V,ω,P,π,δ,f),G=(V,\omega,P,\pi,\delta,f),

where V={F,+,,[,]}V=\{F,+,-,[,]\} is the alphabet of turtle-graphics commands, ωV+\omega\in V^+ is the axiom, PV×VP\subseteq V\times V^* is the set of productions, π:P(0,1]\pi:P\to(0,1] assigns production probabilities in the synthetic data generator, δR\delta\in\mathbb{R} is the fixed branching angle, and fR+f\in\mathbb{R}^+ is the fixed forward step length. The turtle interpretation is explicit: FF means “move forward and draw,” ++ means “rotate right by δ\delta,” V={F,+,,[,]}V=\{F,+,-,[,]\}0 means “rotate left by V={F,+,,[,]}V=\{F,+,-,[,]\}1,” V={F,+,,[,]}V=\{F,+,-,[,]\}2 means “push turtle state,” and V={F,+,,[,]}V=\{F,+,-,[,]\}3 means “pop turtle state” (Magnusson et al., 2023).

In the CAD-based 3D simulation framework, the formal system is simpler:

V={F,+,,[,]}V=\{F,+,-,[,]\}4

with alphabet V={F,+,,[,]}V=\{F,+,-,[,]\}5, axiom V={F,+,,[,]}V=\{F,+,-,[,]\}6, and three alternative production rules V={F,+,,[,]}V=\{F,+,-,[,]\}7, each producing a different first-order branching pattern. Here V={F,+,,[,]}V=\{F,+,-,[,]\}8 is a nonterminal branch-growth symbol, and V={F,+,,[,]}V=\{F,+,-,[,]\}9 is a drawing symbol interpreted as drawing a small segment. The paper omits explicit numeric values for the forward length and turning angle, and no stochastic parametric extension is formally introduced in the production rules (Tanveer et al., 2020).

A more data-driven 3D abstraction framework defines a parametric, context-free L-system

ωV+\omega\in V^+0

for arborized 3D models. Its variables are

ωV+\omega\in V^+1

where ωV+\omega\in V^+2 denotes an expanded branch segment with length, radius, iteration, and centerline ID; ωV+\omega\in V^+3 denotes a branch-candidate segment with an added lifetime counter; and ωV+\omega\in V^+4 denotes a dead branch. The terminals are bracket and rotation symbols ωV+\omega\in V^+5, and the productions inject geometric statistics extracted from centerlines directly into the grammar parameters (Nielen et al., 2024).

The continuous generalization replaces symbolic rewriting by an analytic generator field. In that setting, each branch is a solution of

ωV+\omega\in V^+6

with ωV+\omega\in V^+7 an internal state trajectory and ωV+\omega\in V^+8 a projection into geometric space. Branching is not encoded as a singularity of the vector field; it is a primitive event at which child trajectories inherit the full generator state exactly (Mulder, 24 Jan 2026).

A separate model-theoretic line of work abandons rewriting rules in favor of local admissibility conditions. For the binary alphabet ωV+\omega\in V^+9, the “Three Laws” constrain legal strings through forbidden local configurations, and these string conditions are mapped to local tree admissibility constraints over a precedence relation PV×VP\subseteq V\times V^*0 and the label set PV×VP\subseteq V\times V^*1 (Krivochen, 2021).

2. Local admissibility, canonicalization, and tree well-formedness

A central issue in L-System-based tree frameworks is not merely expressiveness, but the discipline imposed on the symbolic space so that the representation remains structurally well-formed. In the 2D reconstruction framework, the authors impose five heuristic constraints on generated words to guarantee that each L-System word has a unique 2D drawing, and vice versa. These constraints rule out overlapping segments, canceling rotation pairs, empty branches, noncanonical ordering of siblings, and dangling PV×VP\subseteq V\times V^*2 symbols at the end of a branch. The tokenization further compresses the alphabet to

PV×VP\subseteq V\times V^*3

where the fused tokens PV×VP\subseteq V\times V^*4 and PV×VP\subseteq V\times V^*5 enforce that rotations are always followed by a forward move (Magnusson et al., 2023).

The model-theoretic framework arrives at local structural control from a different direction. Its First Law forbids the substring PV×VP\subseteq V\times V^*6; the Second Law forbids PV×VP\subseteq V\times V^*7; and the Third Law states that a single PV×VP\subseteq V\times V^*8 may be followed by PV×VP\subseteq V\times V^*9 or π:P(0,1]\pi:P\to(0,1]0, though the discussion focuses primarily on Laws 1 and 2. These string constraints are re-expressed as node admissibility conditions on depth-1 treelets. Law 1 becomes

π:P(0,1]\pi:P\to(0,1]1

Law 2 becomes

π:P(0,1]\pi:P\to(0,1]2

and the specialized Lonely-Beta condition forbids π:P(0,1]\pi:P\to(0,1]3. Together they license exactly the elementary local treelets in which a root labeled π:P(0,1]\pi:P\to(0,1]4 may only have one daughter labeled π:P(0,1]\pi:P\to(0,1]5, while a root labeled π:P(0,1]\pi:P\to(0,1]6 may have one daughter labeled π:P(0,1]\pi:P\to(0,1]7 or two daughters π:P(0,1]\pi:P\to(0,1]8, subject to the no-π:P(0,1]\pi:P\to(0,1]9 restriction (Krivochen, 2021).

The same work defines four tree-well-formedness constraints for the global structure: every nonroot node has exactly one mother; every node either has zero daughters or at least one daughter; each depth-1 subgraph must be one of the elementary treelets permitted by the local constraints; and where multiple elementary fragments are possible, the fragment of maximal breadth is selected unless that would violate elementarity. This yields a deterministic bottom-up gluing procedure from admissible strings to rooted directed trees (Krivochen, 2021).

These two lines of work operate at different representational levels, but both enforce local admissibility as a way to stabilize the mapping between strings and trees. This suggests a shared concern with canonicalization: in one case to guarantee unique geometric rendering, and in the other to guarantee a unique or maximally connected structural interpretation.

3. Image-conditioned inference of L-System words

The reconstruction framework in "Towards L-System Captioning for Tree Reconstruction" formulates tree recovery as direct sequence prediction from image data:

δR\delta\in\mathbb{R}0

with the conditional distribution factorized auto-regressively as

δR\delta\in\mathbb{R}1

The objective is to translate a rendered tree image into an L-System word that describes the displayed topology, thereby bypassing point cloud extraction and other intermediate stages usually utilized in tree reconstruction (Magnusson et al., 2023).

The encoder is a small custom CNN with 5 convolutional layers, ReLU activations, and occasional max-pooling, mapping a δR\delta\in\mathbb{R}2 input image to a global feature vector δR\delta\in\mathbb{R}3. The decoder is a 1-layer LSTM of hidden size δR\delta\in\mathbb{R}4. At time step δR\delta\in\mathbb{R}5, the decoder input is the concatenation of a linear projection of δR\delta\in\mathbb{R}6 and the embedding of the previous token δR\delta\in\mathbb{R}7; the LSTM output δR\delta\in\mathbb{R}8 is then mapped through a linear layer and softmax to predict the next token. No explicit spatial or temporal attention is used. Learning is based on sequence cross-entropy,

δR\delta\in\mathbb{R}9

and no extra regularizers or sequence-level losses are reported. The training set consists of 48,267 unique fR+f\in\mathbb{R}^+0 pairs generated synthetically by sampling random derivation depths fR+f\in\mathbb{R}^+1; at each epoch the branching angle is sampled from fR+f\in\mathbb{R}^+2, images are rendered at fR+f\in\mathbb{R}^+3 px, no noise is added, the split is 90%/5%/5%, the optimizer is Adam with learning rate fR+f\in\mathbb{R}^+4, training runs for 495 epochs, and teacher forcing is disabled (Magnusson et al., 2023).

Evaluation is sequence-centric. The reported metrics are perplexity, bits-per-character, and categorical correctness under four classes: Correct, False syntax, Non-terminated, and Residue. On the test set the paper reports fR+f\in\mathbb{R}^+5, fR+f\in\mathbb{R}^+6, cross-entropy fR+f\in\mathbb{R}^+7, exact-match accuracy fR+f\in\mathbb{R}^+8, false-syntax fR+f\in\mathbb{R}^+9, non-terminated FF0, and residue FF1. The work gives no direct comparison to point-cloud or grammar-based pipelines and explicitly presents itself as a proof of concept for image-to-L-System translation (Magnusson et al., 2023).

A further feature is grammar inference without predefined rules. Although the synthetic data are generated from a known procedural grammar, the network does not observe FF2 or FF3 during training; it only sees image-word pairs. At test time it outputs a new L-System word directly. The paper states that, once a corpus of predicted words FF4 has been collected for many images of the same species, one can apply standard grammar inference such as PCFG induction or MCMC-based grammar induction to recover a compact species-specific grammar

FF5

The grammar-induction step itself is not implemented (Magnusson et al., 2023).

4. Discrete 3D simulation, mesh instancing, and forest synthesis

The CAD-based simulation framework uses an iterative rewriting process to generate a branching skeleton, then replaces the resulting line segments with geometric assets. Starting from FF6, each occurrence of the nonterminal FF7 is rewritten by one of the three rules FF8, chosen deterministically or at random, while all other symbols are copied. The resulting string FF9 is then interpreted by a standard turtle in 3D, with ++0 as forward drawing, ++1 and ++2 as fixed-angle rotations, and brackets as push/pop operations (Tanveer et al., 2020).

The transition from symbolic skeleton to full geometry is defined explicitly. If ++3 and ++4 are the endpoints of segment ++5, then

++6

Given a unit CAD branch mesh ++7 with original length ++8, the framework applies an anisotropic scaling

++9

a rotation matrix

δ\delta0

and a translation δ\delta1 that places the mesh base point at δ\delta2. The final transform is

δ\delta3

Leaves are handled analogously by extracting triangular meshes from the CAD file, computing each triangle’s centroid, and attaching a small flat mesh at the end of a sub-branch segment with its own random orientation perturbation (Tanveer et al., 2020).

The paper states that randomization is added in all branches, sub-branches, and leaves placements, but it gives no precise distributions. The summary therefore notes only a canonical interpretation in which branching angles, segment lengths, and leaf orientations are perturbed by uniform distributions, and rule selection may be randomized by probabilities δ\delta4. This should be read as an interpretive reconstruction of the underspecified mechanism rather than as a formal part of the production system (Tanveer et al., 2020).

For forest-scale generation, the framework uses an Inhomogeneous Poisson process over a ground region δ\delta5 with intensity δ\delta6. The number of trees satisfies

δ\delta7

and, conditional on δ\delta8, tree locations are drawn from the density δ\delta9. A Lewis-and-Shedler thinning procedure is described: simulate a homogeneous Poisson process at rate V={F,+,,[,]}V=\{F,+,-,[,]\}00, then accept each candidate point V={F,+,,[,]}V=\{F,+,-,[,]\}01 with probability V={F,+,,[,]}V=\{F,+,-,[,]\}02 (Tanveer et al., 2020).

The same source gives no formal complexity analysis, but it notes that L-system string length grows roughly as V={F,+,,[,]}V=\{F,+,-,[,]\}03 with branching factor V={F,+,,[,]}V=\{F,+,-,[,]\}04 and depth V={F,+,,[,]}V=\{F,+,-,[,]\}05, that geometric complexity grows linearly in the number of segments when meshes are instanced, and that thinning is typically efficient for moderate V={F,+,,[,]}V=\{F,+,-,[,]\}06 (Tanveer et al., 2020).

5. Abstraction of arborized 3D models in a web application

The web-based framework combines visualization, analysis, and L-system generation within a client-server architecture. The front-end is a single-page application built with A-Frame and vanilla JavaScript using an MVC pattern: the View is implemented in index.html with a main and preview A-Frame scene; the Model is a JavaScript object in Settings.js; and the Controller is UserInterface.js, which handles model loading, endpoint selection, analysis requests, parameter edits, and L-system generation. The back-end is a Python Flask micro-service deployed with Gunicorn and Nginx, exposing an /analyze endpoint that runs VMTK-based centerline analysis in a background thread (Nielen et al., 2024).

The data flow is explicit. A mesh file in OBJ or PLY format is loaded in the front-end; source and sink endpoints are selected; the controller posts the model name and endpoint indices as JSON; the Flask handler verifies inputs, spawns a thread, invokes VMTK scripts, computes per-branch length, curvature, torsion, tortuosity, and bifurcation angles, and returns these features as JSON; the front-end updates the state and UI controls; and the L-system engine in lindenmayer.js generates a string that is interpreted by a custom Three.js routine into a cylinder-based tree (Nielen et al., 2024).

The centerline analysis is defined over a closed, manifold mesh with one source and V={F,+,,[,]}V=\{F,+,-,[,]\}07 sinks. It performs Voronoi-based medial-axis extraction, constructs a topology graph of centerline polylines V={F,+,,[,]}V=\{F,+,-,[,]\}08, and computes branch length

V={F,+,,[,]}V=\{F,+,-,[,]\}09

end-to-end distance

V={F,+,,[,]}V=\{F,+,-,[,]\}10

tortuosity

V={F,+,,[,]}V=\{F,+,-,[,]\}11

curvature

V={F,+,,[,]}V=\{F,+,-,[,]\}12

torsion

V={F,+,,[,]}V=\{F,+,-,[,]\}13

and bifurcation angle

V={F,+,,[,]}V=\{F,+,-,[,]\}14

The numerical tolerance for endpoint matching is approximately V={F,+,,[,]}V=\{F,+,-,[,]\}15 (Nielen et al., 2024).

The L-system itself is parametric. The axiom begins with repeated stem symbols and bracketed branch candidates, while the productions update radii by V={F,+,,[,]}V=\{F,+,-,[,]\}16, sample angles and lengths from Gaussian distributions, use a branching probability V={F,+,,[,]}V=\{F,+,-,[,]\}17, and terminate with V={F,+,,[,]}V=\{F,+,-,[,]\}18 otherwise. One representative production is

V={F,+,,[,]}V=\{F,+,-,[,]\}19

The interpreter maps each V={F,+,,[,]}V=\{F,+,-,[,]\}20 symbol to a Three.js CylinderGeometry, uses a transformation-matrix stack for bracketed branching, and can optionally prune intersections by testing new segment bounding volumes against existing segments via Three.js Raycaster / OBB intersection (Nielen et al., 2024).

Two case studies ground the framework. For a lactiferous duct model with approximately 15k faces and 13 manually selected endpoints, centerline extraction yielded 13 centerlines and 11 bifurcations, with mean branch length V={F,+,,[,]}V=\{F,+,-,[,]\}21 px V={F,+,,[,]}V=\{F,+,-,[,]\}22, mean point radius V={F,+,,[,]}V=\{F,+,-,[,]\}23 px V={F,+,,[,]}V=\{F,+,-,[,]\}24, mean bifurcation angle V={F,+,,[,]}V=\{F,+,-,[,]\}25 V={F,+,,[,]}V=\{F,+,-,[,]\}26, and mean iterations V={F,+,,[,]}V=\{F,+,-,[,]\}27 V={F,+,,[,]}V=\{F,+,-,[,]\}28. Generated examples at 10 iterations produced either 16 centerlines and 43 branches or 13 centerlines and 37 branches, with extraction time around 1.5 s, grammar generation around 50 ms, and rendering under 30 ms/frame at 60 fps. For an artery model with approximately 25k faces and 40 endpoints, the extracted features were 40 centerlines, 32 bifurcations, mean branch length V={F,+,,[,]}V=\{F,+,-,[,]\}29 px V={F,+,,[,]}V=\{F,+,-,[,]\}30, mean point radius V={F,+,,[,]}V=\{F,+,-,[,]\}31 px V={F,+,,[,]}V=\{F,+,-,[,]\}32, mean bifurcation angle V={F,+,,[,]}V=\{F,+,-,[,]\}33 V={F,+,,[,]}V=\{F,+,-,[,]\}34, and mean iterations V={F,+,,[,]}V=\{F,+,-,[,]\}35 V={F,+,,[,]}V=\{F,+,-,[,]\}36. A final generated example at 12 iterations had 38 centerlines and 86 branches, with extraction around 2.8 s and grammar-plus-render time around 80 ms plus around 40 ms/frame (Nielen et al., 2024).

6. Smooth analytic generators, discrete equivalence, and known limitations

The analytic-generator framework reformulates tree construction by integrating smooth vector fields in an internal state space and projecting the resulting trajectories into Euclidean space. Branching is implemented by exact state inheritance:

V={F,+,,[,]}V=\{F,+,-,[,]\}37

so each child branch begins from the full parent generator state at the branching event. Child dynamics may then evolve under modified generator fields such as

V={F,+,,[,]}V=\{F,+,-,[,]\}38

or, in a planar curvature-driven form,

V={F,+,,[,]}V=\{F,+,-,[,]\}39

with V={F,+,,[,]}V=\{F,+,-,[,]\}40 and V={F,+,,[,]}V=\{F,+,-,[,]\}41. The paper states two structural results: a combinatorial universality theorem, according to which any discrete tree specification including those arising from iterated function systems and L-systems can be compiled into an analytic generator tree whose induced discrete scaffold is isomorphic at every finite depth, and a canopy set equivalence theorem, according to which the accumulation set of analytic branch endpoints coincides with the attractor of the corresponding discrete construction under standard contractive assumptions (Mulder, 24 Jan 2026).

The worked example uses the classical rule

V={F,+,,[,]}V=\{F,+,-,[,]\}42

with turn angle V={F,+,,[,]}V=\{F,+,-,[,]\}43. The discrete turtle scaffold is embedded in V={F,+,,[,]}V=\{F,+,-,[,]\}44, each edge is replaced by an analytic segment, and finite-depth node locations can be matched exactly. In the straight-line specialization, the per-segment generator solves

V={F,+,,[,]}V=\{F,+,-,[,]\}45

while a more general branch uses

V={F,+,,[,]}V=\{F,+,-,[,]\}46

V={F,+,,[,]}V=\{F,+,-,[,]\}47

The resulting claim is that local geometric smoothness and global recursive fractal structure can be separated: finite combinatorics and asymptotic limit geometry are preserved even when the local realization is analytic rather than piecewise linear (Mulder, 24 Jan 2026).

The practical literature also makes clear that present frameworks remain narrow in scope. The image-to-sequence reconstruction system is limited to simple 2D noiseless silhouettes; real aerial or RGB images introduce occlusion, overlap, and textured backgrounds; the model uses fixed V={F,+,,[,]}V=\{F,+,-,[,]\}48 and V={F,+,,[,]}V=\{F,+,-,[,]\}49 per image; and the absence of explicit attention makes fine, thin branches at deep recursion levels hardest to predict. Proposed extensions include spatial attention over feature maps, a vocabulary with parameterized angles and lengths, and multi-view or volumetric synthetic data for 3D reconstruction with 3D-aware encoders and 3D turtle commands (Magnusson et al., 2023).

The web-based abstraction framework reports good agreement in overall topology for the artery case but also states that the algorithm tends to produce more terminal branches than the anatomical model, at approximately twice the branch count. In the CAD-based forest simulator, explicit numeric values for the step length and turning angle are not given, and no formal complexity analysis is provided. The constraint-based approach, finally, shows that derivationally distinct L-systems such as Fib and bif may still satisfy the same local tree model because they share the same set of allowed elementary depth-1 treelets. A plausible implication is that “L-System-based tree framework” names not a single formalism, but a family of structurally related methods whose unifying feature is recursive branching encoded by admissible symbolic or state-based operations rather than any single grammar syntax (Nielen et al., 2024, Tanveer et al., 2020, Krivochen, 2021).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to L-System-Based Tree Framework.