Some gravitational systems are deterministic yet highly sensitive to initial conditions. In a three-body setting, a tiny difference can grow into visibly different future paths.
Loading the interactive visual. The lesson text and model remain available while it starts.
Serialize one initial state array of masses, positions, velocities, source ordering, softening length, integrator, time step, and output times. Make a second packet by changing one explicitly named component by a small (\delta). Both solvers then read their own immutable previous arrays, accumulate unordered pair interactions in the same order, and advance for the same physical times.
Measure a labelled norm, for example:
\[d(t)=\sqrt{\sum_i\lVert\mathbf r_i(t)-\widetilde{\mathbf r}_i(t)\rVert^2}.\]Also log total momentum, energy, angular momentum, close-approach distances, and any regularization. Divergence while these diagnostics are uncontrolled is a numerical experiment that has not yet isolated its cause.
Plot (d(t)) on a logarithmic axis only where it is above roundoff and below the characteristic size of the system. A later plateau can mean the two states have simply become unrelated within a bounded region; it does not give a growth rate. If you estimate a finite-time exponent, state the fitted time window, norm, perturbation magnitude, and units.
Run controls before a chaos claim: the zero-offset pair must replay identically, a two-body reference should stay predictably regular, reversing a deterministic serialization should not alter the answer except for documented floating-point reductions, and smaller time steps or a second integrator should preserve the qualitative separation window. A blue Three.js orbit view is helpful for spatial intuition, but saved numerical traces and invariant residuals are the evidence.
Close encounters are especially dangerous. A softening length changes the physical potential; event-driven collisions, adaptive time steps, or random forcing change the reproducibility contract. Record each choice and avoid treating finite-time sensitivity as a universal prediction of a real astronomical system.
Prediction: Two nearby multi-body states can separate while each still obeys the same equations.
Name one source of accidental divergence that must be ruled out before calling a result chaotic.Chaos is sensitivity in a deterministic model. Compare packets with one declared perturbation, control invariants and convergence, and report an unsaturated, norm-defined separation window rather than one dramatic orbit picture.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Chaos in Gravity, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Gravitation, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Chaos in Gravity as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Design reproducible paired gravity simulations that test sensitivity without confusing it with numerical error.