Generativeart:p5.jsでつくった感染拡大シミュレーション

すべての点には引力があって、お互いに引き寄せあっています。
赤い点が感染者で青い点が非感染者です。

青い点は赤い点に1秒間接触しているごとに約10%の確率で感染します。
赤い点は7秒間で回復して青い点に戻ります。回復したあとも再感染します。
赤い点は回復までの7秒間に約2%の確率で死亡します。

再読み込みごとに、最初の人口が50〜700人の間でランダムに、最初の感染者数は1〜5人の間でランダムに設定されます。

お互いに引き寄せあう点は時間がたつとクラスターを形成します。
画面内をクリックするとクラスターを分散させることができます。

死亡者数を増やさずに、感染者数を0にできたら封じ込め成功です。

コロナウイルスの性質や影響を正しく反映しているものではありませんが、ソーシャルディスタンスが大切なことは間違いなさそうです。

感染拡大について理解する手助けになればと思います。

All the dots have an attractive force and are attracted to each other.
The red dot is the infected person and the blue dot is the non-infected person.

The blue dot has about a 10% chance of being infected for every second it is in contact with the red dot.
The red dot recovers in 7 seconds and returns to the blue dot. The red dot is reinfected even after it recovers.
The red dot has about a 2% chance of dying in the 7 seconds it takes to recover.

For each reload, the initial population is randomly set between 50 and 700 people, and the initial number of infected people is randomly set between 1 and 5 people.

dots that are attracted to each other will form clusters over time.
You can disperse the clusters by click.

If you can reduce the number of infected people to zero without increasing the number of deaths, you have succeeded in containment.

This is not an accurate reflection of the nature and impact of coronaviruses, but it does seem to indicate that social distance is important.

I hope this helps you to understand the spread of infection.

infection spread | 感染拡大シミュレーション | p5.js Generative Design >>

■参考資料
https://www.openprocessing.org/sketch/868181
クリエイティブコーディング入門 技術評論社

【関連記事】
独学Processingの趣味的なたのしさ

Leave a Comment

2020年5月5日 Generative Art