Create growth system
create_growth_systemConstruct a procedural L-system vine or tree by iterating a grammar and walking the result as a 3D turtle, then thicken and render the polyline.
Instructions
Build an L-system / vine-growth generator: a Script SOP iterates a context-free rewriting grammar from axiom for generations steps, then walks the resulting string as a 3D turtle to draw a polyline tree. Recognised symbols: F (forward draw), f (forward no draw), + - (yaw ± branchAngle), & ^ (pitch), \ / (roll), [ ] (push/pop state). Other symbols are no-op constants (use X/A/B as grammar variables that expand but don't draw). Multiple rules sharing a from symbol trigger weighted-random stochastic selection (weight defaults to 1; seed controls the RNG). The polyline tree is thickened with a Tube SOP, recentred, and rendered. Complements create_particle_flock (boids) and create_gpu_particle_field (curl-noise) as the deterministic CPU-geometry idiom. Returns a summary plus a JSON block with the container path, output path, rules DAT path, exposed controls, errors, warnings, and an inline preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Container baseCOMP name. | growth_system |
| parent | No | Parent network where the container is created. | /project1 |
| rules | No | Context-free rewriting rules. Multiple rules sharing the same `from` symbol trigger weighted-random stochastic choice (weight defaults to 1). | |
| generations | No | Rewrite iterations. Capped at 7 because string length grows ~k^n and freezes the SOP cook. | |
| axiom | No | Initial string before rewriting. | F |
| branchAngle | No | Turtle turn angle (degrees) for + / - / & / ^ / \ / / symbols. | |
| step_length | No | World units per F stroke. | |
| thickness | No | Tube SOP radius for the rendered branches. | |
| color | No | Constant MAT colour (RGB, 0..1). | |
| seed | No | RNG seed for stochastic rule selection. | |
| expose_controls | No | Expose Generations / BranchAngle / StepLength / Thickness on the container. |