Dlaczego trzy krążące ciała rzadko się powtarzają
Trzy równe masy, tylko grawitacja. Prawie każda orbita się rozpada; nieliczne powtarzają się bez końca.
Film gra z YouTube po kliknięciu.
Dlaczego to działa
Dwa ciała w grawitacji krążą wokół siebie po tej samej elipsie bez końca. Dodaj trzecie o tej samej masie, a prawie każdy start kończy się plątaniną, zwykle z jednym ciałem wyrzuconym na zewnątrz. A jednak nieliczne starty zamykają się w siebie i powtarzają, jak ósemka.
aᵢ = G · Σⱼ≠ᵢ mⱼ · (rⱼ − rᵢ) ÷ |rⱼ − rᵢ|³ósemka: trzy równe masy, zerowy moment pędu
Zbuduj to w Pythonie
Python 3 · numpy · matplotlibÓsemka z opublikowanych wartości startowych, trzy okresy w małych krokach metodą żabiego skoku (leapfrog).
"""Three bodies: the figure-eight orbit, from the starting values computed by Carles Simo
(in Chenciner and Montgomery, 2000). G = 1, three masses of 1.
Run: python three-body-orbits.py (needs: pip install numpy matplotlib)
"""
import numpy as np
import matplotlib.pyplot as plt
plt.style.use("dark_background")
x1 = np.array([0.97000436, -0.24308753])
V = np.array([-0.93240737, -0.86473146]) # the velocity of body 3
pos = np.array([x1, -x1, [0.0, 0.0]])
vel = np.array([-V / 2, -V / 2, V])
period, dt = 6.32591398, 0.0005
turn = 0 # degrees to turn the first velocity by (the film breaks the eight with 15)
a = np.radians(turn)
vel[0] = [vel[0, 0] * np.cos(a) - vel[0, 1] * np.sin(a), vel[0, 0] * np.sin(a) + vel[0, 1] * np.cos(a)]
def pull(p):
"""Each body's acceleration: the sum of the other two's gravity, G*m / r**2 towards each"""
acc = np.zeros_like(p)
for i in range(3):
for j in range(3):
if i != j:
d = p[j] - p[i]
acc[i] += d / np.linalg.norm(d) ** 3
return acc
track = []
acc = pull(pos)
for _ in range(int(3 * period / dt)): # three periods, leapfrog steps (they keep the energy well)
vel += acc * dt / 2
pos += vel * dt
acc = pull(pos)
vel += acc * dt / 2
track.append(pos.copy())
track = np.array(track)
colours = ["#5eead4", "#f0abfc", "#f5c76b"]
plt.figure(figsize=(7, 4))
for body in range(3): # all three run along the same track, a third of a period apart
plt.plot(track[:, body, 0], track[:, body, 1], color=colours[body], linewidth=1)
plt.scatter(track[-1, :, 0], track[-1, :, 1], c=colours, s=80, zorder=3)
plt.axis("equal")
plt.axis("off")
plt.show()
# Try: turn = 15 -> the three tracks no longer close; the eight falls apart
Spróbuj: Ustaw turn = 15, jak w filmie: trzy tory przestają się zamykać.
Poznaj ten skrypt linijka po linijce, z zadaniami i quizem → · uruchom go w Google Colab (po angielsku) →
Matematyka tak, jak opowiada ją film
Pokaż notatki z filmu (z YouTube, po angielsku)
Three equal masses pull on each other with nothing but Newton's gravity. For two bodies the motion is an ellipse, forever; for three there is no formula at all, and almost every start ends in a tangle — one body is usually flung away. Yet a handful of starting conditions close on themselves exactly.
The first act is the figure-eight, found numerically by Cris Moore in 1993 and proved to exist by Chenciner and Montgomery in 2000: three bodies chasing each other around one figure-eight track, always equally spaced in time. Then one body's velocity is nudged by 15 degrees. Nothing else changes, but the orbit is unstable to that nudge, so within seconds the ballet becomes chaos — and that is the normal state of three bodies.
From the chaos the film gathers them into two more of the periodic solutions catalogued by Šuvakov and Dmitrašinović in 2013, the "moth" and the "yin-yang", each broken again by the same nudge, before the figure-eight returns. Everything is integrated with an adaptive 8th-order method at relative tolerance 1e-9; the periodic orbits were checked to return to their starting state to about one part in a thousand after one period. The small white dot is the centre of mass — it never moves, because the total momentum is zero.
Z opisu filmu Three Bodies, Pure Gravity (po angielsku).
Shorty
Źródła
- Three-body problem (Wikipedia)
- A. Chenciner, R. Montgomery, “A remarkable periodic solution of the three-body problem in the case of equal masses”, Annals of Mathematics 152 (2000)
- M. Šuvakov, V. Dmitrašinović, “Three classes of Newtonian three-body planar periodic orbits”, Physical Review Letters 110 (2013)