Graphics Reference
In-Depth Information
−
203
4
=
−
2
−
1
=
DET
36
−
242
003
2
1
36
2
3
=
1
042
−
2
−
=
−
20 3
42
1
36
1
9
r
=
−
1
=
−
20 2
−
200
4
1
36
4
9
s
=
−
22
=
−
240
r
=
1
9
and s
=
4
9
confirms that the ray intersects the triangle. The point of intersection is given by
2
3
2
i
p
=
t
+
v
=
4
j
+
−
4
j
+
2
k
4
3
i
8
3
j
4
3
k
=
4
j
+
−
+
4
3
4
3
4
P
=
3
Using Eq. (6.31), we find that
k
=
2
j
unchanged
m
=
8
i
unchanged
i
j k
n
=
2
−
42
=−
6
i
+
2
j
+
10
k
3
−
12
n
·
p
21
=
−
6
i
+
2
j
+
10
k
·
−
2
j
+
4
k
=
36
1
36
8
i
2
3
=
·
3
i
−
j
+
2
k
=
1
36
1
9
r
=
−
6
i
+
2
j
+
10
k
·
2
j
=
1
36
8
i
4
9
s
=
·
2
i
−
4
j
+
2
k
=
which are identical to the previous results.
6.13 A point inside a triangle
Having discovered how to test whether a line intersects a triangle, it is an opportune moment
to describe how to test whether a point is inside or outside a triangle. Once again, we draw
upon barycentric coordinates to reveal the solution.