oneshotlm
Compare all models on this prompt →

Reaction-diffusion · mimo-v2.5-pro

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 · 3 messages
assistant
thinking
The user wants a Gray-Scott reaction-diffusion simulation as a single-page web app. Let me create a self-contained index.html with:

1. A canvas element
2. CSS styling
3. JavaScript implementing the Gray-Scott model
4. Mouse interaction to seed new growth

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

Parameters for interesting patterns:
- Du = 0.16 (or0.21)


- Dv = 0.08 (or 0.105)  
- f = 0.035-0.06 (feed rate)
- k = 0.06-0.065 (kill rate)

For real-time performance, I need to handle the simulation grid efficiently since computing diffusion on every cell is computationally expensive. I'll use typed arrays for the grid, implement the Laplacian operator, and run multiple simulation steps per frame to keep the animation smooth. When the user clicks or moves the mouse, I'll add V chemical in that area to seed new patterns.

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

Successfully wrote 6861 bytes to /workspace/index.html

assistant
thinking
The file is written. Let me verify it's there and looks correct.

The file is ready at `/workspace/index.html`. Here's what it does: **Gray-Scott Simulation** - 400×300 grid with toroidal (wrapping) boundaries - Runs **8 sub-steps per frame** for fast, visible pattern growth - Classic Laplacian stencil for diffusion with feed (f) and kill (k) rates **Organic Turing Patterns** - Initialized with 12 random seed patches that grow into mitosis-like cell division patterns - V concentration mapped to a blue → cyan → white palette for a lush organic look **Mouse Interaction** - **Click & drag** anywhere on the canvas to inject fresh V chemical with an 8px radius brush, seeding new pattern growth right where you point **Presets** - Click the **f** or **k** values in the HUD overlay to cycle through 6 named parameter presets: *Mitosis, Solitons, Pulsating, Worms, Fingerprints, Buds* — each produces visually distinct Turing 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-pro
vendorXiaomi · MiMo
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Gray-Scott reaction-diffusion grows organic Turing patterns that fill the canvas over time; click/drag seed growth, keyboard has little effect.

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 motion43.5%
on click49.3%
on drag33.9%
on wheel1.7%
on enter + space4.3%
on arrow keys2.8%
on w/a/s/d2.9%
frame spread93.3 / 255
console errors0
js errors none

METRICS

runtime88.8s
tokens in4.5k
tokens out3.0k
cached1.7k
cost / run$0.0046