Home▸Thermodynamics▸Blackbody Radiation 2D — Planck's Law & Wien's Peak

🔥 Blackbody Radiation 2D — Planck's Law & Wien's Peak

2D blackbody radiation visualiser: real Planck's-law spectral curve, Wien's peak wavelength, an integrated colour swatch that shifts red to white to blue with temperature, animated photon emission, and Stefan-Boltzmann total power.

Thermodynamics2DModerate60 FPS📱 Mobile-adapted🔥 Fire⇄ 3D version
2d-blackbody-radiation ↗ Open standalone

About the 2D Blackbody Radiation Visualiser

This 2D companion plots the same Planck radiation law as the 3D version — B(λ,T) = (2hc²/λ⁵) · 1/(e^(hc/λkT) − 1) — but adds a live particle system: photons are emitted at random wavelengths drawn from the actual spectral distribution at the current temperature (inverse-CDF sampling over the discretised curve), so the mix of colours streaming across the canvas is not an artistic gradient but a direct visualisation of the probability density itself.

The colour swatch is computed the same way in aggregate: the curve is integrated across the visible band (380–750 nm), each sample weighted by an approximate wavelength-to-RGB response, and the result normalised to full brightness — so the swatch genuinely shifts from deep red, through white, to blue-white as temperature rises, exactly tracking the physics rather than a canned lookup table.

Frequently Asked Questions

How is the peak wavelength verified?

Two independent numbers are shown: Wien's law λ_max = b/T (an analytic formula), and the wavelength at which the sampled Planck curve numerically reaches its maximum value. They agree to within the resolution of the sampling grid, which is a direct on-page check that the plotted curve really is Planck's law rather than a decorative approximation.

Why do the photon colours change as temperature rises?

Each photon's colour is sampled from the true Planck probability distribution at that temperature. At low temperature the distribution is concentrated in the infrared, so photons render as encoded near-red before dropping below the visible cutoff; at high temperature the distribution shifts toward blue and ultraviolet, so more visible photons appear blue-white.

What does the total power readout mean?

It is the Stefan-Boltzmann total radiated power per unit area, P = σT⁴, integrated over all wavelengths (not just the visible band). It grows with the fourth power of temperature — doubling T multiplies the emitted power by 16.

⚙ Under the hood

A 2D blackbody-radiation visualiser with a live Planck spectral-radiance curve for adjustable temperature, Wien's-law peak wavelength verified against the curve's own numerical maximum, a colour swatch computed by integrating the spectrum against wavelength-to-RGB weighting, animated photons sampled from the real Planck distribution, and Stefan-Boltzmann total power.

blackbody radiationPlanck's lawWien's displacement lawStefan-Boltzmannthermodynamicsspectrum2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)