Forest Fire Simulator needs a newer GPU pipeline

This sim runs the SIR rule entirely in a WebGL2 shader with floating-point framebuffers (EXT_color_buffer_float), which this browser doesn't expose. Try a recent Chrome, Firefox, or Safari.

Forest Fire Simulator
spread chance
burn duration
regrowth time
scorch chance
lightning strikes
sim speed
brush
brush radius12px

Forest Fire Simulator

A forest of trees, embers spreading tree to tree, burnt ground slowly regrowing into fresh fuel. Every tree is in one of three states: unburned, burning, or burnt — cycling in one direction, unburned → burning → burnt → back to unburned, forever.

unburned (fuel) burning, just ignited burning, nearly burnt out burnt (regrowing) scorched (permanent) firebreak

An unburned tree has no clock running at all — it just stands there until something ignites it. Spread chance is a flat chance, every step, that an unburned tree catches fire from one specific burning neighbor. With k burning neighbors at once, each is an independent coin flip, so the chance of catching fire from at least one is:

$$ P(\text{ignites this step}) = 1 - (1 - \text{spread chance})^k $$

Once a tree is burning, its neighbors stop mattering: it just rides out the burn duration, then forks one of two ways. Normally it becomes burnt ground, rides out the regrowth time, and becomes unburned fuel again. But scorch chance is a coin flip, checked once right when the burn duration ends, for skipping that recovery entirely — heads, the ground is scorched forever instead of regrowing. Only the unburned state and that one fork are chance-based; every other transition is a pure duration. Lightning strikes add rare, randomly-placed ignitions on top of neighbor spread, so a fire can restart even after burning itself out completely.

All durations here are counted in simulation steps, not seconds — the only real-time knob is sim speed, which just sets how many steps run per second of wall-clock time.

Click or drag to paint: Tree resets cells to unburned, Ignite starts a fire, Burnt paints already-burnt ground, and Firebreak places a permanent barrier that neither catches nor spreads.

The same rule has a second reading: unburned/burning/burnt is exactly a Susceptible → Infectious → Removed epidemic model, the classic compartmental model used for disease spread.