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



ReducePolygon


Unit: SDL_math2
Class: none
Declaration: [1] function ReducePolygon (var Polygon: TPIntArray): integer;
[2] function ReducePolygon (var Polygon: TPDblArray): integer;

The function ReducePolygon removes all superfluous points of the polygon specified by the paramter Polygon. A superfluous point is one which does not change the outline of the polygon (i.e. a point which lies exactly on the line spanned by the two neigbouring vertices). The function returns the number of the remaining vertices, the variable parameter Polygon is resized accordingly.



Last Update: 2019-Mar-01