Configurations to load
Why the three-body problem is famous
Two bodies under gravity have a closed-form solution: conic sections, worked out by Newton, and you can write down where they will be at any future time. Add a third and no such formula exists — Poincaré proved in 1890 that there is no general solution in terms of the usual functions, and that the motion is generically chaotic. Everything you see on this page beyond two bodies is being obtained by stepping forward numerically, because that is the only way it can be obtained.
That does not mean nothing is known. A handful of exact periodic three-body solutions have been found, and the figure eight is the famous one — three equal masses chasing each other around the same figure-of-eight curve, discovered numerically by Moore in 1993 and proved to exist by Chenciner and Montgomery in 2000. Load it and it will repeat cleanly for many periods. Then nudge the time step up and watch it fall apart: the orbit is stable against perturbation of the initial conditions but the integration error accumulates, and once the trajectory leaves the periodic solution it is in the chaotic sea like everything else.
The Pythagorean problem
Masses 3, 4 and 5 placed at the corners of a 3–4–5 right triangle and released from rest. Burrau posed it in 1913; it was not resolved until 1967 with a computer. The three bodies interact violently for about 60 time units, with several near-collisions, and then a binary pair forms and ejects the third body permanently. It is the standard demonstration that the generic outcome of a three-body encounter is a binary plus an escapee — which is also how real star clusters lose members.
What softening is for
The force between two point masses goes as 1/r², which goes to infinity as they approach. A numerical integrator hitting that gets an enormous acceleration in one step and flings a body off the screen — an artefact, not physics. Softening replaces r² with r² + ε², capping the force at close range. It is standard in galaxy simulations, where the “particles” each stand for millions of stars and a true close encounter is not something you want to resolve anyway. Set it to zero and load a collision preset to see what it prevents.
Reading the energy drift
Total energy should not change. The number on screen is how far it has moved from where it started, so it is a direct measure of how much you should believe the picture. This page uses velocity Verlet, which is symplectic: its energy error oscillates around the true value instead of growing without bound, which is exactly why it is used for orbital work rather than the more accurate-looking Runge–Kutta, whose error is smaller per step but accumulates in one direction until orbits visibly spiral.
Halve the time step and the drift should fall by about a factor of four — velocity Verlet is second order. That relationship is worth checking on the figure eight, because it is the quickest way to tell a working integrator from one that merely looks plausible.
Every pair, on purpose
Large simulations use the Barnes–Hut tree, which lumps distant groups of bodies into a single centre of mass and reduces the cost from N² to N log N — at the price of an approximation whose error is hard to see. This page computes all N(N−1)/2 pairs exactly, applying each force to both bodies at once so that the two halves of every action–reaction pair are equal by construction rather than by accident — total momentum then drifts only by accumulated floating-point rounding, around one part in 10¹² over thousands of steps. At two thousand bodies that is two million force evaluations per step, which a browser handles perfectly well, and it means the energy figure is measuring the integrator rather than the force approximation.