Real astronomers never measure a galaxy's distance directly — they build a "ladder" of overlapping techniques, each calibrated against the previous rung, because no single method works at every scale. This 2D simulator draws the actual measurement geometry for each rung instead of just plotting a number:
Parallax: d(pc) = 1 / p(arcsec)
Cepheid: L = 10^(2.3 + 0.9·log10 P) L_sun (period-luminosity, Leavitt's law)
d = sqrt( L·L_sun / (4π·F) ) (inverse-square law vs. observed flux)
Redshift: z = v / c d(Mpc) = v / H0 (Hubble's law, H0 ≈ 70 km/s/Mpc)
The distance-scale slider sweeps the whole ladder at once: as the target distance crosses each rung's working range, the panel switches to the technique astronomers actually use there and drags that technique's own control (star distance, pulsation period, or recession velocity) to a representative value, redrawing that method's measurement diagram live. You can also click a method tab directly to explore it in isolation with its own slider.
- Parallax (nearest stars, out to roughly the reach of a space telescope like Gaia) — Earth's own ~2 AU orbital baseline makes a nearby star visibly shift against the distant background between January and July; the shift angle is the parallax, and distance is its reciprocal by definition of the parsec. The apparent shift drawn here is exaggerated — a real parallax angle is far too small to see at any on-screen scale.
- Cepheid variables (out to nearby galaxies) — these stars pulsate with a period that is tied directly to their true luminosity (Leavitt's law). Once the period reveals the true luminosity, comparing it to the star's measured brightness gives distance via the inverse-square law — no parallax needed.
- Redshift / Hubble's law (galaxies far beyond individual stars being resolvable) — cosmic expansion stretches a receding galaxy's light toward the red end of the spectrum in proportion to its recession velocity; Hubble's law then converts that velocity straight into a distance. It is the only rung of the three that still works at the edge of the observable universe.