Skip to the galaxy
B.BRANDON FRANK HAN-CHWEEN HUANG← ProjectsMy account

THE INVISIBLE UNIVERSE

Galaxy sandbox

TIME

Your browser does not support the galaxy canvas. The model curve and experiment descriptions remain available below.

DRAG TO ROTATE · TAP TO PLACE A TRACER

660 stars. One fixed gravitational field. The spiral is an initial arrangement, not a self-gravitating spiral galaxy.

SIMULATED TIME0.0
MEDIAN STAR RADIUS—
CIRCULAR SPEED AT r = 10—
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.

Central mass onlyCurrent model

Illustrative circular speed versus radiusA calculated comparison of the current gravitational model and its central-mass-only component. These are not observed galaxy data.
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 →