Package georegression.fitting.curves
Class ClosestPointEllipseAngle_F32
java.lang.Object
georegression.fitting.curves.ClosestPointEllipseAngle_F32
@Generated("georegression.fitting.curves.ClosestPointEllipseAngle_F64")
public class ClosestPointEllipseAngle_F32
extends Object
Finds the closest point on an ellipse to a point. Point is first put into the ellipse's
coordinate system. Then newton's method is used to find the solution. The following parameterization is used:
(x,y) = a*cos(t) + b*sin(t). For the center a point is arbitrarily selected.
-
Constructor Summary
ConstructorDescriptionClosestPointEllipseAngle_F32
(float tol, int maxIterations) Specifies convergence criteria -
Method Summary
Modifier and TypeMethodDescriptionfloat
getTheta()
void
process
(Point2D_F32 point) Find the closest point on the ellipse to the specified point.void
setEllipse
(EllipseRotated_F32 ellipse) Specifies the ellipse which point distance is going to be found from
-
Constructor Details
-
ClosestPointEllipseAngle_F32
public ClosestPointEllipseAngle_F32(float tol, int maxIterations) Specifies convergence criteria- Parameters:
tol
- Convergence tolerance. Try 1e-8maxIterations
- Maximum number of iterations. Try 100
-
-
Method Details
-
setEllipse
Specifies the ellipse which point distance is going to be found from- Parameters:
ellipse
- Ellipse description
-
process
Find the closest point on the ellipse to the specified point. To get the solution callgetClosest()
- Parameters:
point
- Point which it is being fit to
-
getClosest
-
getTheta
public float getTheta()
-