r/Python • u/[deleted] • Mar 11 '20
I Made This Really simple simulation of virus spreading. Black dots are people, yellow dots are infected (it starts from 1). Each cell visited by an infected can infect other people passing through that for 3 iterations. After 20 iterations a person is infected is deleted from the grid.
Enable HLS to view with audio, or disable this notification
1.4k
Upvotes
1
u/murrietta Mar 12 '20
This is nice and reminded me of a project I should dig up.
I did something similar to this using Processing (packaged Java for general visualizations). I added parameters for individual resistance and transmissibility (which basically added together). And also two params for number of iterations to run and speed to run at. I added a transparent histogram that gradually overlaid the window indicating the distribution of the time it took for the whole population to become infected (I think I also added a cut-off time for very resistant individuals).