Back to Home

Virus simulation

Each dot represents an entity, going about their life.

  • this is a healthy entity
  • infected and spreading the disease
  • entity is immune, but only for a while
  • dead entity, rest in peace

An interactive simulation of how infectious diseases spread across society. Infected entities have a certain probability of infecting others when close enough. When an infection is detected (a set number of days after first contact), the entities are sent to quarantine until they recover. After recovery, entities gain immunity for a while, which can lead to the extinction of the virus, if it spreads too fast and immunity is long enough.
Even though it is heavily simplified, the typical exponential spread at the start of an epidemic can be observed. Parameters like movement speed and social distancing strength, the latter of which was implemented as a simple repulsion force, also impact how the pandemic will evolve.
Have fun and stay safe!


day: 2

1500
0.1
10
40
20
0.01
20
0
0
20