Theory of the Prism Spectrometer