Create growth system
create_growth_systemBuild a procedural vine/tree generator in TouchDesigner with L-system rewriting, 3D turtle drawing, and stochastic rule selection. Returns container path, preview, and adjustable parameters.
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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_growth_system"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Container baseCOMP name. | growth_system |
| seed | No | RNG seed for stochastic rule selection. | |
| axiom | No | Initial string before rewriting. | F |
| color | No | Constant MAT colour (RGB, 0..1). | |
| rules | No | Context-free rewriting rules. Multiple rules sharing the same `from` symbol trigger weighted-random stochastic choice (weight defaults to 1). | |
| parent | No | Parent network where the container is created. | /project1 |
| thickness | No | Tube SOP radius for the rendered branches. | |
| branchAngle | No | Turtle turn angle (degrees) for + / - / & / ^ / \ / / symbols. | |
| generations | No | Rewrite iterations. Capped at 7 because string length grows ~k^n and freezes the SOP cook. | |
| step_length | No | World units per F stroke. | |
| expose_controls | No | Expose Generations / BranchAngle / StepLength / Thickness on the container. |