Sign in to follow this  

Total internal reflection

Recommended Posts

Hi, I am trying to write a raytracer with refraction/reflection, but I don't understand the problem of total internal reflection (refraction?). When does it occur? And how should I treat it? Thanks, Icebraker

Share this post

Link to post
Share on other sites
I'm not really sure if total internal reflection is different from what i know as total reflection, so the following may be wrong.

From Snell's law you have:

sin(theta_i) / sin(theta_t) = n2 / n1 = n12

where theta_i is the angle of incidence, theta_t is the angle of the transmitted ray, n1 is the real refractive index of the first material and n2 the real refractive index of the second material.

When n2 > n1, then n12 > 1 and the above equation gives:

sin(theta_t) = sin(theta_i) / n12

and there is always a real angle theta_t of refraction for every angle of incidence.

On the other hand, if n12 < 1, there is a real value for theta_t only for those incident angles theta_i for which sin(theta_i) <= n12. For larger values of the angle of incidence, total reflection takes place. In other words, no light enters the second medium and all the incident light is reflected back to the first medium.

I think, the easiest way to handle this is to remove the refraction part in these cases and calculate only the reflection.

Hope that helps.


Share this post

Link to post
Share on other sites
Give a look to this paper:
Reflections and refractions in raytracing

Shortly, there are some circumstances where when light hits a transmissive surface it is reflected instead than refracted. When this happens inside an object (i.e. the light is trying to leave the object) then Total Internal Reflection (TIR) happens: the light is reflected inside the object again. Until the light hit a transparent surface with an incident angle smaller than the critical angle, the light will not be able to leave the object. This is what happens inside optical fibers, for example.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this