Graphics Reference
In-Depth Information
Y
P
t λ v
p
T
X
Z
Figure 6.11.
We use the same analysis as was used for the line-circle intersection.
The line equation is
p
=
t
+
v
where is a scalar and
1.
Using Eq. (6.16), we can state that
v
=
x P +
y P +
z P =
r 2
which is identical to
r 2
p
·
p
=
or
r 2
t
+
v
·
t
+
v
=
Expanding and simplifying gives
2 v
r 2
t
·
t
+
2 t
·
v
+
·
v
=
But as v is a unit vector, v
·
v
=
1. Therefore,
2
2
r 2
+
2 t
·
v
+
t
=
0
which is a quadratic in and solved using
± B 2
=
B
4AC
2A
where
A
=
1
B
=
2 t
·
v
C
=
t
·
t
r 2
 
Search WWH ::




Custom Search