Wednesday, June 3, 2020

Three-body problem simulation

This is a simple program that uses Newton's laws for simulating the trajectories of a given number of bodies interacting gravitationally. Uses the p5.js JavaScript library. It is quite fun to watch the ensuing chaos; if the masses don't get ejected off their orbits that is.


GitHub repo
Live demo

1 comment: