Skip to content

🌌 Gravity and n-body simulation built using three.js. Very much a work-in-progress with lofty goals.

Notifications You must be signed in to change notification settings

rdkelley/webgl_gravity_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebGL Gravity Simulation

Deployed application: https://nbody-gravity-webgl.vercel.app/

This is a WebGL Gravity and n-body simulation built using three.js. It is very much a work-in-progress, and currently consists of:

  • A JavaScript application that uses the equation for universal gravitation applied to three.js objects.

In the future, I would like this simulation to include:

  • A n-body simulation that allows for millions of particles
  • A more efficient algorithm to compute gravitation, such as Barnes-Hut. Right now the sim runs at $O(n^2)$
  • Computation moved to a compute shader
  • Expanded UI

Build a development enviroment

The application uses vite

npm install
npm run dev

2. Refrences

The following sources helped me build this:

Thank you to every developer that takes the time to make quality content!

WebGL Gravity Simulation Animation

About

🌌 Gravity and n-body simulation built using three.js. Very much a work-in-progress with lofty goals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published