Life in Glyph · 3 of 4

Draw me how the leopard
got his spots

A pattern emerging from a uniform field, animated from one English sentence. You asked Claude. Glyph drew it. Rudyard Kipling wrote the story in 1902. Alan Turing proved it could happen in chemistry in 1952. Glyph compiles both into the same simulation.

▸ The prompt
"Draw me how the leopard got his spots. Use the Glyph viz grammar with a Gray-Scott reaction-diffusion solver at F = 0.062, k = 0.062 — the leopard-spots region of parameter space. Start from a small seed in the middle of an otherwise blank pelt, run 400 simulation steps, and let the pattern emerge. Beautiful enough that a child wants to count the spots, deep enough that a grandparent recognizes Turing's morphogenesis paper from 1952."

— what to say to your AI agent. Claude writes a Glyph spec; the Glyph compiler integrates the PDE on a 32×32 grid and emits the heatmap as locked SVG.

A leopard's spots emerging from a blank pelt An animated SVG: stylized leopard silhouette set against a soft savannah background; rosette spots fade in across the silhouette over 8 seconds, each spot drawn as a dark central blob ringed by an irregular tan outline. SIMULATION STEP 0 of 400 F = 0.062 · k = 0.062 · Dᵤ = 1.0 · Dᵥ = 0.5
~8 seconds for the pattern to form · click anywhere to grow new spots

Three stages of a pattern

The Gray-Scott PDE has no idea what a leopard is. But starting from a single seed in a uniform field, with these specific (F, k) parameters, it produces this specific outcome — every time.

STAGE 1
Steps 0 – 80

Uniform pelt + a seed

The pelt starts uniform (chemical U everywhere, V at zero except a small Gaussian bump in the center). Diffusion smooths the seed slightly outward; nothing dramatic yet.

STAGE 2
Steps 80 – 240

Instability wavefront

The seed becomes a wavefront. At F = k = 0.062, this regime is unstable to spot-formation: as V spreads, it splits — mitosis-like — into separated nuclei. The first ring of spots appears around the seed.

STAGE 3
Steps 240 – 400

Hexagonal lock

The spots reach a stable hexagonal spacing. New ones nucleate at the edges; old ones stay put. The pattern locks into a self-organized grid — the same way real leopards, jaguars, and giraffes get their coats during embryogenesis.

How Glyph drew it

Claude writes the JSON; Glyph integrates the PDE with explicit Euler on a 32×32 grid. Same spec → byte-identical SVG, every platform, every run.

The Glyph spec JSON

// leopard-spots.json — Gray-Scott RD at F = k = 0.062
{
  "version": "glyph/0.1",
  "title": "Leopard spots",
  "data": {
    "pde_solve": {
      "shape": "pde-solve",
      "kind": "reaction-diffusion",
      "domain": { "x": [-1,1],
                  "y": [-1,1] },
      "grid": { "rows": 32, "cols": 32 },
      "initial_U": "1",
      "initial_V": "exp(-25*(x*x + y*y))*0.4",
      "params": { "Du": 1.0, "Dv": 0.5,
                  "F": 0.062, "k": 0.062 },
      "boundary": "periodic",
      "steps": 400,
      "dt": 0.0008
    }
  },
  "layers": [{
    "mark": "heatmap",
    "encoding": {
      "x": { "field": "x" },
      "y": { "field": "y" },
      "color": { "field": "u" }
    }
  }]
}

CFL stability is verified at schema time: max(Du, Dv)·dt/dx² = 1·0.0008/(2/32)² = 0.20 ≤ 0.25 ✓. Drop dt and the schema refuses the spec before the renderer ever runs. View on GitHub.

Glyph compiler output SVG

Glyph-rendered Gray-Scott leopard-spot pattern, byte-locked across CI

Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. 1024 cells, each a deterministic function of the seed and the (F, k) parameters. Change F by 0.001 and you get a different pattern — but always reproducibly the same different pattern.

Your turn — prompts to try

The (F, k) parameter space holds dozens of recognizable patterns. Name the animal coat or skin pattern you want — Claude knows the parameters.

▸ Zebra
"Show me how a zebra gets its stripes. Gray-Scott reaction-diffusion at F = 0.029, k = 0.057 — the stripes regime. Same 32×32 grid; let me see the pattern lock in after 600 steps."
▸ Coral
"Show me coral-worm patterns: Gray-Scott at F = 0.055, k = 0.062, periodic boundary, 800 steps on a 48×48 grid. The pattern should look like a brain or a fingerprint."
▸ Phase boundary
"Make me a 4-up grid showing how the Gray-Scott pattern changes as k goes from 0.057 → 0.060 → 0.062 → 0.065. Same F = 0.055 in all four. Show the stripes-to-spots transition."
▸ History
"Make a visualization for Turing's 1952 paper. Show three pattern types (spots, stripes, labyrinth) side by side; label each with the Gray-Scott (F, k) values and a real-world animal that has that coat."

More Life in Glyph

See all four ↗ Orion's Journey A Heartbeat A Sunflower's Seeds