HTML + CSSBackgrounds

Turing pattern skin

A simulated chemical reaction grows spots and mazes like the skin of a reef fish, and the pointer seeds new growth, on canvas.

Settings

1x
1x
1

Code

<div class="pt-uvq16-turing"><canvas></canvas></div>

Prompt for AI

Paste it into ChatGPT, Claude or Cursor and it will adapt the block to your project with these settings, even if you don’t use React.

Markdown version with all the code, for AI assistants

More in Backgrounds

See all Backgrounds

Where to use it

This background runs a Gray-Scott reaction-diffusion model, the same math behind the stripes and spots Alan Turing described in animal skins. Two virtual chemicals spread and react on a small grid, and the feed rate changes across the screen, so one side forms dots while the other forms winding labyrinths. The result looks organic and never quite repeats.

The colors map from the theme background through the third color to the first and second at the strongest areas. Density sets the grid resolution and speed the number of steps per frame. Drag the pointer to seed new colonies, and fresh spots also appear on their own.