oneshotlm
Compare all models on this prompt →

L-system tree · kat-coder-pro-v2

Output generated Cost / run $0.0065 Runtime 47.5s

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

modelkat-coder-pro-v2
vendorKwaipilot
harnesspi-agent
generated2026-07-31

METRICS

runtime47.5s
tokens in14k
tokens out4.3k
cached12k
cost / run$0.0065
Transcript · 6 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

I'll create a procedural L-system fractal tree with gentle wind sway using p5.js. Let me build this interactive visualization.

→ write /workspace/index.html (15483 bytes)
toolResult

Successfully wrote 15483 bytes to /workspace/index.html

assistant
→ bash {"command":"ls -la /workspace/index.html"}
toolResult

-rw-r--r-- 1 node node 15487 Jul 31 08:49 /workspace/index.html

assistant

I've created a beautiful procedural L-system fractal tree that grows and sways gently in the wind. Here's what's included: **Features:** - **Recursive branching**: The tree grows using L-system principles with customizable depth (3-10 levels) - **Wind animation**: Natural swaying motion using multiple sine waves, with flexibility increasing toward the tips - **Visual details**: - Color gradient from brown trunk to green tips - Leaves at branch ends - Starry night background with twinkling stars - Ground with gradient effect - **Interactive controls**: - Branching depth - Branch angle - Initial trunk length - Wind strength - Wind speed - **3D interaction**: Click and drag to rotate the view, scroll to zoom **How to use:** 1. Open `index.html` in a web browser 2. Adjust the sliders on the right panel to customize the tree 3. Click and drag on the canvas to rotate the view 4. Scroll to zoom in/out The tree grows from the bottom center, recursively branching with each level becoming thinner and greener. The wind effect is more pronounced at the tips, creating a realistic swaying motion. All animations are smooth and procedurally generated using p5.js.