Graphics Reference
In-Depth Information
6.9 A line intersecting an ellipsoid
The equation of an ellipsoid is
x 2
a 2 +
y 2
b 2 +
z 2
c 2 =
1
(6.18)
where a b, and c are the radii on the x-, y-, and z-axes, and the ellipsoid's center is located at
the origin, as shown in Fig. 6.12.
Y
T
b
λ v
p
t
P
a
c
X
Z
Figure 6.12.
The analysis is identical to that used for an ellipse in Section 6.4. So, to develop a general
solution for a line-ellipsoid intersection, we subject the ellipsoid to two transforms such as a
rotation R and a translation T . But we know that it is simpler to subject the intersecting line L
to the ellipsoid's inverse transforms:
L =
R 1
T 1
·
·
L
So, let's leave the ellipsoid at the origin and use an appropriately transformed line.
Figure 6.12 shows the transformed line and the untransformed ellipsoid, and from this figure
we see that the coordinates of P must satisfy Eq. (6.18). Therefore,
x v 2
a 2
y v 2
b 2
z v 2
c 2
x t +
y t +
z t +
+
+
=
1
Expanding and simplifying gives
x v 2
y v 2
z v 2
b 2 c 2 x t +
a 2 c 2 y t +
a 2 b 2 z t +
a 2 b 2 c 2
+
+
=
2 b 2 c 2 x v +
a 2 c 2 y v +
a 2 b 2 z v
+
2b 2 c 2 x t x v +
2a 2 c 2 y t y v +
2a 2 b 2 z t z v
+
b 2 c 2 x t +
a 2 c 2 y t +
a 2 b 2 z t
a 2 b 2 c 2
=
0
which is a quadratic in and solved using
± B 2
=
B
4AC
2A
 
Search WWH ::




Custom Search