L-system tree · gpt-4.1-mini
Output generated Cost / run $0.0029 Runtime 33.4s
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.
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
METRICS
Transcript · 4 messages
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.
I will create a self-contained single-page web app named index.html that uses p5.min.js (already present) to draw a procedural L-system fractal tree with recursive branching and gently swaying branches in the wind. The app will show the tree growing step by step and continuously sway later. Now I will write index.html with all code inline per the instructions.
index.html (3045 bytes)Successfully wrote 3045 bytes to index.html
I created index.html with a p5.js app that grows a recursive L-system fractal tree branch by branch. The branches sway gently in the wind using a sinusoidal function that varies sway over time, branch level, and position for a natural effect. Open the index.html in a browser to watch the tree grow and sway on a dark background. Let me know if you want it adjusted or enhanced!