N-body simulation using bevy and bigbang crates
Go to file
2020-08-13 01:11:18 -04:00
.cargo Initial commit, working, but w/ transparency issue 2020-08-12 00:53:26 -04:00
assets Update README with controls and new screenshot 2020-08-13 00:27:50 -04:00
src Add command-line options with argh 2020-08-13 00:52:08 -04:00
.gitignore Initial commit, working, but w/ transparency issue 2020-08-12 00:53:26 -04:00
Cargo.lock Add command-line options with argh 2020-08-13 00:52:08 -04:00
Cargo.toml Add command-line options with argh 2020-08-13 00:52:08 -04:00
README.md Add youtube link to README 2020-08-13 01:11:18 -04:00

bevy-nbody

An N-body simulation in Rust using the bevy crate for rendering and bigbang crate for the n-body calculations.

screenshot youtube video

Install

Clone the repo, and run cargo build --release. The executable will be under target/release/.

Usage

Usage: bevy-nbody [-n <num-bodies>] [-t <time-step>] [-w <width>] [-h <height>] [-s <scale>]

n-body simulation in bevy using bigbang

Options:
  -n, --num-bodies  number of bodies in the simulation
  -t, --time-step   granularity of simulation (how much each frame impacts
                    movement)
  -w, --width       initial width of spawned window
  -h, --height      initial height of spawned window
  -s, --scale       initial scale of view (bigger = more zoomed out)
  --help            display usage information

Controls

key control
R reset the simulation
Left Click hold and move mouse to pan the view
Middle Click hold and move mouse up and down to zoom in and out
Right Click click on a body to focus the camera on that body