# A Neat Fake Particle Physics Simulator

A friend sent me this video, after realizing that I had missed an earlier mention of it and thought it weird I never commented on it. And I wanted to pass it on, partly because it’s neat and partly because I haven’t done enough writing about topics besides the comics recently.

Particle Life: A Game Of Life Made Of Particles is, at least in video form, a fascinating little puzzle. The Game of Life referenced is one that anybody reading a pop mathematics blog is likely to know. But here goes. The Game of Life is this iterative process. We look at a grid of points, with each point having one of a small set of possible states. Traditionally, just two. At each iteration we go through every grid location. We might change that state. Whether we do depends on some simple rules. In the original Game of Life it’s (depending on your point of view) two or either three rules. A common variation is to include “mutations”, where a location’s state changes despite what the other rules would dictate. And the fascinating thing is that these very simple rules can yield incredibly complicated and beautiful patterns. It’s a neat mathematical refutation of the idea that life is so complicated that it must take a supernatural force to generate. It turns out that many things following simple rules can produce complicated patterns. We will often call them “unpredictable”, although (unless we do have mutations) they are literally perfectly predictable. They’re just chaotic, with tiny changes in the starting conditions often resulting in huge changes in behavior quickly.

This Particle Life problem is built on similar principles. The model is different. Instead of grid locations there are a cloud of particles. The rules are a handful of laws of attraction-or-repulsion. That is, that each particle exerts a force on all the other particles in the system. This is very like the real physics, of clouds of asteroids or of masses of electrically charged gasses or the like. But, like, a cloud of asteroids has everything following the same rule, everything attracts everything else with an intensity that depends on their distance apart. Masses of charged particles follow two rules, particles attracting or repelling each other with an intensity that depends on their distance apart.

This simulation gets more playful. There can be many kinds of particles. They can follow different and non-physically-realistic rules. Like, a red particle can be attracted to a blue, while a blue particle is repelled by a red. A green particle can be attracted to a red with twice the intensity that a red particle’s attracted to a green. Whatever; set different rules and you create different mock physics.

The result is, as the video shows, particles moving in “unpredictable” ways. Again, here, it’s “unpredictable” in the same way that I couldn’t predict when my birthday will next fall on a Tuesday. That is to say, it’s absolutely predictable; it’s just not obvious before you do the calculations. Still, it’s wonderful watching and tinkering with, if you have time to create some physics simulators. There’s source code for one in C++ that you might use. If you’re looking for little toy projects to write on your own, I suspect this would be a good little project to practice your Lua/LOVE coding, too.

## Author: Joseph Nebus

I was born 198 years to the day after Johnny Appleseed. The differences between us do not end there. He/him.

## 3 thoughts on “A Neat Fake Particle Physics Simulator”

This site uses Akismet to reduce spam. Learn how your comment data is processed.