A previous presentation provided a way to step through Simó’s planar three-body gravitational choreographies as static graphs. This presentation exhibits the same choreographies individually as animated graphics:

Gravitational choreographies are periodic solutions of gravitational systems in which all bodies traverse the same orbit at equally spaced intervals. A system that starts off entirely in a plane, with no velocity components normal to the plane, will remain in the plane. For consistency with the previous presentation, the masses are colored red, blue and green in the same order as the constituent thirds of the orbits.

An initial version of this presentation assumed that the data used in the previous presentation was equally spaced with respect to time. This produced some rather strange behavior, with curiously nonconstant motion on large outer loops and obvious nonconservation of angular momentum. Carles Simó confirmed that his data was generated with adaptive time steps for higher accuracy, which means that those original data files cannot be used for realistic animations.

Fortunately, Simó was able to locate the initial conditions for all 345 planar choreographies and kindly provided them to me. It was then straightforward to integrate the orbits for a fixed time step using an accurate integration method. For this presentation I employed mpmath, an open-source arbitrary-precision Python library, and a bit of code.

The initial conditions are specified as five numbers for each choreography, denoted in order as *c*_{1}, *c*_{2}, *c*_{3}, *c*_{4} and *c*_{5}. In terms of these values, the initial positions and velocities are

$\begin{array}{l}{x}_{1}=-2{c}_{1}\\ {x}_{2}={c}_{1}\\ {x}_{3}={c}_{1}\end{array}\phantom{\rule{3em}{0ex}}\begin{array}{l}{y}_{1}=0\\ {y}_{2}={c}_{2}\\ {y}_{3}=-{c}_{2}\end{array}\phantom{\rule{3em}{0ex}}\begin{array}{l}{u}_{1}=0\\ {u}_{2}={c}_{3}\\ {u}_{3}=-{c}_{3}\end{array}\phantom{\rule{3em}{0ex}}\begin{array}{l}{v}_{1}=-2{c}_{4}\\ {v}_{2}={c}_{4}\\ {v}_{3}={c}_{4}\end{array}$

The remaining quantity *c*_{5} is one-third of the orbital period. All masses are equal to one third, and the total energy is minus one half. The center of mass is constrained to remain at the origin, so that one has identically

$\begin{array}{r}{x}_{1}+{x}_{2}+{x}_{3}=0\\ {y}_{1}+{y}_{2}+{y}_{3}=0\end{array}\phantom{\rule{5em}{0ex}}\begin{array}{c}{u}_{1}+{u}_{2}+{u}_{3}=0\\ {v}_{1}+{v}_{2}+{v}_{3}=0\end{array}$

for all times. These equations were used to reduced the order of the system to be integrated by eliminating the third position and velocity: this speeds up the process of integration. One only needs to evaluate the first third of the choreography, as the remaining two thirds are permutations of the first.

The individual choreographies are contained in text files as arrays of three lines, one for each third of the orbit. The first file is available here and the others mutatis mutandis. The arrays are combined and then presented as sequential points using MathCell, an open-source library for visualizing mathematical physics in the browser.

In the interest of not overtaxing the typical browser, a reasonable choice had to me made as to the size of the time step, with the value of 0.005 used. This step size does not reveal all of the detail of orbits with very close encounters of the masses and produces visible defects when the orbits are shown, most notably for Nos. 33, 34, 58, 70, 92, 109, 127, 176, 251 and 268. The defects could be removed by decreasing the step size, but even with a value of 0.001 orbit No. 33 still shows defects and browser performance is severely degraded. Better to live with the defects for these choreographies.

While offline integration of the equations of motion is best for accuracy, I am always intrigued by the challenge of live integration in the browser using pure JavaScript. In order not to affect loading time of this page, these calculations need explicit via this button. Then, with classic fourth-order Runge-Kutta provided by Math and a time step of 0.0001, here are the planar choreographies evaluated on the fly from the initial conditions:

For such delicate integration, the choreographies are surprisingly robust: only around twenty five have serious problems, with five of those being completely unusable. The live integration is accurate enough for visualizations for almost 93% of the choreographies. Not bad at all.

Another way to check the accuracy of the integration is to evaluate the energy and total angular momentum of each choreography, which should remain invariant over the entire orbital path. Here are the initial values of these constants along with the sum of the absolute value of deviations at each integration point:

Moving through the choreographies numerically indicates that a few have total accumulated errors not particularly discernible from the orbit visualizations, while the clearly problematic orbits have the expected large errors. Still all in all, total accumulated errors are surprisingly small for the majority of the choreographies. Again, not bad for a calculation entirely in the browser!

*Uploaded 2018.05.29 — Updated 2018.06.12*
analyticphysics.com