Nested Three Body Explorer
A WebGL sandbox for exploring whether nested three-body systems can hover near a boundary between ordered motion and chaotic drift. The only solid bodies are the smallest-scale blue, red, and yellow spheres; higher-level bodies are shown as translucent subsystem envelopes whose mass is the sum of their descendants.
More about the model
This explorer was built to probe your hypothesis that multiscale nested three-body systems may naturally drift toward a balance on the edge of chaos: neither locked into rigid order nor dissolved into featureless randomness. In active-inference language, you can read the translucent clusters as provisional attractor states: temporary higher-level regularities that are continuously rebuilt by smaller-scale motion below them. The question is whether changing mass ratios, nesting depth, and scale ratio produces long-lived patterns that feel like self-organized criticality, with structure persisting while local details keep reorganizing.
The model is conceptual rather than a faithful astrophysical simulation. Only the smallest-scale spheres are real bodies with mass. A higher-level body is not an extra object added on top; it is the center of mass and aggregate mass of all smallest bodies in the subsystem beneath it. The translucent spheres are navigational and conceptual envelopes around those subsystems. Clicking one locks the camera to that subsystem's moving center of mass so you can zoom inward through the nested structure.
Numerically, local triads use leapfrog integration with softened gravity. Leapfrog is used because it is better at preserving orbital energy than a simple Euler step. The simulation also uses hierarchical aggregate forces: every subsystem is updated, but the deepest level is approximated through centers of mass rather than a literal all-pairs solve. At level 10 there are 59,049 smallest bodies; a full all-pairs force calculation would require billions of interactions per frame, so the hierarchy is what makes the experiment interactive.
Cross System Forces is an optional experimental layer. When it is off, subsystems influence one another only through the hierarchical tidal model. When it is on, bodies in different subsystems also interact by color: same colors repel, different colors attract. This is not meant as real physics; it is a way to test whether competing affinities and exclusions make attractor-like clusters, phase changes, or SOC-like cascades easier to see.
The statistics panel is practical rather than absolute. Browsers expose renderer information and, on some machines, GPU timer queries. Where exact GPU timing is not available, the Explorer reports a render-budget proxy based on frame time, body count, and draw cost. Trails are sampled histories of the smallest bodies, colored by body type, and can be extended up to 40 seconds to reveal slower patterns when the level count is low or the time scale is high.
Level 10 simulates 59,049 smallest-scale bodies and draws 29,524 translucent subsystem envelopes. For the smoothest view, start around level 5 or 6, then push upward once you have a feel for the controls.