THE INVISIBLE UNIVERSE
Galaxy sandbox
660 stars. One fixed gravitational field. The spiral is an initial arrangement, not a self-gravitating spiral galaxy.
Keyboard controls & viewing tips
Focus the galaxy, then use arrow keys to turn the view, + / − to zoom, Space to pause, L to launch, and R to restart. On touch screens, drag to rotate or tap to place a tracer. Tracers outside the current view still move; zoom out to follow them.
Take the halo away, launch a tracer, and compare the orbits. See what changes when the starting positions and velocities stay the same but the gravitational field doesn’t.
THREE WAYS IN
Orbit experiments
THE MATH BEHIND THE MOTION
Same radius.
Different speed.
These lines show the circular speeds implied by the chosen model. The stars can leave circular orbits when you change the field.
02 / LET IT COLLAPSE
Why do disks need a halo?
Here every star pulls on every other star. A thin, fast-spinning disk on its own is unstable: within a few turns it buckles into a bar. Wrap the same disk in a heavy dark halo and it keeps spinning as a disk. This was one of the first arguments for dark halos (Ostriker & Peebles, 1973).
03 / COLLIDE
What do halos do in a collision?
Fire two disk galaxies past each other. Their stars are flung out into long tidal tails. With dark-matter halos, the halos soak up the orbital energy, the galaxies fall back together and merge. Without halos, they can swing past and part again.
Cream: stars. Blue: gas, spread out to where the outer speeds were measured. Pink: anything that has drifted past the last measured radius.
04 / REAL GALAXIES
Hold a real galaxy together.
Each of these 175 galaxies has a measured rotation curve and a measured amount of stars and gas (the SPARC catalogue). The stars move as fast as the measurements say. Take the dark matter away and see whether the visible mass can hold them. Then build a halo that does.
What this model assumes
Here are the rules.
In the Halo lab, all distances, speeds, masses, and times are dimensionless. Stars are massless tracers in a fixed spherical potential. They do not pull on one another. There is no gas, cosmological expansion, collision physics, evolving halo, or disk mass model. The initial spiral is a visual arrangement; it winds up as the tracers orbit.
The purple glow illustrates the assumed halo. It is not a picture of detected dark matter. “Compare halo on / off” clones the current positions and velocities, then changes only the halo contribution in the comparison. It is a controlled illustration, not a cosmological prediction.
The force and the clock.
With softened radius s = √(x² + y² + z² + ε²), ε = 0.06, the potential is Φ = −M/(s + a) + (H/2) ln(s² + 4). Acceleration is −∇Φ. The displayed circular speed is √(−r·ar) in the midplane. The logarithmic halo extends indefinitely in this toy model, so the app does not classify stars as “escaped.”
A kick–drift–kick leapfrog advances stars in fixed 0.02-unit steps. Orbit probes use eight smaller substeps for close approaches. One real second at 1× advances one simulation unit when the browser keeps up. Slow or hidden tabs pause or slow the clock instead of making large jumps. Switching a mass component intentionally changes the energy at that instant.
Let it collapse and Collide.
These two modes are real N-body simulations: every star, and in collisions every dark-matter particle, pulls on every other through a Barnes–Hut tree code (gravity from distant groups is approximated by their total mass). They run in a background thread in your browser. Units are dimensionless: disk mass 1, disk scale length 1, G = 1. In “Let it collapse” the halos are fixed (rigid) potentials, as in Ostriker & Peebles’ original experiment; in “Collide” the halos are made of particles so they can absorb orbital energy. A few thousand particles is far below a research simulation, so details are noisy and change with the random seed; the qualitative outcomes are the classic ones.
Real galaxies.
Rotation curves, stellar and gas contributions are from SPARC (Lelli, McGaugh & Schombert 2016). Halo fits use the same method as the dark-matter working paper: a 5 km/s error floor, stellar mass-to-light 0.5 for disks and 0.7 for bulges by default, NFW and Burkert halos fitted in log density and scale radius. The star field is a set of test particles moving through the field each choice implies; it shows what the measured speeds require, not how the galaxy formed.
Even with real data, one galaxy’s rotation curve cannot decide between dark matter and modified gravity; the halo fits here assume dark matter. Read the separate research writeup → · Explore the SPARC data →