⭐ Stellar Evolution — From Nebula to Supernova
Explore the full life cycle of stars — from molecular cloud to main sequence, red giant, and final remnant. Adjustable stellar mass shows different evolutionary paths.
About this simulation
This simulator reconstructs a star's evolutionary path as a hand-built sequence of waypoints — temperature, luminosity, and radius at fixed points in normalized time — chosen from one of seven mass-range tracks spanning red dwarfs to O-type supergiants. As you scrub the time slider, the interp() routine linearly interpolates temperature and radius between the two neighbouring waypoints, but interpolates luminosity logarithmically (geometrically), since L swings across many orders of magnitude during a star's life. Every frame the resulting (T, L) point is plotted on a live Hertzsprung–Russell diagram, with a dashed trail marking the path travelled so far, while a mass-dependent lifetime scale (roughly ∝ M-2.5) converts slider position into an age in kyr, Myr, or Gyr.
🔬 What it Shows
Seven distinct evolutionary tracks — protostar, main sequence, sub-giant, red/AGB giant or red supergiant, then a planetary nebula, supernova, or Wolf-Rayet phase — ending in a white dwarf, neutron star, or black hole depending on initial mass. The star's marker colour follows its interpolated temperature, its glow size follows luminosity, and stage pills highlight the current named phase from the underlying track data.
🎮 How to Use It
Drag Initial mass (M☉) from 0.1 to 60 solar masses to pick a track, then move Time (age) — or press Animate — to interpolate smoothly along it. Watch the Temperature, Luminosity, Radius, Stage, and Remnant mass readouts update live, and use Reset to snap back to a newborn 1 M☉ Sun-like star.
💡 Did You Know?
The main-sequence relations coded into this simulator — luminosity scaling roughly as L ∝ M3.5 and lifetime scaling as t ∝ M-2.5 — mean a 10 M☉ star burns about 3000× brighter than the Sun yet exhausts its core hydrogen in only a few million years, while a 0.2 M☉ red dwarf will still be quietly fusing hydrogen long after the Sun has become a white dwarf.
Frequently asked questions
How does the simulation decide which evolutionary track a star follows?
The getTrack(mass) function selects one of seven hard-coded arrays of waypoints (each a temperature, luminosity, radius, stage name, and colour at a given normalized time t) based on which mass bracket the Initial mass slider falls into — for example 0.8–2.0 M☉ follows a Sun-like track through main sequence, sub-giant, red giant, AGB giant, planetary nebula, and white dwarf. Moving the time slider then interpolates continuously between the chosen track's fixed waypoints.
Why is luminosity interpolated logarithmically while temperature and radius are interpolated linearly?
Luminosity changes by many orders of magnitude over a star's life — from roughly 0.001 L☉ as a protostar to over 109 L☉ during a supernova flash — so the code interpolates it geometrically, L = L_a·(L_b/L_a)f, which keeps the transition visually smooth across those decades. Temperature and radius vary over a far narrower relative range between consecutive waypoints, so ordinary linear interpolation looks correct for them.
How does the simulator decide a star's final remnant?
Once the time slider reaches t = 1, the remnant is read directly from the initial mass: below 0.08 M☉ it labels a brown dwarf, below 8 M☉ a white dwarf of roughly 0.45×mass capped at 1.4 M☉ (the Chandrasekhar limit), below 25 M☉ a ~1.4 M☉ neutron star, and above that a black hole of roughly 0.3×mass — simplified rules of thumb that mirror the real mass thresholds separating these stellar deaths.
How does the "Time (age)" slider relate to actual years?
The slider itself only ever runs from 0 to 100 (normalized 0–1), but the simulator multiplies it by a mass-dependent lifetime estimate — roughly 106×mass-2.5 years for low-mass stars and 104×mass-2.5 years for higher-mass ones — and formats the result as kyr, Myr, or Gyr depending on magnitude. This is a coarse approximation of the real mass-luminosity-lifetime relation, not a precise stellar model, so treat the displayed age as illustrative rather than exact.
What do the shaded regions and diagonal strip on the HR diagram mean?
The translucent yellow diagonal is a reference main-sequence strip built from ten fixed temperature-luminosity anchor points (MS_REF) mapped through hrToXY(), which places hotter, more luminous stars toward the upper left and cooler, dimmer ones toward the lower right. The faint text labels (Main Sequence, Red Giants, White Dwarfs, Supergiants) simply mark the regions of the diagram real stars in those categories occupy, for orientation as your star's own dashed track crosses the diagram.
Explore the full life cycle of stars — from molecular cloud to main sequence, red giant, and final remnant. Adjustable stellar mass shows different evolutionary paths.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install