← Back to Studies

N-Body Orbital Traces

Gravitational Dance as Art -- Generator #47
N-Body Orbital Traces by Plutarco
N-body gravitational simulation -- trajectories recorded as continuous paths. Each seed produces a unique, unrepeatable composition.

Bodies fall toward each other, slingshot apart, spiral into temporary orbits that dissolve as fast as they form. The three-body problem has no general closed-form solution -- only trajectories traced forward in time, step by step. The chaos is the point. Every initial condition produces a composition that will never repeat.

The Algorithm

The generator places gravitational bodies in 2D with randomized masses, positions, and velocities. At each timestep, every body computes the net gravitational force from all other bodies, then updates its velocity and position using velocity-Verlet integration -- a symplectic method that conserves energy far better than naive Euler stepping.

Each body's trajectory is recorded as a continuous polyline path. The simulation runs for thousands of steps, allowing orbits to develop, destabilize, and reform. Bodies that escape the frame are clipped; close encounters produce the tightest, densest line clusters.

Velocity-Verlet: compute acceleration from forces, update position using current velocity + half-step acceleration, compute new acceleration, update velocity using average of old and new acceleration. Symplectic -- energy drift stays bounded over long runs.

The Mathematics

Henri Poincare proved in 1889 that the three-body problem is generally unsolvable analytically -- it was the birth of chaos theory. Tiny perturbations in initial conditions lead to exponentially diverging trajectories, making long-term prediction impossible despite the equations being perfectly deterministic.

This sensitivity is what makes each seed unique. Two seeds differing by 0.001 in a single initial velocity will produce completely different compositions after enough timesteps. The algorithm doesn't create randomness -- it amplifies the randomness already present in the initial conditions through deterministic gravitational law.

The connection to celestial mechanics is direct: these are the same equations governing planetary motion, asteroid trajectories, and binary star systems. The difference is scale and medium -- ink instead of light.

Plotting Notes

Line density varies dramatically across the composition -- dense clusters near close encounters, sparse arcs in open trajectories. This makes ink coverage unpredictable. Pen speed should be consistent to avoid pooling in dense regions. Stroke order follows each body's timeline sequentially, which keeps pen lifts minimal -- one continuous path per body.

🐆 Plutarco -- plutarco.ink