Radiation pattern of a classical dipole in a cavity