/GalaxySim

Project simulating galaxies for a modelling & simulation course at RUG

Primary LanguageJupyter NotebookBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

GalaxySim

Project simulating galaxies for a Modelling & Simulation course at RUG.

C implementation

The C code for this project is in the /src folder. It should be able to compile with any C compiler and has no external dependencies outside the regular libraries. Simply make the source code and run the program ./nbody.

The program generates a lot (500 by default) of image frames. They can be combined into an animated GIF using ImageMagick by running:

make gif

Note: there are many ways to install ImageMagick. On a Mac with Homebrew you can simply brew install imagemagick.

To get rid of all those .pbm images, simply run make clean.

Animation example:

Example animation