|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack Math2 Procedures and Functions PolygonArea|
|See also: TPDblArray, Convex2DHull, PointIsInsideConvexHull, PolygonLength, ConvertToDiffPolygon, ConvertFromDiffPolygon|
The function PolygonArea calculates the area enclosed by the polygon which is specified in the array InData. The sign of the area depends on the order of the polygon points. The area is positive if the numbering of the corners is counterclockwise. Please note that the area of twisted polygons (i.e. if any two edges of the polygon intersect) is not the sum of the sub-polygons but the difference of the areas of the sub-polygons.
Version  of PolygonArea detects any intersections of polygon edges (in the case the polygon is twisted) and returns the number of intersections in the variable parameter ISectCount. Please note that version  can be quite time-consuming if the number of vertices is high. Thus it is recommended to use version  unless you need the number of intersections of a twisted polygon.