This simulator renders a pulsar as a rotating magnetic dipole using the classic lighthouse model: two antipodal emission beams are locked at a fixed inclination α from the rotation axis and sweep around once per stellar rotation period P. You register a pulse only when a beam's instantaneous angle comes close enough to your chosen observer angle — the resulting brightness is a Gaussian function of that angular separation, plotted as a running trace on the lower pulse-profile canvas. Independently of the animation, a JavaScript formula applies the magnetic-dipole spin-down law Ṗ = 32π²B²R⁶sin²α/(3c³IP) — using a fixed 10 km radius and 10³⁸ kg·m² moment of inertia — to derive the spin-down rate, characteristic age τ = P/(2Ṗ), and spin-down luminosity straight from the Period, B-field, and Inclination sliders.
A neutron star spinning with period P, casting two antipodal lighthouse beams offset by inclination angle α from its rotation axis. The lower canvas plots pulse intensity over time — a bright peak each time a beam's angle sweeps close to your chosen observer direction — alongside a live spin-down readout (Ṗ, characteristic age, spin-down luminosity, B-field) computed from the sliders.
Drag Period P (log scale, 0.001–10 s) and B field (log₁₀ Gauss, 10⁸–10¹³ G) to move between millisecond pulsars and young, strongly magnetized ones; adjust Inclination α and Observer angle to change when the beams sweep past you; Pause/Play freezes or resumes the rotation.
The Crab Pulsar, the collapsed core left by the supernova of 1054 CE, spins with a period of just 33 milliseconds and is gradually slowing down — exactly the kind of magnetic-dipole spin-down this simulator calculates — losing about 38 nanoseconds of period every single day.
Each frame the code computes the angular distance between the observer angle and each of the two antipodal beam angles (beamAngle1 = angle + α, beamAngle2 = beamAngle1 + π), takes the smaller of the two distances, and converts it into a brightness value with a Gaussian falloff: intensity = exp(-Δ²/0.05). That single number is pushed into a 300-sample ring buffer every frame and redrawn as the scrolling pulse-profile line on the lower canvas — it has nothing to do with the beam-cone gradient drawn on the main canvas, which is purely a fixed 0.15-radian rendering width.
A separate JavaScript function, not the canvas drawing code, computes Ṗ = 32π²·B²R⁶sin²α / (3c³·I·P) using the Period, B-field, and Inclination sliders together with three fixed constants baked into the code: light speed c = 3×10⁸ m/s, stellar radius R = 10⁴ m (10 km), and moment of inertia I = 10³⁸ kg·m². From that Ṗ, the characteristic age is τ = P/(2Ṗ) and the spin-down luminosity is L = 4π²I·Ṗ/P³ — both recalculated live every animation frame.
Not in this simplified 2D model. Both beam angles are computed as the star's ever-increasing rotation phase plus a constant offset (angle + α and angle + α + π), so every full rotation sweeps a beam through all 360° regardless of what α is set to — inclination only shifts when in the rotation a beam lines up with your observer angle, it never removes the intersection. A real pulsar's visibility instead depends on 3D beam-cone geometry, where some inclination/line-of-sight combinations genuinely never intersect; this simulator trades that geometric subtlety for a clear 2D lighthouse picture.
They are a stylized dipole field-line sketch, not a solved field: six Bézier curves are redrawn every frame, each anchored at the star's center and rotated by the same accumulating angle variable that drives the beams, spaced 60° apart. They illustrate the idea that the emission beams are tied to a rotating magnetic axis, but the curve shapes themselves are not derived from Maxwell's equations or any dipole field formula.
The simulator always computes τ = P/(2Ṗ) in seconds internally, converts it to years by dividing by 3.15×10⁷, and then picks whichever unit keeps the displayed number readable: gigayears if τ exceeds 10⁹ years, megayears if it exceeds 10⁶ years, and kiloyears otherwise. Dragging the B-field or Period sliders toward weaker fields or longer periods pushes τ upward and can flip the displayed unit from kyr to Myr to Gyr.