This simulation plots a star on a 3D Hertzsprung–Russell diagram — the single most important chart in stellar astrophysics, mapping surface temperature against luminosity. Set a star's mass and watch its temperature, radius and colour follow the same scaling laws astronomers use to classify real stars, then push it off the main sequence to see where it goes next.
A field of background stars traces the main sequence using L ∝ M^3.5 and R ∝ M^0.8, then the Stefan–Boltzmann law L = 4πR²σT⁴ recovers each star's temperature. Your star (mass set by the slider) is placed on that same curve, coloured by a blackbody-style temperature ramp from hot blue-white O stars to cool red M dwarfs.
Drag Mass (M☉) to move your star along the main sequence — heavier stars sit hotter, brighter and further up-left. Press Evolve star to watch it swell into a red giant and collapse to a hot white dwarf, or Reset to return to a 1 M☉ sun-like star.
Because L ∝ M^3.5, a star only 10× more massive than the Sun shines over 3,000× brighter — and burns through its fuel so much faster that massive O and B stars live for millions of years, not the Sun's ~10 billion.
Astrophysics uses the laws of physics to explain what stars are made of, how they shine and how they die. The Hertzsprung–Russell diagram — temperature on one axis, luminosity on the other — is the map astronomers use to organise every star's life story onto one chart.
L = 4πR² · σT⁴ — the Stefan–Boltzmann law: luminosity from radius and surface temperature (σ is the Stefan–Boltzmann constant).
L ∝ M^3.5, R ∝ M^0.8 — empirical main-sequence mass–luminosity and mass–radius relations used to place each star.
The Sun's core fuses hydrogen via the proton–proton chain at over 10⁷ K, releasing about 26.7 MeV per helium nucleus formed — and it has enough fuel to keep doing that for roughly 10 billion years, most of which it spends right here on the main sequence.