# Reaction–Diffusion — Randomly

> Gray–Scott, run until the pattern stops moving. One of 63 generators at [Randomly](https://randomly.cluxnei.dev), a library of random generators seeded from verifiable real-world entropy. Free HTTP API, no key, no signup.

## `patterns.reaction` — Reaction–Diffusion

Gray–Scott, run until the pattern stops moving.

| | |
|---|---|
| **Key** | `patterns.reaction` |
| **Module** | `patterns` |
| **Version** | `1` — a permalink carries this, and a replay against a different version returns `409` rather than something else |
| **Formats** | `application/json`, `text/plain`, `image/png` |
| **Studio** | https://randomly.cluxnei.dev/g/patterns/reaction |
| **API** | `GET https://randomly.cluxnei.dev/api/v1/g/patterns.reaction` |

`value` is a **render spec** — algorithm, parameters, palette and a render key — not pixels. Ask for `format=png` to get the image.

| Parameter | Type | Default | Accepts | What it does |
|---|---|---|---|---|
| `width` | int | `900` | `200` – `2048` | Width |
| `height` | int | `600` | `200` – `2048` | Height |
| `preset` | enum | `coral` | `mitosis`, `coral`, `solitons`, `labyrinth`, `spots`, `custom` | Pattern |
| `feed` | float | `0.035` | `0.005` – `0.09` | Feed rate F — Only used when the preset is Custom. Most of this range is a field that dies within a few hundred steps — that is the honest shape of the parameter space. |
| `kill` | float | `0.065` | `0.03` – `0.075` | Kill rate k — Only used when the preset is Custom. |
| `grid` | int | `192` | `96` – `288` | Grid — The simulation runs on a square grid and is sampled up to the canvas, so this is detail, not size. |
| `steps` | int | `3200` | `200` – `12000` | Steps — How long the reaction runs. Capped against the grid size so a slider drag cannot lock the tab. |
| `du` | float | `1` | `0.2` – `1.2` | Diffusion of u |
| `dv` | float | `0.5` | `0.1` – `0.7` | Diffusion of v |
| `seeds` | int | `14` | `1` – `60` | Seed patches — The initial disturbance. Everything on screen grows out of these. |
| `palette` | enum | `magma` | `golden`, `analogous`, `complementary`, `triadic`, `split`, `viridis`, `magma`, `mono` | Colour |
| `colours` | int | `6` | `2` – `12` | Palette size |
| `contours` | bool | `false` | `true`, `false` | Banding |
| `invert` | bool | `false` | `true`, `false` | Invert |

Out-of-range numbers are **clamped, not rejected**, so a request never fails for being
ambitious — but it may not do what you meant. Unknown keys are dropped and missing ones
fall back to the defaults above.

```bash
curl -s 'https://randomly.cluxnei.dev/api/v1/g/patterns.reaction?width=900&height=600&preset=coral' -H 'Accept: text/plain'
curl -o out.png 'https://randomly.cluxnei.dev/api/v1/g/patterns.reaction?width=900&height=600&preset=coral&format=png'
```

## The receipt

Every result carries one, naming the physical source of the randomness and linking to the
third party's own record of it:

```json
"receipt": {
  "source": "seismic",
  "source_label": "USGS Seismic Feed",
  "class": "C",
  "caveat": "Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.",
  "narrative": "A magnitude 3.6 earthquake, 67 km N of Culebra, Puerto Rico, 39.6 km down — 52 minutes ago.",
  "proof_url": "https://earthquake.usgs.gov/earthquakes/eventpage/us7000th33",
  "mixed_with_csprng": true,
  "degraded": false
}
```

Pick the source with `?source=`, or leave it at the default `auto`:

- **Class A** (Cryptographic) — `csprng`, `anu-qrng`, `random-org`
- **Class B** (Public beacon) — `nist-beacon`, `drand`, `bitcoin`. Published openly — anyone can look this value up after the fact.
- **Class C** (Observational) — `seismic`, `space-weather`, `atmosphere`, `iss`. Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.

## More

- [The full API contract](https://randomly.cluxnei.dev/api.md)
- [Everything in one file](https://randomly.cluxnei.dev/llms-full.txt)
- [The catalogue as JSON](https://randomly.cluxnei.dev/api/v1/generators)
- [This generator in the browser](https://randomly.cluxnei.dev/g/patterns/reaction)
