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 aninterface between two different transparent media, such as air-water, air-glass, or glass-water. In1621 Dutch mathematician Willebrord Snell discovered 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 perpendicul...