
706 Chapter 15 Intersection Methods
The intersection with the bottom hemispherical cap satisfies
(x
p
, y
p
, z
p
) + t
1
(0, 0, −1) = (x
p
, y
p
, z
0
) → t
1
= z
p
− z
0
= z
p
+
e +
r
2
− x
2
p
− y
2
p
The t-values are chosen so that t
0
<t
1
.
Line Not Parallel to Capsule Axis
The parametric line in capsule coordinates is (x
p
, y
p
, z
p
) + t(x
d
, y
d
, z
d
). The inter-
section of this line with the infinite cylinder amounts to solving a quadratic equation
x
2
+ y
2
= r
2
with x =x
p
+ tx
d
and y = y
p
+ ty
d
. The equation is
a
2
t
2
+ 2a
1
t +a0 = (x
2
d
+ y
2
d
)t
2
+ 2(x
p
x
d
+ y
p
y
d
)t +(x
2
p
+ y
2
p
− r
2
) = 0
We know that a
2
> 0 since the line is not parallel to the capsule axis. For if it were the
case that a
2
=0, then