The Startup
Published in

The Startup

Create Your Own Active Matter Simulation (With Python)

For today’s recreational coding exercise, we simulate active matter, i.e., swarming. Such a system may describe a flock of birds or a school of fish. We will look at how very simple rules may lead to the emergence of self-ordered motions.

You may find the accompanying Python code on github.

But first, below is a gif of what running our simulation looks like:

--

--

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +760K followers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philip Mocz

Computational Astrophysicist @Princeton, sharing intro tutorials on creating your own computer simulations! Harvard ’12 (A.B), ’17 (PhD). Connect with me @PMocz