Skip to content

pvcraven/n-body

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N-Body Simulator

This simulates the gravitational interaction of a bunch of stars using Python and GLSL. It is an "N-Body simulator". By using the GPU, it is reasonably performant compared to a CPU-only version.

screenshots/screenshot.png

The simulator uses/depends on:

  • Python 3.7 - 3.9 (Not 3.10 because of a shapely library dependency)
  • Compute Shaders (Needs OpenGL 4.3+)
  • Arcade Library

A longer tutorial is available on the Arcade website.

You can adjust the num_stars parameter if your hardware is running this too slow. There are a couple different initial star setups you can try.

screenshots/galaxies.png

gen_galaxies_colliding function

screenshots/gen_random_space.png

gen_random_space function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published