convexHull2D()

Synopsis

Returns a polygon which represents the 2-dimensional convex hull of points . Optionally allows the control over the plane normal of the hull, and the tolerance for point inclusion. The points supplied need themselves not be co-planar. If the points ARE planar, the convex hull will lie in that plane.

The 2-dimensional convex hull of a set of points is the polygon which minimally encloses the set of points . Note that such a polygon may be a single point if all points are co-located, or just a pair of points if all points are colinear. Because of this, the result from this function should not be assumed to be a non-degenerate polygon suitable for use in the other polygon functions.

Syntax

convexHull2D ( points As List, _
               Optional normal As Vector = NoValue, _
               Optional tolerance As Number = 0.001 ) As List 
Argument Type Description
points List The list of points for which a convex hull is needed.
normal Vector Optional; the plane normal for the resulting polygon. If not supplied, the plane of the first 3 non-colinear points in is used. Default is NoValue
tolerance Number Optional; the tolerance for point inclusion. When building a convex hull, each point is compared to the hull constructed so far. The tolerance allows the system to accept points which are outside the polygon by less than the tolerance without creating an additional side of the hull. Default is 0.001