Python Particle Simulation

Here is how to do a basic particle simulation in Python using PyGame.

The movie below shows a basic 2d particle simulation emulating particles that are attracted to each other, while simultaneously avoiding getting too close to each other.




See the Python source code.

Running on a Mac with Python 2.5? Install pygame and pyobjc from http://rene.f0o.com/~rene/stuff/macosx/. OS X 10.4 versions also work in OS X 10.5.