| |
| | Area of Triangles and Polygons in 2D and 3D (Site not responding. Last check: 2007-11-05) |
 | | This computation gives a signed area for a polygon; and, similar to the signed area of a triangle, is positive when the vertices are oriented counterclockwise around the polygon, and negative when oriented clockwise. |
 | | Thus, the 3D planar area can be recovered by a single extra multiplication, and in total this algorithm uses n+5 multiplications, 2n+1 additions, 1 square root (when n is not a unit normal), plus a small overhead choosing the coordinate to ignore. |
 | | We represent a polygon as an array of points, but it is often more convenient to have it as a linked list of vertices (to allow insertion or deletion during drawing operations), and the polygon routines can be easily modified to scan through the linked list (see [O'Rourke, 1998] for an example of this approach). |
| geometryalgorithms.com /Archive/algorithm_0101 (2622 words) |
|