oneshotlm
Compare all models on this prompt →

L-system tree · qwen3.5-plus-02-15

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 ↗
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
The user wants me to create a single-page web app with a procedural L-system fractal tree that branches recursively and sways gently in the wind. I need to use the pre-provided p5.min.js library.

Let me create an index.html file with:
1. CSS in a <style> tag
2. JS in a <script> tag
3. Load p5.min.js from the current directory
4. Implement an L-system fractal tree with wind animation

An L-system tree typically uses rules like:
- F = draw forward
- + = turn right
- - = turn left
- [ = save state
- ] = restore state

For a tree, common rules are:
- Axiom: F
- Rule: F -> FF+[+F-F-F]-[-F+F+F]

Or simpler:
- Axiom: X
- Rule: X -> F+[[X]-X]-F[-FX]+X
- Rule: F -> FF

Let me create a beautiful procedural tree with gentle wind sway.
write /tmp/ws/index.html (6647 bytes)
toolResult

Successfully wrote 6647 bytes to /tmp/ws/index.html

assistant
thinking
Done! I've created a self-contained `index.html` file with a procedural L-system fractal tree that:

1. **L-System Grammar**: Uses the axiom "X" with rules that create complex branching patterns
2. **Recursive Branching**: The L-system sentence is interpreted to draw branches recursively with push/pop for branch states
3. **Wind Animation**: Branches sway gently using sine waves based on depth in the tree structure
4. **Visual Features**:
   - Gradient night sky with stars and moon
   - Color gradient from trunk brown to leaf green based on branch depth
   - Leaves drawn at branch ends
   - Falling leaves animation
   - Ground plane

5. **Interactivity**:
   - Click to regenerate with new random parameters
   - Press 'S' to save the canvas as PNG

The tree sways organically with wind affecting branches differently based on their depth in the hierarchy.

Created `index.html` with a procedural L-system fractal tree featuring: - **L-System grammar** with axiom "X" and branching rules for complex recursive structure - **Wind animation** - branches sway using sine waves, with deeper branches swaying more - **Visual polish** - gradient night sky, stars, moon, color gradient from trunk to leaves - **Falling leaves** that drift down with the wind - **Interactivity** - click to regenerate with new parameters, press 'S' to save Open `index.html` in a browser to see the tree sway 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

modelqwen3.5-plus-02-15
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

A small L-system tree with leaves sways gently in the wind against a starry night sky; tree seems oddly stunted/sideways.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.3%
on click1.2%
on drag0.6%
on wheel0.4%
on enter + space0.4%
on arrow keys0.4%
on w/a/s/d0.4%
frame spread18.2 / 255
console errors0
js errors none

METRICS

runtime38.1s
tokens in5.7k
tokens out2.8k
cached0
cost / run$0.0059