Observatorio de Tres Cuerpos
Física orbital · simuladorOrbital physics · simulator

Observatorio de Tres CuerposThree-Body Observatory

Un mismo sistema de tres cuerpos visto a la vez desde cada cuerpo, desde su centro de masa y desde lejos. Toca una vista pequeña para agrandarla.One three-body system seen at once from each body, from its center of mass and from afar. Tap a small view to enlarge it.

Teclas:Keys: 1–5 cambian la vistaswitch view · ␣ pausapause · R reiniciarestart

LecturasReadouts
TiempoTime
0.00 u
Error de energíaEnergy error ΔE/E₀
0
DistanciasDistances AB · BC · CA
—
Separación del gemeloTwin separation
—
Cómo leer las vistasHow to read the views
Vistas de cuerpoBody views

El cuerpo observador queda fijo en el centro, dentro de la retícula. Las estelas son el camino que él vio trazar a los otros dos. La cruz marca el centro de masa común.

The observing body stays fixed at the center, inside the reticle. The trails are the paths it saw the other two trace. The cross marks the common center of mass.

Marco rotatorioRotating frame

Además de fijar al observador, gira la vista para que un vecino quede siempre a la derecha (A mira a B, B a C, C a A, el centro de masa a A). Las órbitas periódicas se vuelven curvas cerradas. Como el momento total es cero, el centro de masa no se mueve: sin este marco, su vista es la lejana con más zoom.

Besides fixing the observer, it turns the view so one neighbor always sits to the right (A faces B, B faces C, C faces A, the center of mass faces A). Periodic orbits become closed curves. Total momentum is zero, so the center of mass never moves: without this frame, its view is the far view zoomed in.

El gemeloThe twin

Una copia del sistema con A movido una millonésima. Si su separación sube en línea recta en escala log, el sistema es caótico. Los círculos huecos en la vista lejana son el gemelo.

A copy of the system with A moved by one millionth. If its separation climbs in a straight line on a log scale, the system is chaotic. The hollow circles in the far view are the twin.

Vistas sincronizadasSynced views 5vistasviews A, B, C, centro de masa e inercial · vs. 1 en la vista clásicaA, B, C, center of mass and inertial · vs. 1 in the classic view
Error de energíaEnergy error 10⁻¹¹ΔE/E₀ Figura 8, t = 0–100 u · vs. 1.3 × 10⁻⁹ en la versión 1Figure-8, t = 0–100 u · vs. 1.3 × 10⁻⁹ in version 1 ▲ 146× más preciso▲ 146× more precise
Expulsión pitagóricaPythagorean ejection ≈60u Sale la masa 3 y 4 + 5 quedan en binaria · igual que Szebehely y Peters (1967)Mass 3 escapes, 4 + 5 stay bound · same as Szebehely & Peters (1967) ✓ coincide con 1967✓ matches 1967
Caos en LagrangeChaos in Lagrange ×10cada 4.3 uevery 4.3 u Crecimiento del error del gemelo · vs. ×10 cada 87 u en la figura 8Growth of the twin's error · vs. ×10 every 87 u in the figure-8 ▲ 20× más rápido▲ 20× faster

Dos escenarios son caóticos: su error crece hasta el tamaño del sistemaTwo scenarios are chaotic: their error grows to the size of the system

Separación entre el sistema y su gemelo (δx₀ = 10⁻⁶), escala log · t = 0–100 u (G = 1)Separation between the system and its twin (δx₀ = 10⁻⁶), log scale · t = 0–100 u (G = 1)
Fuente: simulación propia, RK4 con paso adaptativo, medida el 23 oct 2026Source: own simulation, adaptive-step RK4, measured 23 Oct 2026

Las coreografías aguantan; Lagrange y el pitagórico se rompenThe choreographies hold; Lagrange and the Pythagorean case break apart

Cada escenario medido de t = 0 a 100 u · u = unidad de tiempo con G = 1Each scenario measured from t = 0 to 100 u · u = time unit with G = 1
EscenarioScenario MasasMasses PeriodoPeriod Error de energíaEnergy error Gemelo en t = 100 uTwin at t = 100 u ResultadoOutcome

Gemelo = separación con la copia perturbada (empieza en 10⁻⁶). La barra crece con el logaritmo. Error de energía = máximo de |ΔE/E₀| en 0–100 u.Twin = separation from the perturbed copy (starts at 10⁻⁶). The bar grows with the logarithm. Energy error = maximum |ΔE/E₀| over 0–100 u.

Cómo lo hiceHow I built it

El problema

