Skip to content

LSystem

voxedit-lsystem

The L-System (Lindenmayer System) generator allows you to create complex procedural structures like trees, bushes, and other organic shapes using a set of rules and parameters.

Parameters

  • Axiom: The initial state string (the seed) of the L-System.
  • Rules: A list of production rules that define how symbols are replaced in each iteration.
    • Predecessor: The character to replace.
    • Successor: The string to replace the predecessor with.
  • Angle: The angle in degrees for rotation commands.
  • Length: The length of the segments drawn by the turtle.
  • Width: The initial width of the segments.
  • Width increment: The amount to increment or decrement the width when using width commands.
  • Iterations: The number of times the rules are applied to the axiom. Higher values create more complex structures but take longer to generate.
  • Leaves radius: The radius of the leaves generated by the 'L' command.

Commands

The L-System uses a "turtle" graphics approach where a cursor moves through 3D space following these commands:

Command Description
F Draw line forwards
( Set voxel type
b Move backwards (no drawing)
L Generate a leaf
+ Rotate right
- Rotate left
> Rotate forward
< Rotate back
# Increment width
! Decrement width
[ Push state (save position and rotation)
] Pop state (restore position and rotation)

Templates

VoxEdit comes with several built-in templates to get you started:

  • Simple Tree: A basic tree structure that branches in 4 directions.
  • Dense Bush: Short, wide, and bushy with many leaves.

Usage

  • Select a Template: Start by selecting a template from the dropdown menu to see how it works.
  • Modify Parameters: Adjust the angle, length, and iterations to change the shape and size of the generated structure.
  • Edit Rules: Add or modify rules to create custom branching patterns.
  • Adopt Dimensions: Use the "Adopt Dimensions" button to automatically adjust the length and width parameters based on the current selection or volume size.
  • Generate: Click "OK" to generate the voxel structure at the reference position.

Tip: Use the [ and ] commands to create branching structures. [ saves the current position and direction, allowing you to draw a branch, and ] restores the saved state to continue from the branching point.