PDA

View Full Version : Index of refraction through multiple materials?


Hunkadoodledoo
08-14-2006, 03:08 AM
Okay. Say you have two materials with different indices of refraction that are in contact with each other (like water in a glass, or a piece of quartz on top of a piece of glass), how could you simulate the total refraction through both materials by using one IOR? I wouldn't think that you would just add them together. Do you multiply them? If anyone knows and can point me to a site, I'd appreciate it.

tmr232
08-14-2006, 09:24 AM
AFAIK, you can't do it. It won't be accurate. If a beam of light reaches in a certain angle, it will be refracted (is that the word?) in one way, and if it comes at a different angle. So AFAIK you can't just combine both values. But I am not sure 'cause I never actually learnt optics...

tmr232

Trident_2K5
08-16-2006, 01:10 PM
Use index of the farthest (from the keylight) material. I tried to write Snell's law for multiple materials, and after some math, realized that only first and last IOR are affecting final angle. That would not show intermediate refractions, of course.

n1*sin(a1)=n2*sin(a2) --> sin(a2)=n1*sin(a1)/n2
n2*sin(a2)=n3*sin(a3) --> sin(a3)=n2*sin(a2)/n3 --> sin(a3)=n2*(n1*sin(a1)/n2)/n3 --> sin(a3)=(n1*sin(a1))/n3
and so on... (n=IOR a=angle)

P.S. Naturally it's only accurate if all rays come through both materials from any direction. (like, glass sphere filled with water).

Trident_2K5
08-16-2006, 04:56 PM
On second thought result would be incorrect anyway... Although angle is dependent only on the last material, point where ray exits object is not. And you can't calculate difference using IORs alone, you need geometry data.

CGTalk Moderation
08-16-2006, 04:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.