RdReaction-Diffusion

Procedural · Scale 3

Reaction-Diffusion

Two chemicals spread across a grid and react with each other. Nothing else guides them, and spots and stripes appear. The model we run is Gray-Scott.

What it is

Reaction-diffusion is a simulation of two imaginary chemicals, U and V, on a grid. Where there is V, it turns U into more V. V is slowly removed, U is topped up, and U spreads twice as fast as V. After a few thousand steps, spots or stripes appear by themselves. This version is the Gray-Scott model.

Two numbers decide which pattern appears. Feed is the rate at which U is topped up. Kill is added to feed to give the rate at which V is removed.

The plates

Five plates. The dial is the recipe, a pair of feed and kill rates: spots (0.025, 0.060), dots (0.030, 0.062), worms (0.026, 0.056), maze (0.029, 0.057) and stripes (0.034, 0.060). Each runs on a 384 x 384 grid, for 5,000 steps on the first two and 5,500 on the others. The reaction is started on the word and walled in: it can spread up to 112 units beyond the edge of the letters and no further.

Safari stop · Spots and stripes · Recipe
  • spots

  • dots

  • worms

  • maze

  • stripes

Turn the dial on the safari →

One more plate, from the stop where two families are crossed. The reaction runs on a 192 x 192 grid for 6,000 steps and is allowed to spread over the whole canvas. Each rhombus of a 5-fold tiling then takes one flat tone from the amount of V at its centre.

Safari stop · Two families, crossed
  • 5-fold tiles + growth

Turn the dial on the safari →

The plates are drawn by mosaic, a small Python library of our own, built on numpy, scipy, shapely and contourpy. No image model is involved, and each plate is a flat-colour SVG under 45 KB. The word Ciao is the safari's constant: it sits in the same place on every plate.

What we did and found

The stripes were 13.5 grid cells wide at every grid size. A bigger grid therefore gives more repeats of the pattern at the same width, and the picture does not get finer.

The reaction never settles, so the number of steps is part of the recipe.

Of the first five feed and kill pairs we tried, three died out to nothing.

What is open

Two grid sizes appear on plates, 384 and 192. Because the stripe width is fixed in grid cells, the grid size sets how many stripes a plate holds, and we have not drawn the same recipe at both sizes side by side.

mosaic is not yet part of Platypus, our visuals engine. That is why this cell is marked as working and not as shipped: the page is our notebook on the element.

Composes with

Other cells in the table — most still to be walked into in coming sessions.