entreMultiversos ← technology
software engineering· 01 jul 2026· 6 min

Three bodies: real physics as identity

Why the heart of this site is a real gravitational simulation — and not a scripted animation.

Three bodies under mutual gravity have no general solution. It is an old result, uncomfortable and beautiful: the slightest perturbation in positions or velocities diverges, and the system slides into deterministic chaos. But inside that chaos there are rare islands — choreographies, periodic solutions in which the three bodies dance the same figure forever. The figure-eight of Chenciner and Montgomery (2000), where the three chase one another along a lemniscate with period T ≈ 6.3259; Lagrange's triangles, turning since 1772. It was this duality — genuine chaos and genuine equilibria, with nothing in between — that became the spine of this site.

The Entrance lives in chaos: the three bodies move free, with a seed that changes daily. Each of the seven worlds is a different choreography — its own figure, its own color, its own scale. Traveling from one place to another is not a CSS transition nor a hand-drawn keyframe: it is the system being guided, by a gentle attractive force, from its current conditions to the initial conditions of that choreography — and then released. If the physics is right, the equilibrium sustains itself, no trick. Leaving a world is the inverse: perturb the system, and the chaos resumes.

Why this matters more than it seems

Faking it would have been cheaper. An SVG path animated by requestAnimationFrame would have the same visual effect at a fraction of the work — no singularities to soften, no energy to conserve, no integration recomputed sixty times a second. But it would be a small lie embedded in the foundation: the site's promise is that the worlds coexist in real tension, not in a staged choreography. Scripted physics would be decorating the metaphor from the outside while it goes hollow inside. The integrator below — velocity Verlet, the same method celestial mechanics uses to predict real orbits — is the difference between simulating an idea and illustrating it:

// lente/lente-corpos.js — one velocity Verlet step
function passo(dt) {
  for (var i = 0; i < 3; i++) {
    var c = corpos[i];
    c.x += c.vx * dt + 0.5 * aAtual[i].x * dt * dt;
    c.y += c.vy * dt + 0.5 * aAtual[i].y * dt * dt;
  }
  var aNova = acel(); // recompute mutual gravity at the new position
  for (var k = 0; k < 3; k++) {
    corpos[k].vx += 0.5 * (aAtual[k].x + aNova[k].x) * dt;
    corpos[k].vy += 0.5 * (aAtual[k].y + aNova[k].y) * dt;
  }
  aAtual = aNova;
}

Nothing here is decided from outside: each body's position in the next frame depends only on the position and velocity it already had, and on the gravity the other two exert on it at that instant. That is why the site's opening — the ∞ drawn one full lap, complete, before breaking apart at the Entrance — is not a piece of pre-rendered motion design: it is the same engine, running live, that sustains every world after it.

← back to the circuit technology · 2026—