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....


Declaration:function PolygonArea (InData: TPDblArray): double;

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.

Hint: Please note that the points of the polygon have to be stored in the same order as they would be used when drawing the polygon.

Example: This method is used in the following example program (see for downloading the code): convexhull

Last Update: 2016-Jun-26