Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Derivation of Refraction Formulas, Study notes of Law

We derive three alternative formulas for the refracted ray direction in ray ... where θ1 is the angle of incidence, θ2 is the angle of refraction (both ...

Typology: Study notes

2022/2023

Uploaded on 03/01/2023

shekhar_hin
shekhar_hin 🇺🇸

5

(7)

4 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Derivation of Refraction Formulas and more Study notes Law in PDF only on Docsity! Derivation of Refraction Formulas Paul S. Heckbert ABSTRACT We derive three alternative formulas for the refracted ray direction in ray tracing in order to prove their equivalence and to demonstrate the process of translating physical laws into optimized computational formulas. It is common knowledge that light rays refract when they strike an interface between two different transpar- ent media, such as air-water, air-glass, or glass-water. In 1621 Dutch mathematician Willebrord Snell dis- covered a formula quantifying this observation: the ratio of the sines of the incident and refracted angles equals the ratio of the indices of refraction of the two materials. Snell’s law is: η1 sinθ1 = η2 sinθ2 where θ1 is the angle of incidence, θ2 is the angle of refraction (both measured from the perpendicular to the interface) and η1 and η2 are the two indices of refraction on the incident and refracted sides of the inter- face, respectively. Light passing through a material slows relative to its speed in a vacuum by a factor equal to the index of refraction of that material. In fact, Snell’s law is a simple consequence of this speed variation and Fer- mat’s Principle of Least Time, which states that light takes the fastest path to get from one point to another [Feynman63]. For computation we need to recast Snell’s law in terms of (x, y, z) direction vectors. This can be done in several different ways. In the derivations below we make extensive use of angles and trigonometry, but thankfully, it is possible to eliminate all of these terms from the final formulas, so θ1 and θ2 need never be computed. As a convention, vectors are upper case and scalars are lower case. Appeared in Introduction to Ray Tracing, (Andrew Glassner, ed.), Academic Press, London, 1989, pp. 263-293. This version is missing figures. DERIVATION OF REFRACTION FORMULAS -2- Whitted’s Method We first derive the refraction formulas which appeared in Whitted’s original paper [Whitted80]. Referring to figure 1, we are given the incident ray direction I and surface normal N , and we need to calcu- late the transmitted (refracted) ray direction T ′. Whitted assumes that N is unit, but not I . First, we scale the incident ray I so that its projection on N is equal to N . Recall from geometry that the component of I parallel to N is I par = N (I ⋅ N )/(N ⋅ N ). But N is a unit vector, so I par = N (I ⋅ N ). As shown in figure 2, by similar triangles we have −I −I ′ = −I par N = I ⋅ N so I ′ = I /(−I ⋅ N ). The vector I ′ + N is thus parallel to the surface (a surface tangent), so we can write the refracted ray as T ′ = α (I ′ + N ) − N for some α . Note that this refracted ray is not necessarily a unit vector. We must now express α in terms of I , N , and I ′. As shown in figure 2, |I ′| = secθ1, |I ′ + N | = tanθ1, and α |I ′ + N | = tanθ2, so α = tanθ2 tanθ 1 = sinθ2 sinθ 1 cosθ1 cosθ 2 = (η1/η2) cosθ1 √ 1 − sin2 θ 2 = (η1/η2) cosθ1 √ 1 − η2 1/η2 2 sin2 θ 1 = 1 √ n2sec2θ1 − tan2 θ 1 where n = η2/η1, employing Snell’s law to eliminate the ratio of sines. We can now eliminate the trigono- metric terms: α = (n2|I ′|2 − |I ′ + N |2)−1/2 Total internal reflection occurs when α is imaginary (square root of a negative number). This hap- pens when rays travel from a dense material to a sparser one (n < 1) and the incident angle is above a criti- cal angle: θ1 > θ c = sin−1 n. In Whitted’s article, he used slightly different notation than the above: V for I , V ′ for I ′, P for T ′, kn for n, and k f for α . DERIVATION OF REFRACTION FORMULAS
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved