Context
The n-body problem describes the motion of "n" objects under the influence of each other's gravitational field. As described by Brittanica: "In the general n-body problem, all bodies have arbitrary masses, initial velocities, and positions; the bodies interact through Newton’s law of gravitation, and one attempts to determine the subsequent motion of all the bodies." This theoretical equation is closely linked with the motion of celestial bodies, leading to centuries of research and testing to find a general solution. Although many approximations have been found (such as restricted 3-body problems of Jupiter’s effect on asteroids), an exact general equation has yet to be discovered. Source: Brittanica
Inspiration
Our team wanted to contribute our visualizations to the body of n-body research in the hopes that a general solution would be found.
Capabilities
- To-scale simulation of the solar system
- 2-body, 3-body, and sandbox simulations
- Visualization of distances between bodies
- Dynamic simulation parameters (Mass size and object quantity)
How we built it
Our website is based on HTML5 and CSS3. We used p5.js to create the 2-D physics simulations in Javascript. AI was used to make this project in the following ways:
- Debugging physics simulations based on p5.js
- General research on how to implement p5.js into our project
Challenges we ran into
- Learning p5.js and implementing it into a website
- Accurate math equations that constrain our simulation to a physically consistent model
Accomplishments that we're proud of
- Visualizations we were able to create
- Creating and implementing a website through Github Pages
What we learned
- Physics modeling using p5.js
- Website design
- Mathematics that describes kinematic motion
What's Next for Orbital Simulation and the N-Body Problem
- More physically-accurate models
- Potential for 3-D Simulation incorporating libraries like Three.js, Ammo.js, etc.
- Preset masses that are similar to existing celestial bodies (planets, asteroids, etc)
- Better visuals for our simulation
Log in or sign up for Devpost to join the conversation.