Class ConvexHull2D
java.lang.Object
org.hipparchus.geometry.euclidean.twod.hull.ConvexHull2D
- All Implemented Interfaces:
Serializable
,ConvexHull<Euclidean2D,
Vector2D>
This class represents a convex hull in an two-dimensional euclidean space.
- See Also:
-
Constructor Details
-
ConvexHull2D
Simple constructor.- Parameters:
vertices
- the vertices of the convex hull, must be orderedtolerance
- tolerance below which points are considered identical- Throws:
MathIllegalArgumentException
- if the vertices do not form a convex hull
-
-
Method Details
-
getVertices
Get the vertices of the convex hull.- Specified by:
getVertices
in interfaceConvexHull<Euclidean2D,
Vector2D> - Returns:
- vertices of the convex hull
-
getLineSegments
Get the line segments of the convex hull, ordered.- Returns:
- the line segments of the convex hull
-
createRegion
Returns a new region that is enclosed by the convex hull.- Specified by:
createRegion
in interfaceConvexHull<Euclidean2D,
Vector2D> - Returns:
- the region enclosed by the convex hull
- Throws:
MathIllegalArgumentException
- if the number of vertices is not enough to build a region in the respective space
-