math.geom2d.polygon.convhull
Class GrahamScan2D
- java.lang.Object
-
- math.geom2d.polygon.convhull.GrahamScan2D
-
- All Implemented Interfaces:
- ConvexHull2D
public class GrahamScan2D extends java.lang.Object implements ConvexHull2D
Computation of the convex hull using Graham scan algorithm. Note that in its current implementation, this algorithms fails when some points are colinear.
-
-
Constructor Summary
Constructors Constructor and Description GrahamScan2D()Creates a new Convex hull calculator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Polygon2DconvexHull(java.util.Collection<? extends Point2D> points)Computes the convex hull of the given collection of points.
-
-
-
Method Detail
-
convexHull
public Polygon2D convexHull(java.util.Collection<? extends Point2D> points)
Description copied from interface:ConvexHull2DComputes the convex hull of the given collection of points.- Specified by:
convexHullin interfaceConvexHull2D- Parameters:
points- a set of points- Returns:
- the convex polygon corresponding to the convex hull
-
-
DMelt 3.0 © DataMelt by jWork.ORG