oneshotlm
Compare all models on this prompt →

Reaction-diffusion · mimo-v2.5

Run a Gray-Scott reaction-diffusion simulation on a canvas that grows organic Turing patterns in real time, with the mouse seeding new growth.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Run a Gray-Scott reaction-diffusion simulation on a canvas that grows organic Turing patterns in real time, with the mouse seeding new growth.

assistant
thinking
The user wants a Gray-Scott reaction-diffusion simulation running on a canvas. Let me build this as a single self-contained HTML file with:

- Gray-Scott model: two chemicals U and V- ∂U/∂t = Du∇²U - UV² + F(1-U)
- ∂V/∂t = Dv∇²V + UV² - (F+k)V

- Canvas rendering
- Mouse interaction to seed growth (inject V chemical)
- Real-time animation using requestAnimationFrame
- Web Workers could help for performance but let's try pure JS first with maybe an offscreen canvas approach- I'll use a small grid like 256x256 for performance and render it scaled up to the full canvas
- I'll try the "solitons" parameters (F=0.030, k=0.062) for nice organic patterns, or maybe "coral growth" (F=0.0545, k=0.062)
- For rendering, I'll use a pixel buffer approach or ImageData for performance
- To optimize, I'll use typed arrays (Float32Array) for U and V, compute the Laplacian with a 3x3 kernel, apply the reaction-diffusion equations, and render with ImageData

Writing the simulation code...
write /workspace/index.html (8473 bytes)
toolResult

Successfully wrote 8473 bytes to /workspace/index.html

assistant
thinking
Done. The file is written.

Done — `index.html` is ready at `/workspace/index.html`. **What's inside:** - **Gray-Scott reaction-diffusion** on a 256×256 grid with periodic boundaries, double-buffered - **Real-time rendering** via `ImageData` with an organic colour palette (dark navy → teal → amber → white-gold mapped to V concentration) - **8 simulation steps per frame** for smooth evolution - **Mouse/touch interaction** — click & drag to seed fresh V chemical growth at the cursor - **Interactive controls:** - **Feeding (F)** and **Kill (k)** sliders to explore the full parameter space live - **Brush size** slider - **Clear**, **Random Seed**, and three presets (**Maze**, **Coral**, **Mitosis**) buttons - Fully self-contained — no external resources Just open it in a browser and start clicking to grow patterns!

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

modelmimo-v2.5
vendorXiaomi · MiMo
harnesspi-agent
generated2026-07-08

EVALUATION

4/5 working

Gray-Scott reaction-diffusion runs continuously, forming organic maze/coral patterns; growth continues but click/drag seeding not clearly visible.

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 motion44.4%
on click28.8%
on drag16.5%
on wheel9.0%
on enter + space6.6%
on arrow keys17.6%
on w/a/s/d3.6%
frame spread38.9 / 255
console errors0
js errors none

METRICS

runtime33.8s
tokens in3.4k
tokens out3.5k
cached3.3k
cost / run$0.0015