You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Timo Kösters b8f928d4e6 improvement: select best GPU 10 months ago
examples improvement: change default config to two-galaxies-2 10 months ago
src improvement: select best GPU 10 months ago
.gitattributes fix: better galaxies 10 months ago
.gitignore fix: don't depend on glslang_validator at runtime 10 months ago
3dgalaxien01.png Add more images 10 months ago
3dgalaxien02.png Add more images 10 months ago
3dgalaxien03.png Add more images 10 months ago
3dgalaxien04.png Add more images 10 months ago
3dgalaxien05.png Add more images 10 months ago
3dgalaxien06.png Add more images 10 months ago
Cargo.lock chore: bump version 10 months ago
Cargo.toml fix: don't depend on glslang_validator at runtime 10 months ago
README.md Update README.md 10 months ago
build.rs fix: don't depend on glslang_validator at runtime 10 months ago
depthbuffer.png Add more images 10 months ago
galaxien1.png feat: more images 10 months ago
galaxien2.png feat: more images 10 months ago
video1.gif fix: galaxygen respect safety 11 months ago
video2.gif fix: galaxygen respect safety 11 months ago

README.md

N-Body-Simulation

Features:

  • 3D
  • Realtime
  • GPU Acceleration using wgpu
  • Save configurations in external files (see examples/)

Controls:

  • Move: WASD, Shift, Space, Move mouse
  • Change movement speed: Scroll wheel
  • Change simulation speed: 0-6 number keys
  • Print fps to console: F

Usage

From binary

Download the latest executable from the GitHub release page. You can either start the binary on its own or give it the path to a configuration as an argument like this:

$ ./nbodysim examples/two-galaxies.ron

You can see example configurations here.

From source

First, make sure you have rust installed. You can find installation instructions here.

# Clone the repo
$ git clone https://github.com/timokoesters/nbodysim.git
$ cd nbodysim

# Compile
$ cargo build --release

# Run default config
$ cargo run --release

# Run custom config
$ cargo run --release -- examples/two-galaxies.ron

two galaxies two galaxies two galaxies two galaxies two galaxies two galaxies two bodies two bodies two galaxies two galaxies