Message Boards Message Boards

Epidemic simulation with a polygon container

Posted 1 year ago
7660 Views
|
5 Replies
|
22 Total Likes
|

MODERATOR NOTE: coronavirus resources & updates: https://wolfr.am/coronavirus


enter image description here

5 Replies

Very nice simulation, very interesting to play around with.

I think in your function createPosition one line should be changed to

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, n - Length[positions]], 
             memberq]]];

in stead of

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, 200 - Length[positions]], 
             memberq]]];

Thanks for reporting it, I will fix it!