As it happens, I did this in a physics lab just a couple of weeks ago. The basic setup is that if you pass a collimated beam of light through a mask and then focus it with a lens, the focus will contain the 2D Fourier transform of the pattern on the mask. Adding another lens does another Fourier transform getting the original image back (but flipped). By masking appropriate sections of the Fourier transform, you can physically implement various filters — e.g. a low-pass filter becomes a mask letting through only the central portion of the Fourier transform. One I remember trying is that if you take a periodic pattern like a rectangular grid, and then pass the Fourier transform through a thin slit, you can filter out only the horizontal or only the vertical component of the grid. Pretty cool stuff.
Lenses bend EM waves proportionately to their frequency, so it naturally separates the different frequencies. Bam, you've described your EM source in the frequency domain.
> Lenses bend EM waves proportionately to their frequency
Is this exact? I was under the impression that it's a linear approximation that's generally good enough for optical component glasses over the range of visual wavelengths.
(I always found it a bit frustrating that in my Mechanical Engineering undergraduate classes, they almost always introduced linear approximations without any discussion about the conditions under which the approximations held. Sometimes, they didn't even mention that the linearization was an approximation.)