← Gallery
Simathon 02Has videoHas code

Three Body Gambit

Navya Mathur

An interactive three-body simulation that shows how tiny changes in initial conditions can produce dramatically different trajectories over time.

Still from Three Body Gambit

What it does

THREE-BODY GAMBIT is an interactive simulation of three gravitationally interacting bodies using Newtonian gravity and a second-order Velocity Verlet integrator. It runs two nearly identical universes side-by-side: Universe A provides a baseline system, while Universe B receives a controlled change to its initial conditions. The simulation visualises their trajectories and measures their positional divergence (D(t)), while also tracking quantities such as total energy, momentum, centre-of-mass drift and timestep safety. I also developed reproducible guided experiments showing representative outcomes such as bounded motion, close encounters, gravitational deflection and strong disruption, as well as a randomised initial-condition mode. A major part of the project was making sure the differences between the two universes were caused by the physics, not errors in the simulation. I tested the simulation using a two-body orbit and checked that energy, momentum, centre of mass and angular momentum stayed consistent. Approximations: the simulation uses Newtonian gravity and treats the bodies as point masses. It assumes an isolated system with no outside forces and uses simplified units with \(G=1\). The motion is calculated numerically using a finite timestep and the Velocity Verlet method. Relativity, the size of the bodies, tidal effects, extra bodies and outside gravitational fields are not included. If two bodies get too close for the simulation to calculate reliably, the encounter is flagged instead of using artificial smoothing. The simulation shows how sensitive a system can be to small changes in its starting conditions, but divergence on its own does not prove that the system is chaotic.