Skip to content

akshat-sj/GalaxySim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GalaxySim

This project simulates the behaviour of a system of particles under gravitational forces (essentially a N-body simulation).

Demo

nbodysim.mp4

Getting Started

In the project root-

mkdir build
cd build

Configure with CMake-

cmake ..

Build the project -

cmake --build .

Run the simulation

./OpenGLApp

Controls

Control Type Description
Pause / Resume Button Toggle simulation run state
Generate New Galaxy Button Re-generate galaxy with current settings
Enable/Disable Camera Button Toggles free-fly camera mode
Camera Speed Slider Adjust movement speed
Reset Camera Button Reset camera to initial position
WASD / QE / Mouse Text Info Control camera movement
Space Text Info Pause/resume simulation
Esc Text Info Exit simulation

Features

  • Supports simulation types: [Sequential (O(N²)), Barnes-Hut (O(N log N))]
  • Adjustable physics parameters: [Speed, Time Step, Theta]
  • Galaxy types: [Random, Disk, Spiral, Collision, Dense]
  • Adjustable particle count and real-time galaxy regeneration
  • Barnes-Hut extras: [Adaptive Theta, Tree Rebuild Frequency, Profiling Output]
  • Exposure, chromatic aberration and adjustable post-processing control
  • Star density, blackhole mass adjustment
  • Free-fly 3D camera, camera paramters adjustment
  • Detailed performance logging

Acknowledgements

About

a simulation of particles in an n body system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published