oneshotlm
Compare all models on this prompt →

Reaction-diffusion · ling-2.6-1t

Output generated Cost / run $0.0048 Runtime 43.4s

Prompt for this run

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 ↗

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

modelling-2.6-1t
vendorinclusionai
harnesspi-agent
generated2026-08-01

METRICS

runtime43.4s
tokens in9.4k
tokens out6.7k
cached1.5k
cost / run$0.0048
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

I'll create a single-page web app that simulates the Gray-Scott reaction-diffusion system, generating organic Turing patterns with mouse interaction for seeding growth.

→ write /tmp/ws/index.html (21341 bytes)
toolResult

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

assistant

I've created a complete Gray-Scott reaction-diffusion simulation as a single HTML file. Here's what it includes: ## Features: **Simulation Core:** - Full Gray-Scott reaction-diffusion equations implemented in JavaScript - Two chemical concentrations (u and v) that react and diffuse across a 2D grid - Laplacian diffusion using 5-point stencil for smooth spreading **Visual Design:** - Rich organic color gradient mapping from deep purple/blue → cyan → teal → green-gold → bright highlights - Subtle glow effects on high-concentration areas - Crosshair cursor with visual feedback showing the seeding radius **Interactivity:** - **Mouse move** - Seeds new growth patterns as you drag across the canvas - **Mouse click** - Strong injection of chemical B to create bursts of activity - **Keyboard shortcuts**: Space = randomize, 1-4 = pattern presets, R = reset - **Touch support** for mobile devices **Pattern Presets:** 1. **Spiral Waves** - Classic rotating spiral patterns 2. **Mazes** - Labyrinthine branching structures 3. **Solitons** - Isolated stable spots 4. **Pulsing** - Rhythmic oscillating patterns **Controls:** - Reset button - Clears and reinitializes the grid - Randomize button - Generates new F/K parameters with random seeds - Pattern buttons - Switch between curated reaction parameters The simulation runs efficiently using Float32Arrays for the concentration grids, with double-buffering for smooth updates. Multiple update steps per frame ensure fast pattern evolution while maintaining performance.