Graphics Reference
In-Depth Information
which equals R and a touch condition occurs.
The negative value of informs us that the line connecting the sphere's centre C to the point
P on the plane is against the direction of
n .
Using Eq. (6.35), we can compute the touch point P:
ˆ
6
7 i
7 k
3
7 j
2
p
=
c
+
n
ˆ
=
i
+
j
+
2 k
+
+
and
1
7 4
7 12
P
=
7
Using Eq. (6.33), we can confirm whether this point is inside the triangle:
1
7 00
7 20
12
7 03
4
pp 2 p 3
p 1 p 2 p 3 =
6
7
6 =
1
7
r
=
=
100
020
003
1
1
7
0
4
7
0
0
p 1 pp 3
p 1 p 2 p 3 =
12
7
12
7
6 =
0
3
2
7
s
=
=
10 0
020
00 3
10 7
02 7
00 1 7
p 1 p 2 p
p 1 p 2 p 3 =
24
7
6 =
4
7
t
=
=
100
020
003
Note that r
1 and they are all positive and less than 1, which means that the point
7 7 1 7 is inside the triangle, which means that the sphere touches the triangle within its
boundary.
+
s
+
t
=
 
Search WWH ::




Custom Search