Visualizations
498 / 500

498 · Emergence

Fire and Regrowth

A watercolor forest that burns and regrows into a power law, untuned.

This is the Drossel-Schwabl forest fire model on a 320 by 200 lattice. Each step bare ground sprouts a tree with probability p, lightning strikes each tree with a far smaller probability f, and fire spreads to the four neighbors of every burning cell before it burns out. Nobody tunes it to a critical point, yet the forest organizes itself into stands of every age, and the number of fires that burn s trees falls off as a power law up to a cutoff set by p/f; the inset bins every fire started by the model's own random lightning logarithmically and fits the slope live. The painting is driven by the model: the time since each patch last burned sets a banded wash of char, ash, straw, meadow and deepening greens, sampled through a noise warp so edges wobble, with pigment pooling at band edges, trees stippled on top and a paper grain multiplied over it all.

Try it. Click to strike lightning (only dense old forest burns big). Drag to cut firebreaks, and right-drag or Shift-drag to erase them. Up and down arrows change the lightning rate and so the p/f cutoff, Space calls a lightning storm, and R regrows the landscape. Left alone, an occasional extra strike finds a dense old stand so big fires stay on show (those fires are left out of the statistics).

  • Drossel-Schwabl model
  • Logarithmic binning and least squares
  • Banded watercolor wash with domain warping
  • Multiply and lighter compositing

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build the Drossel-Schwabl forest fire model with JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Make a canvas that fills the window and stays sharp on high-DPI screens. Create a grid of about 250 x 160 cells in a Uint8Array, where each cell is empty, a tree, or burning.
- Each step: every burning cell becomes empty and sets its four neighboring trees on fire; every empty cell grows a tree with a small probability p (try 0.003); every tree is struck by lightning with a much smaller probability f (try p / 1000).
- Keep the burning cells in a list so spreading the fire is fast, and run about 60 steps a second.
- Draw the grid into an ImageData at one pixel per cell (empty brown, trees green, fire orange) and scale it up to the canvas.
- Give each fire an id, count the trees it burns, and when it dies out add its size to a histogram with logarithmic bins (for example 5 bins per factor of ten).

Once that works, make it beautiful:
- Track each cell's age and the time since it last burned. Color burned ground from charcoal to ash to straw to meadow, and trees from pale saplings to dark old forest, so the landscape becomes a patchwork of stands of different ages.
- Soften it like a watercolor: draw a blurred, color-banded layer for the patches, a few darker pixels at band edges, and multiply a generated paper texture on top.
- Plot the fire size histogram on log-log axes in a corner and fit a straight line to show the power law.
- Let a click strike lightning at the pointer and a drag paint firebreaks that trees can never grow on.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as wind that biases the spread, terrain that slows fire uphill, or comparing the measured slope across different values of p / f.
PreviousLava IslandA volcanic island erupts at dusk, and every lava flow cools into new land. NextStar Cluster AgesA star cluster and its HR diagram age side by side across 13 billion years.

Related visualizations

  • Forest of LightNature Trees grow by competing for light in a watercolor forest that turns with the seasons.
  • WildfireSimulation A fire runs uphill and downwind across a topographic incident map, trailing smoke.
  • Tree RingsNature A pine grows for a century under a simulated climate, one sanded ring per year.
  • LightningSimulation Branching lightning that grows from a dielectric breakdown model.
  • Mondrian ForestMachine learning Decision trees cut the plane into a De Stijl painting; a forest blurs it into glazes.
  • BonfireFluids A campfire whose flames are a fluid simulation colored by blackbody physics.
  • Fractal TreeNature A recursive tree that grows, blossoms and sways in the wind.
  • Falling SandSimulation Sand, water, fire, lava and plants that all react with each other.
  • Differential GrowthGenerative art One closed line grows, buckles and folds into brain coral without ever crossing.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs