Graphics Reference
In-Depth Information
003
221
002
s =
=0
24
000
202
040
t =
=0
24
therefore r + s + t = 1, but both s and t are zero which confirms that the point
(0, 2, 0) is on the boundary. In fact, as both coordinates are zero it confirms
that the point is located on a vertex.
Now let's deliberately choose a point outside the triangle. For example,
P 0 (4, 0, 3) is outside the triangle, which is confirmed by the corresponding
values of r , s and t :
403
001
342
2
3
r =
=
24
043
201
032
= 3
4
s =
24
004
200
043
=1 1
3
t =
24
therefore
2
3 + 3
4 + 4
3 =1 5
r + s + t =
12
which confirms that the point (4,0,3) is outside the triangle. Note that r< 0
and t> 1, which individually confirm that the point is outside the triangle's
boundary.
11.5 Convex Hull Property
We have already shown that it is possible to determine whether a point is
inside or outside a triangle. But remember that triangles are always convex. So
can we test whether a point is inside or outside any polygon? Well the answer
is no, unless the polygon is convex. The reason for this can be understood by
considering the concave polygon shown in Figure 11.15.
 
Search WWH ::




Custom Search