A thermodynamic analysis of the harmonic oscillator is presented. The motivation is provided by the blackbody radiation spectrum, because radiation modes take the harmonic-oscillator form. We use the behavior of a thermal harmonic oscillator system under a quasistatic change of oscillator frequency omega to show that the thermodynamic functions can all be derived from a single function of omega/T, analogous to Wien's displacement theorem., The high- and low-frequency limits yield asymptotic forms involving the temperature T alone or frequency omega alone, corresponding to energy equipartition and zero-point energy. We suggest a natural interpolation between the limiting forms. The Planck spectrum with zero-point energy corresponds to the function satisfying the Wien displacement result which, provides the smoothest possible interpolation between energy equipartition at low frequency and zero-point energy at high frequency. (C) 2003 American Association of Physics Teachers.