Quería ver el problema de tres cuerpos desde adentro. Casi todas las animaciones lo muestran desde lejos, en un marco fijo. Pero alguien parado en uno de esos cuerpos vería otra cosa: él quieto y los otros dos dibujando lazos a su alrededor. Me interesaba saber si, al cambiar de punto de vista, aparecen patrones que desde lejos no se notan. Por eso la herramienta muestra cinco vistas a la vez: desde A, desde B, desde C, desde el centro de masa común y desde lejos.

El método

No hay datos externos. Todo sale de las ecuaciones de Newton con G = 1, en dos dimensiones. El código integra el sistema con Runge-Kutta de cuarto orden y un paso que se achica cuando dos cuerpos se acercan: el paso es una fracción del tiempo de caída libre del par más cercano, con un tope de 0.005 u. Cada vista es la misma simulación con otro origen. Se resta la posición del observador y, si el marco rotatorio está activo, se gira la imagen para que un vecino quede siempre a la derecha. Las estelas guardan las posiciones cada 0.01 u y se redibujan en el marco de cada vista. Por eso cada vista tiene su propia forma de la misma historia.

El gemelo es una segunda copia del sistema con el cuerpo A movido una millonésima. Medir cuánto se separan las dos copias es la forma más directa de ver el caos: si la separación crece como una exponencial, una línea recta en escala log, el futuro del sistema depende de detalles que nadie puede medir.

Las condiciones iniciales vienen de artículos publicados: la figura 8 de Chenciner y Montgomery (2000), tres órbitas de Šuvakov y Dmitrašinović (2013), el problema pitagórico de Burrau (1913) y el triángulo de Lagrange (1772). Son números, no bases de datos con licencia, y se citan abajo. Todo corre en el navegador, sin servidor ni bibliotecas, así que operarlo cuesta $0. Por eso esta página no lleva bloque de dinero y costos.

Validación

Los números de esta página salen de correr el mismo integrador fuera del navegador, en Node. Se midieron cinco cosas. Primero, la energía: en la figura 8 el error relativo máximo en 100 u es 9 × 10⁻¹². En el pitagórico, con encuentros muy cercanos, es 2 × 10⁻⁸. Segundo, los periodos: cada órbita periódica vuelve a su estado inicial después de su periodo publicado con un error de unas milésimas, que es la precisión de las condiciones iniciales impresas. Tercero, la simetría: en la figura 8, B está siempre donde A estará dos tercios de periodo después, con un error menor que 10⁻⁵. Eso confirma que es una coreografía. Cuarto, el caos: el gemelo del triángulo de Lagrange se separa ×10 cada 4.3 u, y el de la figura 8 tarda unas 87 u. Quinto, el caso pitagórico termina como lo publicaron Szebehely y Peters en 1967: la masa 3 sale expulsada, aquí hacia t ≈ 60 u, y las masas 4 y 5 quedan en una binaria.

Qué hizo la IA

La idea y las cinco vistas son mías. El código lo escribió Claude, de Anthropic, en una conversación conmigo a partir de esa descripción. Claude también corrió las mediciones de esta página, encontró el error del suavizado que explico abajo y redactó los textos. Yo decidí qué se publica.

Qué falló

La primera versión suavizaba la gravedad: sumaba una distancia mínima de 10⁻⁴ para no dividir entre casi cero. También usaba un paso más grande. Se veía bien, pero en el problema pitagórico expulsaba al cuerpo equivocado: salía la masa 4, no la 3. En un sistema caótico, un detalle numérico pequeño durante un encuentro cercano cambia el final. Al quitar el suavizado y reducir el paso, el error de energía de la figura 8 bajó de 10⁻⁹ a 10⁻¹¹ y el pitagórico dio el resultado publicado.

Quedan límites. El integrador no está regularizado, así que un choque casi directo puede romperlo. Las órbitas inestables, como la mariposa, se desvían tras unos 16 periodos aunque las condiciones iniciales sean buenas, porque cualquier error de redondeo crece. Y el marco rotatorio gira de golpe cuando dos cuerpos pasan casi encima uno del otro, porque la dirección hacia el vecino cambia de repente. La página corta la estela en esos saltos para que no aparezcan rayas falsas.

Qué sigue

Una versión en 3D, un editor de masas para ver cuándo deja de ser estable la figura 8, y secciones de Poincaré para buscar patrones con números en vez de a ojo.

The problem

I wanted to see the three-body problem from the inside. Almost every animation shows it from far away, in a fixed frame. But someone standing on one of those bodies would see something else: themselves still, and the other two drawing loops around them. I wanted to know whether new patterns show up when you switch points of view. So the tool shows five views at once: from A, from B, from C, from the common center of mass, and from afar.

The method

