Formation of a spectrum with a prism