Worldline

0.00c
About this simulation

What is Worldline?

Worldline is a real-time N-body simulator for gravity, electromagnetism, scalar fields, and relativistic corrections. Large Newtonian scenes sum their forces with a Barnes–Hut tree, while grid fields and correction terms run in dedicated passes. A Boris integrator advances the particle state with adaptive substeps.

Physics

Eleven force and correction families are exposed: Newtonian gravity, gravitomagnetism (frame-dragging), Coulomb electrostatics, the magnetic Lorentz force, Yukawa interaction, Higgs field coupling, axion field coupling, cosmological expansion as a slice of an FRW universe, first post-Newtonian corrections, spin-orbit coupling, and radiation reaction. The controls enforce dependencies between coupled mechanisms.

Scalar fields

Two scalar fields — Higgs and axion — live on a PQS grid with C² interpolation. The Higgs field modulates particle mass through its local vacuum expectation value, while the axion field couples to charge. Both evolve via Störmer-Verlet integration and exert gradient forces on particles.

Presets

Nine curated figures in five chapters each show one effect. Clocks and simultaneity: the twin paradox, a relativistic wheel, and the horizon of an observer under constant acceleration. Light: aberration, a ring of lamps seen by an eye moving through it, and the apparent superluminal motion of a jet. Fields and radiation: cyclotron drift, where charges of both signs trace helices in spacetime, and bremsstrahlung, where a beam of fast electrons bent by a nucleus sheds light beamed forward. Gravity: microlensing of a backdrop star. The universe: Kibble–Zurek walls in a quenched Higgs field. The dotted numbers in each caption are its knobs: drag one to change the figure.

Frames

The view can be drawn for observers other than the lab: a moving observer at a chosen speed and direction, the zero-momentum frame, the selected body's rest frame, a frame rotating at a chosen rate, or free fall. Worldline records every body's world line and redraws the scene on the observer's surface of simultaneity, so in a boosted frame moving rulers contract, clocks synchronized in the lab disagree across the view, and a fast wheel can be followed in its own rest frame, where it is round. The observer's present is set far enough into the lab's past that everything shown has already been computed, and the Measure tab reports how far behind the lab it is. A background grid of rulers at rest in the lab contracts and shears with the observer, and tilted into spacetime the same world lines are drawn in the observer's coordinates.

Cosmological expansion

With expansion on, the periodic domain becomes a slice of an expanding Friedmann–Robertson–Walker universe. Bodies at rest keep their comoving positions while the space between them grows; peculiar momenta and photon energies fall as 1/a; scalar fields feel Hubble friction; and bound systems keep their size. The history can be imposed (de Sitter, matter, radiation, ΛCDM) or follow from the universe's own contents through the Friedmann equation, with matter, radiation and field energy each diluting at its own rate. Signals travel on light cones that are straight in comoving coordinates and conformal time, and because Maxwell's equations are conformally invariant a charge's Liénard–Wiechert field stays exact, its radiation dimmed by the redshift. The Measure tab shows the scale factor, the Hubble rate, the Hubble radius and the event horizon, and books the energy the expansion takes or gives as its own line, so the energy drift still measures numerical error. An axion field frozen by Hubble friction starts oscillating once the Hubble rate falls below its mass and then dilutes like cold matter (misalignment), and a Higgs field quenched through its symmetry-breaking transition freezes into domains, and a slower quench leaves fewer walls between them: the Kibble–Zurek mechanism (Kibble, 1976; Zurek, 1985).

Gravitational lensing

With gravity on, the rulers are a backdrop far behind the plane, seen through the bodies' masses as a thin gravitational lens. Each pixel shows the backdrop where its ray came from, β = θ − α(θ), with the deflection α summed from every body's two-dimensional logarithmic potential; a lone mass bends the rulers into an Einstein ring of radius √(4MD), where D sets how far behind the plane the backdrop lies. A backdrop star can be placed in the sheet: its images appear as arcs and rings, and its magnification, measured by shooting a ray through every cell of the view, traces a microlensing light curve as a mass drifts past it, (u² + 2)/(u√(u² + 4)) for a single lens (Paczyński, 1986). The thin-lens approximation has no black-hole shadow, so the photon-capture disk around a black hole is drawn as an imposed overlay.

Gravitomagnetism and frame-dragging

Gravitomagnetism is the gravitational analogue of the magnetic force. In Worldline, rotating or co-moving masses generate a gravitomagnetic contribution that changes nearby trajectories. Tick Gravitomagnetism under Gravity to isolate the toy model’s velocity- and spin-dependent effects.

Black hole physics

In black hole mode, particles use a Kerr-Newman-inspired effective radius characterized by mass, charge, and spin. Sub-extremal parameters use the usual outer-horizon formula; super-extremal toy inputs are clamped rather than modeled as physical naked singularities. Gravity switches to a Paczynski-Wiita-style pseudo-potential, so the effective potential steepens near the horizon and particles are swallowed once their centers cross it. Hawking radiation causes evaporation at a rate determined by the Kerr-Newman temperature — smaller black holes radiate faster, leading to runaway evaporation. Charged black holes also undergo Schwinger discharge: the intense electric field near the effective horizon tears electron-positron pairs from the vacuum, with one lepton escaping and the other falling back in. Each event reduces the black hole's charge by one quantized unit, driving it toward neutrality. Overcharged toy black holes shed same-sign leptons in quantized steps and clamp to the nearest allowed Kerr-Newman charge bound as a numerical backstop. Spinning black holes with the axion field enabled exhibit superradiance: when the horizon angular velocity exceeds the axion mass, the field extracts rotational energy and grows a scalar cloud around the black hole, spinning it down until the superradiance condition fails. All charges in the simulation are quantized in units of the boson charge, ensuring discrete conservation across emission, decay, and discharge.

Boris integrator

Worldline uses the Boris algorithm to integrate particle trajectories. It splits non-magnetic force application into half-kicks around a magnetic rotation, preserving phase-space volume for that core update. Adaptive substepping limits the timestep under high acceleration or cyclotron frequency.

Accessibility

Worldline provides keyboard shortcuts, light and dark themes, labelled controls, and numerical readouts for conserved quantities and the selected body. The canvas contains continuous motion and world lines; under a reduced-motion preference the opening scene starts paused and already tilted, and anyone can pause, single-step, or choose a quieter figure.

See also: Lumen for cellular energy simulations, Shoals for financial dynamics.

Learning outcomes

After using Worldline, students should be able to: explain how gravitational and electromagnetic forces produce qualitatively different orbital dynamics; describe the role of the Barnes-Hut algorithm in reducing force computation from O(N²) to O(N log N); identify how relativistic corrections (1PN, gravitomagnetism) modify Newtonian predictions at high velocities; distinguish between conservative and dissipative forces in phase-space evolution; describe how horizon capture, Hawking radiation, Schwinger discharge, and extremal charge shedding govern black hole evolution in the toy model; and explain how superradiance transfers angular momentum from a spinning black hole to a scalar field.

Prerequisites

Familiarity with Newton's laws of motion and basic vector calculus. No prior knowledge of relativity or particle physics is required — the presets are designed to introduce each concept incrementally.

References

J. Barnes and P. Hut, "A hierarchical O(N log N) force-calculation algorithm" (1986). J. P. Boris, "Relativistic plasma simulation — optimization of a hybrid code" (1970). L. Verlet, "Computer experiments on classical fluids" (1967). J. Schwinger, "On gauge invariance and vacuum polarization" (1951).