What causes these rainbow effects using a polarizing filter on an airplane?

I know that light reflected from a surface at 45° is polarized and that for a similar reason skylight arriving from a direction orthogonal to the sun is polarized too.

Photographers make use of this effect to darken the sky and to filter reflections using a polarizing filter. See wikipedia for examples.

On my last intercontinental flight I had my camera equipment in the cabin and since the sky was already very dark at this altitude I was wondering how much darker it would get when using the polarizing filter.

Much to my suprise, what I observed was this (the sun is to the right):

What is going on here?

As far as I was aware a polarizing filter would only make the skylight/reflection darker. I never observed or heard that it would ever cause changes in the colors and google didn't bring anything up too.

I found this question which taught me that light from a rainbow is polarized too so a polarizing filter should also be able to filter a rainbow but it doesn't explain how it could create a rainbow.

Do you have an explanation?

Note: I observed the same thing when viewing through the polarizing filter with my eyes so this is not caused by anything which happens inside the camera.

• I suspect this may be something to do with the airplane window. – zeldredge Apr 2 '15 at 20:35

What you are seeing is stress in the window resulting in birefringence: the speed of propagation of polarized light depends on the direction of polarization.

In the setup you have, the light in the sky is partially polarized because that's how Rayleigh scattering works; this partially polarized light is transmitted through the window where it rotates (because of the birefringence) depending on the stress. The polarizer on your camera acts as the analyzer: some of the polarized light will be more at right angles while other light is more parallel to the axis of the second filter.

Now birefringence is a function of wavelength: so different colors will be rotated by different amounts, and will be more or less attenuated. And this is what gives rise to the colors.

Here is an example of an image of a plastic box with in built stresses viewed through crossed polarizers source:

UPDATE - why Rayleigh scattering leads to polarized light:

The most common example of Rayleigh scattering is the scattering of visible radiation from the Sun by neutral atoms (mostly Nitrogen and Oxygen) in the upper atmosphere. The frequency of visible radiation is much less than the typical emission frequencies of a Nitrogen or Oxygen atom (which lie in the ultra-violet band), so it is certainly the case that $\omega \ll \omega_0$. When the Sun is low in the sky, radiation from it has to traverse a comparatively long path through the atmosphere before reaching us. Under these circumstances, the scattering of direct solar light by neutral atoms in the atmosphere becomes noticeable
In Rayleigh scattering, the electrons around an atom are a driven simple harmonic oscillator: classically, you can think of it as a negative cloud that can move with respect to a positive center, and if you could displace it, it would vibrate around its equilibrium position with some frequency $\omega_0$. Now when you excite this cloud with a transverse electrical signal (EM wave like light) it will emit light mostly at right angles to the axis of excitation - in fact there's a $\left(\frac{\omega}{\omega_0}\right)^4\sin^2\theta$ term in the intensity distribution. This both tells us that the intensity of the scattered light drops quickly for longer wavelengths (the key is blue) and also that when the sun is to your right, the polarization of the sky will be in the up/down direction (perpendicular to the line from the sun to the point). This is explained in more detail at this website on polarization which is also the source of this animation that shows the direction of polarization that you expect: