Reaction–Diffusion Lab: Grow Your Own Patterns

  • Grow Gray–Scott patterns from four documented rate pairs and repeatable seeded starting fields.
  • Paint or restore local concentrations, explore palettes and read explicit dimensionless model time.
  • Save your mathematical artwork or a labelled result card, and share the unpainted starting recipe.

There is no artist drawing every branch, no list of instructions for where each spot should go, and no photograph hiding underneath the colours. Two concentration fields follow a few local equations, and a pattern grows.

ContentBASE Reaction–Diffusion Lab is a browser sandbox for the Gray–Scott model. Choose a recipe, grow the field, paint a disturbance and save the result as a piece of mathematical artwork.

Reaction–Diffusion Lab

Grow and paint Gray–Scott patterns, explore documented rates and save your own mathematical artwork.

Loading Reaction–Diffusion Lab… Enable JavaScript to explore.

1. Paint a Seed, Let the Equations Draw

The default recipe begins with scattered patches of one field, V, against a background rich in the other field, U. Press Grow pattern and watch the small starting patches change shape and spread.

You can choose branching, dividing-spot, scattered-spot and winding-stripe starting points. Their names describe the kinds of patterns worth exploring at those rates; the result still depends on the seed, starting field, grid and time.

Some settings produce an intricate image. Others fade or settle. The lab keeps a fixed colour range, so it does not disguise a nearly empty field by stretching a tiny fluctuation into a dramatic-looking picture.

A branching teal and gold concentration pattern generated by ContentBASE Reaction–Diffusion Lab using the Gray–Scott model.

2. What Is the Gray–Scott Model?

Each position stores two dimensionless concentration values, U and V. Three processes change them:

  • Reaction: the model’s U + 2V → 3V reaction converts U into more V at a local rate proportional to UV².
  • Diffusion: concentrations spread through neighbouring positions. U diffuses twice as fast as V in this lab.
  • Supply and removal: the feed parameter F replenishes U, while V is removed through a term that includes both F and k.

The simulator tracks fields, rather than individual chemical particles. The colours are a view of V, not physical height, temperature or a hidden collection of living cells.

Gray–Scott systems have a long research and creative history. This is an original ContentBASE implementation of the established equations, with explicit numerical choices and locally generated images.

3. The Two Rate Controls Are Connected

Feed rate F controls the replenishment term F(1 − U). It also contributes to the loss of V. Removal rate k contributes the additional part of that loss.

In the V equation, the full removal term is (F + k)V. It would be misleading to describe F as affecting only U while treating k as the sole way V leaves the system.

Try a preset first, then make a small rate change. The controls display four decimal places because nearby rate pairs can give visibly different behaviours.

Rate changes are staged. Choose Start this recipe to apply them and rebuild the seeded field. Reset applied recipe returns to the last applied beginning and leaves it paused.

4. Model Time Is Not Calendar Time

The most useful way to read the clock is:

  • One completed update is one step.
  • Each step advances 0.5 dimensionless model-time units.
  • The speed control sets steps per real second.

At the default speed of 600 steps per real second, the model advances 300 time units per real second. These are not seconds of a calibrated chemical experiment, and certainly not days or years.

The run stops at 20,000 steps, corresponding to 10,000 model-time units. The limit keeps this browser experiment bounded. It does not imply that the mathematical system reaches equilibrium at that moment.

+1,000 steps advances a paused field by another 500 model-time units. Playback speed changes the viewing pace while keeping the numerical step size fixed.

5. Make the Field Your Own

Enable Paint on the field to add a local V seed or restore the U-rich background. Drawing pauses at the displayed state, so you can intervene deliberately and then resume growing.

An added seed sets U to 0.5 and V to 0.25 within the selected brush radius. The restoring brush sets U to 1 and V to 0. Drag for a connected stroke, or enter a column and row to apply the brush precisely.

Choose Clear to blank field to start with U = 1 and V = 0 everywhere. That unseeded field is a fixed point of the model: without a disturbance, there is no V pattern to grow.

Painting changes the current field without resetting its completed-step count. The lab marks a hand-edited experiment so you can tell it apart from the untouched seeded recipe.

6. The Edges Join Up

The finite grid contains 144 columns and 96 rows. Opposite edges connect, creating periodic boundaries. A disturbance can diffuse across the right edge and affect the left side, or cross the top and bottom.

The brush follows the same boundary rule. A seed painted near an edge also reaches the opposite edge when its radius crosses the boundary.

Use the field zoom for close inspection. A zoomed field scrolls inside its own container; turn painting off before swiping to pan. The colour display can be smooth or show the underlying grid pixels.

