Graphics Reference
In-Depth Information
Figure 9.11.
The basic refraction model.
where n 1 and n 2 are the index of refraction of the first and second medium, respec-
tively. A medium's index of refraction is the ratio of the speed of light in a vacuum to
the speed of light in the medium. The index of refraction varies with wavelength. For
example, it is 1.0 if the medium is a vacuum and close to 1.0 in the case of air. For
other material it is larger than 1.0. Water has an index of refraction of 1.33; crown
glass, 1.52; and dense flint glass, 1.66.
To compute the refracted ray T , let U be the unit vector obtained by normalizing
the orthogonal projection of - L onto the plane orthogonal to N . It is easy to see that
(
)
cos
cos
q
q
NL
NL
-
1
1
1
(
(
)
)
U
=
=
cos
q
NL
-
.
1
(
)
-
sin
q
1
Since
= (
)
- (
)
T
sin
q
U
cos
q
N
,
2
2
substituting the formula for U into this expression and rearranging terms gives
(
)
T
=
n
cos
q
-
cos
q
N
-
n
L
,
12
1
2
12
where n 12 = n 1 /n 2 . But
(
)
2
2
1 2
2
1 2
(
)
cos
q
=-
1
sin
q
=-
1
n
sin
q
=-
1
n
1
-∑
N L
,
2
2
1
so that
[
]
(
)
2
1 2
(
) --
(
)
T
=
n
NL
1
n
1
-∑
NL
NL
-
n
.
(9.11)
12
12
Note that formula (9.11) has a square root in it. This can be imaginary in certain cir-
cumstances. For example, if the index of refraction of the second medium is lower
Search WWH ::




Custom Search