Game Development Reference
In-Depth Information
revolution, or 360 o . Therefore,
n
(180 o − θ i ) = 360 o ,
i=1
n180 o n
θ i = 360 o ,
i=1
n
θ i = 360 o − n180 o ,
i=1
n
θ i = n180 o − 360 o ,
i=1
n
θ i = (n − 2)180 o .
i=1
Second, as we will show in Section 9.7.3, any convex polygon with n
vertices can be triangulated into n − 2 triangles. From classical geometry,
the sum of the interior angles of a triangle is 180 o . The sum of the interior
angles of all of the triangles is (n − 2)180 o , and we can see that this sum
must also be equal to the sum of the interior angles of the polygon itself.
Unfortunately, the sum of the interior angles is (n−2)180 o for concave as
well as convex polygons. So how does this get us any closer to determining
whether or not a polygon is convex? As shown in (see Figure 9.29), the
dot product can be used to measure the smaller of the exterior and interior
angles. The exterior angle of a polygon vertex is the compliment of the
Figure 9.29
Using the dot product to
determine whether a polygon is
convex or concave
Search WWH ::




Custom Search