Graphics Reference
In-Depth Information
Let the reflecting line be defined as
p
=
t
+
v
(5.1)
where is a scalar, and the line's normal vector is
v
n
=
The incoming ray passes through R with direction v in , and the reflected outgoing ray originates
at P with direction v out .
From Fig. 5.1 we observe that
=
v in +
w
n
(5.2)
and
w
=
v out
n
(5.3)
where is a scalar.
Equating (5.2) and (5.3) gives
v in +
n
=
v out
n
and
v out =
v in +
2 n
(5.4)
We now need to find .
We multiply Eq. (5.4) throughout by n and obtain
n
·
v out =
n
·
v in +
2 n
·
n
but
n
·
v out =
n
·
v in
=−
n
·
v in
Therefore,
n
·
v in =
n
·
v in +
2 n
·
n
and
n
·
v in
=−
2
(5.5)
n
Substituting Eq. (5.5) in Eq. (5.4) gives
2 n
n
·
v in
v out =
v in
(5.6)
2
n
 
Search WWH ::




Custom Search