Game Development Reference
In-Depth Information
Figure 9.30
Triangulating a
convex polygon
by fanning
Fanning tends to create many long, thin sliver triangles, which can
be troublesome in some situations, such as computing a surface normal.
Certain consumer hardware can run into precision problems when clipping
very long edges to the view frustum. Smarter techniques exist that attempt
to minimize this problem. One idea is to triangulate as follows: Consider
that we can divide a polygon into two pieces with a diagonal between two
vertices. When this occurs, the two interior angles at the vertices of the
diagonal are each divided into two new interior angles. Thus, a total of four
new interior angles are created. To subdivide a polygon, select the diagonal
that maximizes the smallest of these four new interior angles. Divide the
polygon in two using this diagonal. Recursively apply the procedure to each
half, until only triangles remain. This algorithm results in a triangulation
with fewer slivers.
9.8
Exercises
(Answers on page 774.)
1. Given the 2D ray in parametric form
5
3
−7
5
p(t) =
+ t
,
determine the line that contains this ray, in slope-intercept form.
 
Search WWH ::




Custom Search