Home▸Medicine & Biophysics▸SEIR Epidemic Model with Vaccination & Herd Immunity (2D)

SEIR Epidemic Model with Vaccination & Herd Immunity (2D)

2D SEIR (Susceptible-Exposed-Infected-Recovered) compartmental model with a live vaccination-rate control: RK4-integrated equations, a real herd-immunity-threshold readout, and an epidemic curve that flattens or disappears as vaccination coverage rises.

Medicine & Biophysics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-epidemiological-modeling ↗ Open standalone

This 2D companion runs a genuine four-compartment SEIR model — susceptible, exposed, infectious, recovered — instead of the simpler SIR curve, so it captures the incubation delay that real diseases like measles or COVID-19 have before a newly infected person becomes contagious. A continuous vaccination-rate control moves susceptibles straight into the immune pool from day zero, and the live readout computes the actual herd-immunity threshold (1 − 1/R0) and effective reproduction number Rt = R0·S(t) from the current state, so you can watch vaccination coverage push Rt below 1 and flatten or fully prevent the outbreak rather than just react to a canned animation.

⚙ Under the hood

2D SEIR compartmental model with RK4-integrated equations, a live vaccination-rate control, a real herd-immunity-threshold readout, and an epidemic curve that flattens or vanishes as coverage rises.

SEIR modelherd immunityvaccination ratereproduction numbercompartmental epidemiologyrunge-kutta

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)