public class MinimumBoundingEllipse extends Object
Constructor and Description |
---|
MinimumBoundingEllipse(double[][] points,
double tolerance)
Khachiyan’s Algorithm for the Computation of Minimum Volume Enclosing
Ellipsoids.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
getBoundingCoordinates(int numPoints)
Returns a list of coordinates that can be used to render the ellipse.
|
double[] |
getCenter()
Returns the center point of the ellipse
|
double[][] |
getMatrix()
Returns a matrix containing all the information regarding the shape of the
ellipsoid.
|
public MinimumBoundingEllipse(double[][] points, double tolerance)
points
- An array of points. Each entry in the array contains an x,y
coordinate. The points must form a closed loop. Consider
pre-processing a geometry to find its convex hull, and
supply thos coordinates to compute the MBE.tolerance
- the error tolerance to use when terminating optimisation.
0.001 to 0.01 recommended.public double[] getCenter()
public double[][] getMatrix()
public double[][] getBoundingCoordinates(int numPoints)
numPoints
- The number of points used to represent the ellipse. The
higher the number the more dense the ellipse outline, the
more accurate the shape.Copyright © 2023. All rights reserved.