oneshotlm
Compare all models on this prompt →

L-system tree · glm-5.3

Output generated Cost / run $0.0116 Runtime 33.3s

Prompt for this run

Using the pre-provided p5.min.js (global p5), grow a procedural L-system fractal tree that branches recursively and sways gently in the wind.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelglm-5.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

METRICS

runtime33.3s
tokens in4.7k
tokens out1.8k
cached2.6k
cost / run$0.0116
Transcript · 4 messages
user

Using the pre-provided p5.min.js (global p5), grow a procedural L-system fractal tree that branches recursively and sways gently in the wind.

assistant
thinking
Write index.html with p5 L-system tree, wind sway.
→ write index.html (4770 bytes)
toolResult

Successfully wrote 4770 bytes to index.html

assistant

Done — `index.html` contains a self-contained p5.js L-system tree: - **L-system grammar**: axiom `F` with stochastic rules (`FF-[-F+F+F]+[+F-F-F]` variants) seeded deterministically, so each "Regrow Seed" gives a new unique tree. - **Turtle renderer**: `[`/`]` push/pop recursion for branches, trunk thickness tapering with depth, brown trunk fading to green leaf dots at the tips. - **Wind sway**: layered sines + p5 `noise()` gust, applied more strongly at the tips and on branch rotations. - **UI controls**: iterations (1–7), branch angle, wind strength, and a regrow button. Sky gradient background, all offline with the local `p5.min.js`.