Butterfly iridescence

thinkchronicity

Member (SA)
Anyone good on optics knowledge and maths? I'm currently slightly obsessed with how this works y'see. I know that the blue darkens as you increase the viewing angle from perpendicular. And this page purports to explain in fairly simple maths terms. I don't get how they relate the equation to the diagram though. Help!Screenshot_20241221-105703.png
 

caution

Member (SA)
The zip file they refer to at the bottom has a PDF with another diagram on page 18 that shows how the wavelength changes as you change your viewing angle, maybe that helps?
 

BoomboxLover48

Boomus Fidelis
This is the principle of diffraction grating where reflection from a thin film is typically not individual wavelengths as produced.
What is the question?
 

caution

Member (SA)
Taking another look at this and yeah, that diagram is missing some context. The thin film interference wiki uses the same diagram as above, and goes into more detail that better describes what's going on. That formula is the optical path difference, i.e. the difference between rays reflected off the front and back surface. It helps to see how they got to that point, which they show on the wiki. There's a few notation differences though:
  • Thickness: The formula above uses d for thickness but the wiki uses e
  • Path: The diagram above uses I₁ J₁ I₂ and H but the wiki uses A B C and D
  • Index of refraction: The formula above only uses n (film). The diagram above also shows n₀ (air) but don't explain why they ignore it in the equation. More on that below.
  • Wavelength integer: The formula above uses k but the wiki uses m.
On that last point, when k (m on the wiki) is an integer, it means that the difference between the reflected and refracted ray is a multiple of the ray's wavelength, and so they are in phase (constructive).

Not only does the explanation above not show why they're ignoring the index of refraction of air, they also don't show how they went from subtracting the paths of the reflected and refracted rays (I₁J₁+J₁I₂-I₁H on the diagram above, or AB+BC-AD on the wiki) to arrive at the final formula. It takes a few steps of mathing and employs Snell's law to ignore the index of refraction of air. You'll notice how they start out by using n₁ (air) and n₂ (film) but end up only using n₂.

This ties together all the things that affect phase: the film's thickness and index of refraction, and the incoming ray's angle/wavelength.
 
  • Like
Reactions: thinkchronicity

caution

Member (SA)
Also, the wiki doesn't show how they got their formulas for the paths of the reflected (AD) and refracted (AB and BC) rays, which could help understand where the formula comes from.

Segment AB forms the hypotenuse of a right triangle with two legs: d, and half the distance of AC. Let's call that halfway point between A and C the letter "E" to help the math.

For segments AB and BC, we know the angle of ACE is θ₂ and we know the length of θ₂'s adjacent leg, d. Channeling SOHCAHTOA, we know that cos(θ₂)=adjacent/hypotenuse=d/AB.
Multiply both sides by AB:
ABcos(θ₂) = d
Divide both sides by cos(θ₂) to solve for AB:
AB=d/cos(θ₂)
AB is equal to BC, and as we'll see later, AB+BC is necessary to solve the OPD equation
AB+BC=2d/cos(θ₂)
For AD, we first need to find the length of AC, which is the hypotenuse of a right triangle of which one leg is AD (the other is DC).
To find AC, we just need to find 2AE, which we can do by going back to our previous triangle for finding AB. AE is the other leg of that triangle, so we can say that tan(θ₂)=opposite/adjacent=AE/d.
Multiply both sides by d to solve for AE:
AE=dtan(θ₂)
AC=2AE=2dtan(θ₂)
Since we know that the angle of ACD is θ₁ and we now know that the hypotenuse AC is 2dtan(θ₂), we can use sin(θ₁) to determine AD:
sin(θ₁)=opposite/hypotenuse=AD/AC=AD/2dtan(θ₂)
Multiply both sides by 2dtan(θ₂) to solve for AD:
AD=2dtan(θ₂)sin(θ₁)

So that's how they got the path lengths you see right before the part that says "Using Snell's law..."
Now that we know the refracted path length AB+BC and the reflected path length AD, we can get to work on solving the OPD equation:
OPD=n₂(AB+BC)-n₁(AD)
OPD=n₂(2d/cos(θ₂))-2dtan(θ₂)n₁sin(θ₁)

Now we use Snell's law, which states that the product of the index of refraction of air (n₁) and the sine of the reflected angle, sin(θ₁), is equal to the product of the index of refraction of the film (n₂) and the sine of the refracted angle: sin(θ₂): n₁sin(θ₁)=n₂sin(θ₂).

We want to substitute n₂sin(θ₂) for n₁sin(θ₁), eliminating the need for the index of refraction of air:
OPD=n₂(2d/cos(θ₂))-2dtan(θ₂)n₂sin(θ₂)
Using the trigonometric function tan=sin/cos, we can create a common denominator:
OPD=n₂(2d/cos(θ₂))-2d(sin(θ₂)/cos(θ₂))n₂sin(θ₂)
Combine sines and combine common products:
OPD=(2n₂d/cos(θ₂))-2n₂d(sin²(θ₂)/cos(θ₂))
OPD=2n₂d((1-sin²(θ₂))/cos(θ₂))
Since we know that sin²(θ)+cos²(θ)=1, then 1-sin²(θ)=cos²(θ)
Substituting cos²(θ) for 1-sin²(θ):
OPD=2n₂d(cos²(θ)/cos(θ₂))
Remove extra cosine term and you get the final equation:
OPD=2n₂dcos(θ₂)
 
Last edited:

thinkchronicity

Member (SA)
Whoah! Flippin 'eck, thanks so much Caution.
I followed all of that...well, slightly pegged out on the very last paragraph, so tan my hide cos that's a sin, but essentially GOT IT.

The thing i completely missed initially was the distance I1 to H having to be subtracted from the increasing path length as the viewing angle got greater. So now i can intuitively see that I1H gets bigger quicker than the increase in 2x I1J1 (the refracted path). Just getting out my ruler on the diagram above shows that this is the case compared to the ray in the perpendicular position.

What started all this for me is that my brother finally returned my blue morpho butterfly after 40 years! Iridescence is nearly as cool as boomboxes. (maybe more? I really shouldn't say that here)

Happy new year!
 

thinkchronicity

Member (SA)
To round off...here's the part II of this phenomenon as applied to butterflies. So now we get red shift thrown in the mix too...Screenshot_20241231-141612.png