Everything warm radiates. The colour of what it radiates depends only on its temperature — and getting that spectrum right took a constant nobody wanted.
The hole is the black body, not the box. Kirchhoff's definition is a
surface that absorbs everything falling on it. No material does that, but a
small hole in a closed cavity does: light entering is reflected around inside
until it is absorbed, and almost none finds its way out again. What leaves the
hole is the radiation field in equilibrium with the walls, and by Kirchhoff's
law — a good absorber at a wavelength is an equally good emitter at it — that
field depends on temperature alone and not on what the walls are made of.
What the traced rays are, and what they are not. They are the
absorption argument, drawn: a ray enters through the hole, reflects off the
walls where it actually meets them, and loses a fixed fraction at every
bounce, so that after half a dozen reflections almost nothing is left to come
back out. That is what makes the hole an ideal absorber, and by
Kirchhoff's law an ideal emitter. They are not a picture of the
radiation inside a cavity at equilibrium — that is a photon gas, with the
walls emitting and absorbing everywhere at once, not a few beams in flight.
The per-bounce loss drawn here is a round number chosen to make the fading
visible in six bounces, not a measured reflectivity.
Named approximations.
1. The hole is small enough that letting radiation out does not disturb
the equilibrium inside — true in the limit, never exactly.
2. The walls are opaque and all at one temperature.
3. Emissivity ε = 1. Real surfaces fall short: Lummer
and Pringsheim measured a freely radiating soot surface at about 92% of black
at 650 K, and the porcelain of their electrically heated body at about
90% at 373 K.
4. The bar is worse than either. Tungsten is not grey but
selective — its emissivity falls with wavelength, so it emits
relatively more in the visible than a black body at the same temperature.
That is exactly why it is a lamp filament, and it means the bar's colour is
not the black-body colour. Switch to the bar to see both.
The spectrum above is a sum over modes. This panel opens up one of them — the oscillators in the wall that radiate at a single chosen wavelength — and measures their mean energy, which is the quantity Planck’s law is built from.