This program simulates the gravitational collapse of a random cloud of particles (in 2D). This produces effects somewhat like the simulations of the early universe
that have been done on supercomputers since the 1980s. Now, thanks to the rapid increase in CPU power over the years, desktop computers can produce similar-looking results. The preferences file allows you to change a few of the simulation parameters: making the "grid size" larger will increase the accuracy of the gravitational forces calculation (you will see cusp-like artefacts if you make it too low), but this makes the computer work harder for each step, reducing the frame-rate. I haven't actually tried playing with the timestep parameter, but it is currently set at a fairly sensible value.
Looking around the web a bit, this
is how the professionals do it. Note the phrase "One billion mass elements and 10243 Fourier grid cells". The default for my simulation is 20`000 mass elements (which I call "particles") and 1282 Fourier grid cells. Also note how much CPU power that other simulation needs...
- - - [Download] - - -
Many of the files here are compressed with WinZip
, a trial version of which you can download for free.
Over the next few months I may migrate the files to using WinRAR
, which I've tested and found to offer roughly 25% better compression.
Gravity and Galaxies Simluation (RAR file, 19KB; Zip file, 21KB). Uploaded 2003-Jul-15.
- - - [Screenshot Sequence] - - -















