A 2D N-Body Simulator made using C.
- C 61.2%
- CMake 16.4%
- GLSL 12.1%
- Meson 10.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| src | ||
| thirdparty | ||
| .clang-format | ||
| .gitignore | ||
| CMakeLists.txt | ||
| meson.build | ||
| README.md | ||
Gravity N-Body Simulator
Dependencies
- A C compiler which supports the C17 standard (Clang recommended).
- Meson
- Ninja
Install Dependencies
Windows:
winget install --id mesonbuild.meson --id Ninja-build.Ninja --id LLVM.LLVM
Arch Based Linux:
sudo pacman -S meson ninja clang
Build
configure the project with Meson:
Note: To use clang toolchain specifically, you need to set the CC environment variable in the shell before the configuration.
meson setup build
compile:
meson compile -C build
or
ninja -C builddir
For a debug build:
meson setup build --buildtype=debug
meson compile -C build
For an optimized release build:
meson setup build --buildtype=release
meson compile -C build
Run
Linux
./build/gravity-sim
Windows
build\gravity-sim.exe