A rudimentary simulation of the three-body problem
A GitHub project simulating the three-body problem—where the gravitational interaction of three masses produces chaotic motion—prompts a broader look at why such systems are hard to solve analytically yet relatively easy to approximate numerically. Commenters explore concepts like chaos, riddled basins, symplectic integrators, and adaptive step sizes, and share libraries, tools, and visualizations for experimenting with n‑body gravity. The thread also touches on popular portrayals such as Liu Cixin’s “Three-Body Problem,” the limits of long-term orbital prediction, and what chaos implies for modeling real physical systems.
Overall behavior of the simulation
- Some viewers think bodies are colliding; others argue they’re just tightly slingshotting around each other, which can look like a “bounce” at low resolution.
- Higher‑resolution examples and periodic orbit visualizations support the “wrapping/slingshot” interpretation rather than actual collisions.
Chaos, closed forms, and integrability
- Running many simulations with slightly perturbed initial conditions visually demonstrates chaos (sensitive dependence on initial conditions).
- Several comments stress this only shows chaos, not the (non)existence of a closed-form solution; chaos and closed‑form solvability are logically independent.
- It’s noted that many systems with closed forms can still be highly sensitive to initial conditions.
- Discussion touches on integrable systems (conserved quantity per degree of freedom) vs generic nonlinear systems, and mentions KAM theory and Toda lattices as context.
Attractors, basins, and what “chaotic” means
- Some argue the n‑body problem is better described via riddled basins and related structures rather than just “chaotic.”
- Sensitivity to initial conditions alone is called insufficient as a formal definition of chaos; issues like topological transitivity, Wada basins, and strange non‑chaotic attractors are raised.
- Linked work shows fractal‑like crash maps and strange attractors in restricted three‑body setups.
Numerical methods and integrators
- Naive Euler integration tends to bleed or gain energy, causing unrealistic spirals into the primary body.
- Symplectic integrators (e.g., Verlet and higher‑order variants) and other high‑quality ODE integrators (Runge–Kutta, Bulirsch–Stoer) are recommended for long‑term orbital stability.
- Ideas like adaptive step size and thermostats/energy corrections are mentioned, with caveats (e.g., “flying ice cube” artifacts).
Tools, demos, and related software
- Multiple libraries, demos, and games are cited: REBOUND, browser-based gravity toys, Universe Sandbox, Kerbal Space Program (with and without n‑body mods), SPICE toolkit, and various three-body visualizers/bots/tutorials.
- These are used both for exploration (e.g., making Jupiter more massive and seeing system instability) and for learning numerical dynamics.
Three-body problem, Trisolaris, and the real solar system
- Several note that the novel’s setup is really a 4‑body problem (three stars plus a planet), though the planet’s mass may be negligible dynamically.
- The real solar system is an n‑body system but is “almost” integrable because the Sun (and then Jupiter) dominate the mass; this explains why short‑ to medium‑term ephemerides are accurate despite long‑term chaos.