There is no external data. Everything comes from Newton's equations with G = 1, in two dimensions. The code integrates the system with fourth-order Runge-Kutta and a step that shrinks when two bodies get close: the step is a fraction of the free-fall time of the closest pair, capped at 0.005 u. Each view is the same simulation with a different origin. The observer's position is subtracted and, if the rotating frame is on, the picture turns so one neighbor always sits to the right. The trails store positions every 0.01 u and are redrawn in each view's frame. That is why each view gives the same history its own shape.

The twin is a second copy of the system with body A moved by one millionth. Measuring how far the two copies drift apart is the most direct way to see chaos: if the gap grows exponentially, a straight line on a log scale, the system's future depends on details no one can measure.

The initial conditions come from published papers: the figure-8 from Chenciner and Montgomery (2000), three orbits from Šuvakov and Dmitrašinović (2013), Burrau's Pythagorean problem (1913) and Lagrange's triangle (1772). They are numbers, not licensed datasets, and they are cited below. Everything runs in the browser, with no server and no libraries, so it costs $0 to operate. That is why this page has no money and costs block.

Validation

The numbers on this page come from running the same integrator outside the browser, in Node. Five things were measured. First, energy: in the figure-8 the maximum relative error over 100 u is 9 × 10⁻¹². In the Pythagorean case, with very close encounters, it is 2 × 10⁻⁸. Second, periods: each periodic orbit returns to its initial state after its published period with an error of a few thousandths, which is the precision of the printed initial conditions. Third, symmetry: in the figure-8, B is always where A will be two thirds of a period later, with an error below 10⁻⁵. That confirms it is a choreography. Fourth, chaos: the Lagrange triangle's twin drifts ×10 every 4.3 u, while the figure-8's takes about 87 u. Fifth, the Pythagorean case ends the way Szebehely and Peters published it in 1967: mass 3 is ejected, here around t ≈ 60 u, and masses 4 and 5 stay together as a binary.

What the AI did

The idea and the five views are mine. Claude, made by Anthropic, wrote the code in a conversation with me, from that description. Claude also ran the measurements on this page, found the softening bug I describe below, and drafted the text. I decided what gets published.

What failed

The first version softened gravity: it added a minimum distance of 10⁻⁴ so it would never divide by almost zero. It also used a larger step. It looked fine, but in the Pythagorean problem it ejected the wrong body: mass 4 escaped, not mass 3. In a chaotic system, a small numerical detail during one close encounter changes the ending. Removing the softening and shrinking the step lowered the figure-8 energy error from 10⁻⁹ to 10⁻¹¹, and the Pythagorean case gave the published result.

Some limits remain. The integrator is not regularized, so a nearly head-on collision can break it. Unstable orbits such as the butterfly drift away after about 16 periods even with good initial conditions, because any rounding error grows. And the rotating frame spins abruptly when two bodies pass almost on top of each other, because the direction toward the neighbor flips at once. The page cuts the trail at those jumps so no false streaks appear.

What's next

A 3D version, a mass editor to find where the figure-8 stops being stable, and Poincaré sections to look for patterns with numbers instead of by eye.

Fuentes y licenciasSources and licenses

FuenteSourceQué aportaWhat it providesLicenciaLicenseUso comercialCommercial use
Chenciner & Montgomery (2000), Annals of Mathematics 152, 881–901Condiciones iniciales de la figura 8Figure-8 initial conditionsCita (los números no tienen licencia)Citation (numbers are not licensed)SíYes
Šuvakov & Dmitrašinović (2013), Phys. Rev. Lett. 110, 114301Mariposa I, Polilla I y Abejorro: condiciones y periodosButterfly I, Moth I and Bumblebee: conditions and periodsCitaCitationSíYes
Szebehely & Peters (1967), Astron. J. 72, 876 · Burrau (1913)Problema pitagórico y su desenlace (validación)Pythagorean problem and its outcome (validation)CitaCitationSíYes
Lagrange (1772), Essai sur le problème des trois corpsTriángulo equilátero en rotaciónRotating equilateral triangleDominio públicoPublic domainSíYes
Li & Liao (2025) · Li, Li & Liao (2020)Contexto: miles de órbitas periódicas conocidasContext: thousands of known periodic orbitsCitaCitationSíYes
Barlow Condensed · IBM Plex Sans · IBM Plex Mono (Google Fonts)Letras de Atlas FJVAtlas FJV typefacesSIL Open Font License 1.1SíYes
Código del simuladorSimulator codeFísica, vistas y mediciones; sin bibliotecasPhysics, views and measurements; no librariesPropioOwn workSíYes

Mediciones: 23 oct 2026, versión 2 del simulador.Measurements: 23 Oct 2026, simulator version 2.

Aviso:Note: simulación educativa en unidades adimensionales (G = 1). No representa sistemas reales ni sirve para predecir órbitas.educational simulation in dimensionless units (G = 1). It does not model real systems and cannot predict orbits.