java.lang.Object
org.jhotdraw8.geom.ConvexHull
Provides utility methods for computing the convex hull from a set of points.
- Author:
- Werner Randelshofer
-
Method Summary
Modifier and TypeMethodDescriptionstatic Point2D.Double[]getConvexHull2D(Point2D.Double[] points) Computes the convex hull from a set of points.static List<Point2D.Double> getConvexHull2D(List<Point2D.Double> points) Computes the convex hull from a set of points.static booleanisRightTurn2D(Point2D.Double p1, Point2D.Double p2, Point2D.Double p3) Returns true, if the three given points make a right turn.
-
Method Details
-
getConvexHull2D
Computes the convex hull from a set of points.- Parameters:
points- the points- Returns:
- convex hull of the points
-
getConvexHull2D
Computes the convex hull from a set of points.- Parameters:
points- the points- Returns:
- convex hull of the points
-
isRightTurn2D
Returns true, if the three given points make a right turn.- Parameters:
p1- first pointp2- second pointp3- third point- Returns:
- true if right turn.
-