Epidemic Spread (2D): Spatial SIR Model
A 2D spatial SIR (Susceptible-Infected-Recovered) simulation: agents wander a bounded arena and pass infection to nearby susceptible neighbours, with transmission rate, infectious period, mobility and vaccination coverage all adjustable in real time.
This 2D companion turns the SIR (Susceptible-Infected-Recovered) model into a spatial, agent-based simulation: instead of directly solving the textbook differential equations, wandering dots infect nearby susceptible neighbours on contact and recover after an average infectious period, and the aggregate Susceptible/Infected/Recovered counts trace out the same curves the equations predict. Transmission rate, infectious period, population mobility and vaccination coverage are all adjustable in real time, alongside a live S/I/R chart and a measured effective-R readout.
Agent-based spatial SIR model: per-contact infection probability, per-day recovery probability, vaccination pre-seeds the recovered pool, and effective R is measured live from each recovered agent's actual infection count.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
A spatial, agent-based version of the classic SIR (Susceptible-Infected-Recovered) epidemic model. Instead of solving the SIR differential equations directly, each agent wanders the arena and infects nearby susceptible agents with a per-contact probability, recovering after an average infectious period — the aggregate S, I and R counts trace out the same curves the equations predict.
It is the measured average number of new infections caused by each agent who has already recovered, updated live. When it stays above 1 the outbreak is still growing; once it drops below 1 (often thanks to vaccination or reduced mobility), the epidemic is dying out — this is the practical definition of herd immunity.
A matching share of the population starts the simulation already in the Recovered/immune state instead of Susceptible, directly shrinking the pool the disease can spread through — which is exactly how vaccination lowers effective R in the real SIR model.