Back to All Posts

Simulating the spread of Covid-19

  • Time to read: 1 min
  • 17 March, 2020
  • Sourav Kulkarni

Sim Initialize

Inspired by this beautiful video by 3Blue1Brown, I tried making a simulation of the spread of Covid-19.

Link to Sim

Please open this link in a new tab and read along.

Each circle represents a person moving randomly through space, and each collision counts as a contact. As people come into contact with each other, the disease spreads through the population.

Sim Start Now as you can see, some people are getting infected(red) while most are still safe(green).

We assume that the vaccine is going to be invented at some point of time. After which, people start getting vaccinated(circles randomly turn blue).

Sim Start Once all paramenters are set, we start the simulation and take a look how the virus spreads, how many people get vaccinated(blue), how many people would never even come in contact with the virus(still green) and how many people would unfortunately die(hollow circle).