Hobby Projects
Flatten the curve
To illustrate the “flatten the curve” strategy against COVID-19, I’ve coded this little simulation in Python. Blue dots represent healthy individuals, red dots represent infected ones. Whenever a blue dot gets too close to a red dot, it gets infected (and infectious) for a certain period of time. Globally, this dynamic leads to a wave-like phenomenon.
The code is here: https://github.com/frank-roesler/Files/blob/master/Flatten_curve.py
-
First video: bad situation with high peak;
-
Second video: good situation, where the peak has been flattened by increasing the average distance between the dots (compare the axis labels).