Graphics Reference
In-Depth Information
We begin by writing the three simultaneous equations defining
P
0
in matrix
form
⎡
⎤
⎡
⎤
⎡
⎤
x
0
y
0
z
0
x
1
x
2
x
3
r
s
t
⎣
⎦
=
⎣
⎦
·
⎣
⎦
y
1
y
2
y
3
z
1
z
2
z
3
therefore
r
s
t
1
=
=
=
x
0
x
2
x
3
x
1
x
0
x
3
x
1
x
2
x
0
x
1
x
2
x
3
y
0
y
2
y
3
y
1
y
0
y
3
y
1
y
2
y
0
y
1
y
2
y
3
z
0
z
2
z
3
z
1
z
0
z
3
z
1
z
2
z
0
z
1
z
2
z
3
and
x
0
x
2
x
3
y
0
y
2
y
3
z
0
z
2
z
3
r
=
DET
x
1
x
0
x
3
y
1
y
0
y
3
z
1
z
0
z
3
s
=
DET
x
1
x
2
x
0
y
1
y
2
y
0
z
1
z
2
z
0
t
=
DET
where
x
1
x
2
x
3
DET
=
y
1
y
2
y
3
z
1
z
2
z
3
Using the three points
P
1
(0
,
2
,
0)
,P
2
(0
,
0
,
4)
,P
3
(3
,
1
,
2) and arbitrary posi-
tions of
P
0
,thevaluesof
r
,
s
and
t
will identify whether
P
0
is inside or outside
triangle ∆
P
1
P
2
P
3
. For example, the point
P
0
(0
,
2
,
0) is a vertex and is classi-
fied as being on the boundary. To confirm this we calculate
r
,
s
and
t
,and
show that
r
+
s
+
t
=1:
003
201
042
DET
=
=24
003
201
042
r
=
=1
24