The goal is to create a simple algorithm to create procedural solar systems implementing elliptical orbits and planet satellites.
Online demo here: https://barthpaleologue.github.io/orbitalStudy/dist/newton.html
In this simple simulator we create physical bodies around a central sun, and give them tangential velocity to give them near circular orbits :
Documentation : https://www.wikiwand.com/en/Circular_orbit#/Velocity
And then we apply Newton's second law to make them move :
Yet it comes with a few drawbacks : orbits with a lot of bodies are very unstable and you have to run the entire simulation to know the position of a body at a time t. So we have to try something else.
Online demo here: https://barthpaleologue.github.io/orbitalStudy/dist/kepler.html
We are trying to solve this equation describing the orbit of a body :
We can't solve it exactly for E so we use approximations like Newton's method. Then we compute the orbital period using this equation :
Documentation : https://www.wikiwand.com/en/Kepler's_laws_of_planetary_motion#/First_law
This project has been created using webpack-cli, you can now run
npm run build
or
yarn build
to bundle your application