Before experimenting with this, you may wish to refer to an introduction to choreographies and/or a tutorial of the program's use.

If everything were working, this would be replaced by a drawing canvas. Perhaps you have JavaScript turned off?

FFT length:
Colored trails:
Show rotator:

Saved orbits

Choose a symmetry group

Rotational Reflectional Exceptional -fold Rotate by each time
Type I Type II Type III Example with this symmetry:
Thumbnail of example orbit

This page contains an HTML5/JavaScript web application for finding gravitational n-body choreographies. These are especially beautiful configurations of n stars under Newtonian gravity: if you set them up just right, they chase each other endlessly around the same curve. For more discussion of what choreographies are and my methodology for finding them, see the aforelinked page. In short, the idea is to start with a curve and mathify it into a real choreography. For the most interesting results, I suggest starting with lots of loops.

This web app is experimental and browser support is limited. In particular, most mobile browsers and older versions of Internet Explorer are comically slow.

When the program thinks it has found a choreography, it switches to an animation of that choreography; this animation is just a depiction of the solution curve and is not an actual simulation. Almost all known choreographies are unstable, so a direct simulation would fall apart quickly. Also, because the algorithm is approximate, a purported solution may not represent a true choreography. That is why the computer-assisted proof component of this research project is important.

My latest C++ program for finding orbits uses Newton's method, but that requires solving reasonably large linear systems. Today's JavaScript interpreters, while very impressive, are not up to the task. This program instead uses a quasi-Newton method to search for critical points of the action. More precisely, it uses the SR1 update method. This method tolerates indefinite Hessian matrices and thus is suitable for our goals of finding solutions other than just local minima. I would have liked to use a limited-memory method like L-BFGS but I found the tradeoff of computing time per iteration versus convergence rate for L-SR1 to be quite unfavorable for these problems.

Each iteration requires computing two FFTs; for this I used Jens Nockert's fft.js. Support for some older versions of Internet Explorer relies on the ExplorerCanvas library.

Uploaded orbits may, at my discretion, be added to the gallery and/or included in academic publications.