-
Notifications
You must be signed in to change notification settings - Fork 947
Description
In Chapter 10.2, Snell's Law
The book presents refracted ray formula as
where
for a given incoming ray
The book says
You can go ahead and prove this for yourself if you want, but we will treat it as fact and move on
Yet forgets to mention the important details: $R$ and $R'$ are unit vectors.
But to add more confusion, the book in Chapter 4.2 says
Note that I do not make the ray direction a unit length vector because I think not doing that makes for simpler and slightly faster code
In my opinion, the book at least should clarify that
Here is my proof:
Snell's law states that
Assume
Note that we can deconstruct
where
Without loss of generality, assume a unit vector
Then using trigonometry, one can see that
By Snell's law,
under suitable condition (ie. solution must exists).
Lemma: $\sin\theta \hat x = R/|R| + \cos\theta \hat n$
Consider
where
Under 'right-hand rule' one can see that
Then by Lagrange's formula
Consider
Hence
or
Now we are almost done with the proof.
Back to the proof
Again, consider
by the earlier lemma.
Since
Conclusion
Thus, final formula for arbitrary length of
which in general not equivalent to the given formula from the book.
However, if