Nature node

lsystem

Generic L-system with a 3D turtle (Y up, starts at origin heading +Y). Symbols: F/G draw forward, f move without drawing, + - yaw (left/right), & ^ pitch (down/up), \ / roll, | turn around, [ ] push/pop state, ! shrink width, L leaf; other letters are placeholders for rules. Output: open polylines (with point attrib 'width' and prim attrib 'depth') or tube meshes (material 'bark', leaves material 'leaf').

Inputs

None: this node generates geometry from its parameters.

Parameters 15

axiomstring
Default X

Start string.

ruleslist
Default ["X=F+[[X]-X]-F[-FX]+X","F=FF"]

Production rules 'A=replacement' (also 'A->...'). Classic examples: fractal plant X=F+[[X]-X]-F[-FX]+X, F=FF (angle 25); bush F=FF+[+F-F-F]-[-F+F+F] (axiom F, angle 22.5); 3D tree A=[&FL!A]/////[&FL!A]///////[&FL!A], F=S/////F, S=FL (axiom A, angle 22.5).

iterationsint
Default 5Range 0 to 12

Rewriting generations (string grows exponentially; keep <= 6 for branching rules).

anglefloat
Default 25

Turn angle in degrees for + - & ^ \ /.

stepfloat
Default 0.1Range 0.0001 to …

Forward step length for F/G/f.

step_scalefloat
Default 1Range 0.01 to …

Step multiplier applied at every '[' (smaller twigs).

angle_jitterfloat
Default 0Range 0 to …

Random angle variation in degrees (organic look).

outputmenu
Default tubesOptions polylines tubes

polylines = open curves (one per unbroken stroke); tubes = closed tapered tube meshes.

radiusfloat
Default 0.02Range 0.0001 to …

Tube radius at the root (tubes).

width_scalefloat
Default 0.7Range 0.05 to 1

Radius multiplier at '[' and '!' (thinner branches).

sidesint
Default 5Range 3 to 16

Tube sides.

leavestoggle
Default off

Put a leaf card at every 'L' symbol (or at stroke ends if no L).

seedint
Default 0

Seed for angle_jitter.

translatevector 3
Default [0, 0, 0]

Position of the generated asset

rotate_yfloat
Default 0

Rotation around Y in degrees

Use it

Add it from the node menu (right-click empty graph space or Tab, then type lsystem), ask the AI for it by name, or add it with a graph op from the API or MCP:

{"op":"add","type":"lsystem","name":"my_lsystem","params":{},"inputs":[]}

Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.