A Gray-Scott sandbox for growing spots, stripes, coral, and hybrid organisms. Paint reagent B in the main simulation,
constrain the domain with a PNG mask, and build a separate RGB K/F map that assigns different feed / kill ratios to different regions.
// Gray-Scott updateA' = A + ( Dₐ ∇²A - AB² + feed(1 - A) ) dtB' = B + ( Dᵦ ∇²B + AB² - (kill + feed)B ) dt// This version keeps a separate style-map:// 1) the mask picks where the PDE is allowed to evolve// 2) the RGB K/F map picks which feed/kill pair each cell uses
Playback + seeding
Presets
Colors
Grid + overlays
4.0 px
192 x 192 simulation cells
field view
Mask bounds
Upload a black/white PNG, or draw a mask below. When no file is loaded, the editor becomes the active mask source.
12 px
White editor pixels are active simulation bounds. If a PNG is loaded, this editor stays visible but does not drive the mask until the upload is cleared.
Drag on the main canvas to add or erase reagent B. Paint the K/F style map in the right rail to assign different feed / kill ratios
to different regions of the same bounded domain.
Reaction parameters
0.055
0.062
1.00
0.50
1.00
8
Chemistry brushes
12 cells
Use the main canvas to inject or erase reagent B. The K/F style map in the right rail is a separate paint target.
K/F map editor
Paint a weighted RGB-style map with the same mask bounds as the simulation. Colors can overlap, blend their feed / kill pairs, and carry their own approximate local scale.
10 cells
100%
K/F guide
Click or drag in the guide to set the feed / kill pair for the selected RGB region. The markers show where each color sits in the plane.
0.037
0.065
1.00x
What to try
Set red to spots, green to mazes, blue to worms, then paint a weighted RGB K/F map and watch the morphologies merge.
Upload a white circle or logo mask so both the simulation and the K/F map are clipped to the same bounds.
Upload grayscale images into the red, green, and blue channels, then use the local scale slider to push one color toward coarser spatial structure.
Useful shortcuts
Space pause / resume
1 / 2 main chemistry brush: add or erase B
R / G / B choose the active K/F color slot
G toggle the grid visualizer
Wheel change the current brush radius while hovering a canvas