A particle/gravity simulator.
Particle Dancer is a fun particle simulator. You are initially presented a 2D grid of particles. As you drag your mouse across the screen, the particles start to speed toward your mouse... like comets toward a sun. Lots of fun!
- Download particleDancer.py. Currently I'm just hosting the file on my Google Docs account.
- You'll also need a copy of vec2d.py, which you can download here.
How to use:
- Just click and hold down your mouse anywhere on the screen and have fun!
- To put the particles back to their original position, press the RESET button on the bottom of the screen.
- To change the way the particles behave, adjust the parameter values at the beginning of the script.
The script uses vec2d.py. Make sure vec2d.py is in the same folder as this script (or in your python path) before running particleDancer.py.
If the simulation is running slow, try decreasing the GRID_SIZE parameter (located at the beginning of the script).
The code for Particle Dancer is actually a heavily modified version of Eric Pavey's vertletCloth simulation script. Eric's original code can be found at: http://www.akeric.com/blog/?page_id=1123
Particle Dancer was inpsired by the iPhone/iPad app Gravilux: http://snibbe.com/projects/interactive/gravilux
- Home Page