---
title: "The Three-Body Dance Interactive Lab | Sandbox Physics"
description: "Why does one extra body remove the general orbit formula?"
canonical_url: "https://sandboxphysics.com/labs/three-body/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/three-body/"
last_modified: "2026-10-27"
---

Gravity · initial conditions

# Three-Body Gravity

**Why does one extra body remove the general orbit formula?** Each body's motion keeps changing the forces on the other two, and those forces in turn change its own motion. Apart from a few special solutions, no general closed-form answer exists. The motion has to be integrated numerically and checked against the conserved quantities.

Watch three bodies chase each other around a figure eight, turn as a rotating Lagrange triangle, or meet a visitor passing a binary. Give one body a small push, replay the original and nudged runs together, and check the computed motion against the conserved quantities.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The original and nudged runs are integrated separately, with the same masses and the same times. Paths that drift apart do not by themselves prove chaos. A close encounter never resets the system without telling you.

Data from the integrated trajectory

## How far apart do the two runs drift?

Recorded time $t=0.00$

The solid path includes the velocity nudge you chose. The dashed reference has no nudge and the same masses. Each run starts at rest in its own barycentric frame. The separation compares each body with its counterpart at the same recorded time.

$$
D(t)=\sqrt{\frac{1}{3}\sum_{i=1}^{3}\left|\mathbf r_i(t)-\mathbf r_{i,0}(t)\right|^2}
$$

Time, distance and mass use normalized units. The plane and rings are coordinate guides. Display size does not represent a physical radius. Energy errors are divided by the magnitude of the initial potential energy; they remain meaningful at zero total energy. Replay never recomputes the trajectory.

[Return to Kepler orbits →](https://sandboxphysics.com/labs/orbit/) [The figure-eight paper](https://arxiv.org/abs/math/0011268) [MIT: Lagrange solutions](https://ocw.mit.edu/courses/16-346-astrodynamics-fall-2008/resources/lec_24/)

Physics tutorial

## Three bodies: why simple laws do not produce simple orbits

**Background** Each of the three bodies keeps changing the motion of the other two. The two-body problem reduces to a single relative coordinate, but a general three-body system cannot be fully separated that way.

**Why it matters** This is why studies of long-term solar-system stability, stellar systems and space missions rely on numerical integration instead of one closed formula.

Start with the essentials

- **Focus question**: Newtonian gravity is simple, so why is there no general analytic formula for three-body paths?
- **One-sentence intuition**: The hard part is feedback: each body keeps moving the others, which changes where they will feel their future forces.

### Core mathematical model

#### Many-body acceleration

$$
\ddot{\mathbf r}_i=G\sum_{j\ne i}m_j\frac{\mathbf r_j-\mathbf r_i}{|\mathbf r_j-\mathbf r_i|^3}
$$

Every step recomputes all pairwise forces using the new positions.

#### Conserved total momentum

$$
\mathbf P=\sum_i m_i\mathbf v_i=\text{constant}
$$

The internal gravitational forces cancel in pairs, so the center of mass of an isolated system moves at constant velocity.

### Common difficulties

#### No general formula does not mean no prediction

**Typical misconception** Without a formula, three-body motion cannot be predicted.

**Better mental model** Numerical integration predicts the motion accurately over a finite time. What is missing is one simple expression that works for every starting state.

#### Chaos does not break conservation

**Typical misconception** If the paths look irregular, energy or momentum must not be conserved.

**Better mental model** Chaotic paths are still limited by the conserved quantities, and conservation does not make the motion periodic.

### Run the experiment

1. 01

   #### Observe a special periodic solution

   Choose Figure-eight and enable trails.

   **What to observe:** Three equal masses chase one another around the same closed curve.

2. 02

   #### Add a perturbation

   Choose Nudge the triangle, change the velocity nudge and launch again; compare solid and dashed paths.

   **What to observe:** The gap between the two paths changes with time. Growth over a finite time does not prove chaos on its own; near a stable orbit, a small perturbation can stay bounded.

3. 03

   #### Check the conserved quantities

   Inspect the white barycentre cross and the energy, momentum and angular-momentum records.

   **What to observe:** The motion is complicated, yet the conserved quantities of the whole system stay nearly constant.

Physical conclusion

A simple force law between each pair of bodies does not guarantee simple motion once several bodies pull on one another.

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
