I am trying to understand the derivation of the Planck distribution and black body radiation. In the [Wikipedia derivation of the Planck distribution][1], the photons confined within a cubic box, are emitting from and absorbed by, and are in equilibrium with the wall of the cube. I understand the calculation presented. However, I am uncertain about the following points. 1. Is the temperature here that of the photons alone, of the matter of the wall alone or the ensemble of the photon and the matter? Most likely it is the last case. How is the temperature defined and the Boltzmann distribution derived with the photons under consideration? It is not mentioned at all in the Wikipedia derivation. 2. I suppose [Equation (1) in the aforementioned photon gas derivation][1] comes from solving a wave equation with zero boundary condition. I suppose this wave equation comes from the quantum field theory, describing the photons. Is this correct? In classic electrodynamics, the Maxwell's equation has a zero boundary condition if the wall is a perfect conductor with zero electric or magnetic field in the interior of the wall so as to perfectly reflect the electromagnetic wave. Are we to impose the same condition here with the purpose to confine the energy of the photo inside of the box? 3. Apparently the size and geometry of the box affect the final distribution. I suppose if we construct an object with many small walled cavities with fractal-like geometry, we will get a different power distribution. Is this correct? Edit: It turns out point 3. is a complicated question. The leading term of the eigenvalue distribution is proportional to volume, with some caveat on the geometric roughness of the boundary, according to [Weyl's law][2]. The proof concerning the geometric roughness of the boundary is complicated. [1]: https://en.wikipedia.org/wiki/Planck%27s_law#Photon_gas [2]: https://en.wikipedia.org/wiki/Weyl_law