7. Read the Colours Without Inventing a Creature Count

The palette maps V values from 0 to 0.5. Values above 0.5 use the last colour. This saturation affects the picture, not the concentrations calculated by the solver.

Area with V ≥ 0.1 is the fraction of grid positions passing a stated concentration threshold. It does not count organisms, chemical particles, individual spots or biological cells.

The field summary also reports mean U, mean V and the current V range. These values provide context when a recipe looks very active, slowly changes or fades into the background.

Change between Ocean & gold, Ember and Ink on paper palettes to explore the same field visually. The palette does not change the equations or restart the simulation.

8. Save the Pattern and Share the Recipe

To keep painted edits and continue the calculation later, use Copy field snapshot. It preserves both concentration arrays, the completed-step count and applied recipe with full numeric precision. Keep the complete text, then paste it into Field snapshot text and choose Restore pasted snapshot. The restored field opens paused. This larger local snapshot is separate from a short recipe link; neither is uploaded by the tool.

Save pattern image exports the current visual field as a 1440×960 PNG. Preview result card and Save result card add the recipe, step count, model time and seed to a labelled 1500×1000 image.

Copy recipe link shares the applied rates, starting layout, seed, palette and playback speed. It opens the seeded experiment paused at step zero.

The link does not include hand-painted edits or the current concentration arrays. Save an image to keep the visible result of your painting. The share control states this directly, so a recipe link is not mistaken for a full saved-state file.

Simulation and image export happen locally in your browser. This tool does not upload the field or the image to a server.

9. A Numerical Pattern Is Still an Approximation

This implementation uses a five-point diffusion stencil, simultaneous double-buffer updates and an explicit Euler time step of 0.5. The diffusion coefficients are 0.16 for U and 0.08 for V, with grid spacing set to 1.

Those choices matter when comparing pictures from different simulators. Another implementation can use a different stencil, resolution, diffusion scale, boundary rule or initial perturbation, even when its displayed feed and removal rates look familiar.

The solver does not silently clip concentrations to force a stable-looking answer. If the numerical field becomes invalid, it stops and reports the problem. Colour saturation is a separate display choice.

This is a mathematical and creative experiment, not a prediction of animal markings, biological development or the behaviour of a specific physical reagent mixture.

10. Reaction–Diffusion Lab Questions

10.1 Why Does a Blank Field Stay Blank?

U = 1 and V = 0 is a homogeneous fixed point of these equations. Add a seed, or choose a seeded starting field, to give the reaction something to develop from.

10.2 Will the Same Seed Always Make the Same Pattern?

Within this implementation, the same applied rates, initial layout, seed and completed-step count recreate the same unpainted calculation. The evolution has no later random forcing. Manual painting introduces an explicit intervention.

10.3 Does It Keep Growing When I Switch Tabs?

Yes. The clock includes background elapsed time. If execution is throttled or suspended, bounded catch-up work calculates the missing steps when the browser can run them. A deliberate pause stays paused when you return.

10.4 Are the Patterns Alive?

No biological entities are simulated. Spots can divide and branching forms can resemble natural textures, but the model contains concentration values following equations.

11. Try Another World Built From Local Rules

For discrete rather than continuous states, draw a world in Conway’s Game of Life. Explore local preferences in Neighbourhood Lab, or compare nearly identical physical starts in Chaos Lab.

The growing ContentBASE Tools collection is built for experiments you can change, question and share.


Citations

  1. Pearson, J. E. (1993), Complex Patterns in a Simple System, Science 261, 189–192, DOI 10.1126/science.261.5118.189. Primary research context for irregular patterns and spot division in the Gray–Scott system; accessible author preprint. (Pearson: Complex Patterns in a Simple System)
  2. Karl Sims's first-party reaction–diffusion tutorial, including the reaction, rate meanings and illustrative feed/removal pairs. Its nine-point stencil and diffusion values differ from this lab's stated five-point scheme; preset names do not promise identical pictures. (Karl Sims: Reaction–Diffusion Tutorial)
  3. Robert Munafo's long-running Gray–Scott reference and pattern catalogue, documenting equations, parameter conventions and numerical methods. ContentBASE uses independently written code and original model-generated art. (Munafo: Gray–Scott Reaction–Diffusion)
Cindy, ContentBASE creator assistant

MEET CINDY

Your ContentBASE creator assistant

Cindy helps creators find Canva templates, content ideas, and simple ways to make better social media posts faster.

Want ready-to-use templates? Claim the free Canva bundles or browse the full bundle store.