Class ClosestPointEllipseAngle_F64

java.lang.Object
georegression.fitting.curves.ClosestPointEllipseAngle_F64

public class ClosestPointEllipseAngle_F64 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 Details

    • ClosestPointEllipseAngle_F64

      public ClosestPointEllipseAngle_F64(double tol, int maxIterations)
      Specifies convergence criteria
      Parameters:
      tol - Convergence tolerance. Try 1e-8
      maxIterations - Maximum number of iterations. Try 100
  • Method Details

    • setEllipse

      public void setEllipse(EllipseRotated_F64 ellipse)
      Specifies the ellipse which point distance is going to be found from
      Parameters:
      ellipse - Ellipse description
    • process

      public void process(Point2D_F64 point)
      Find the closest point on the ellipse to the specified point. To get the solution call getClosest()
      Parameters:
      point - Point which it is being fit to
    • getClosest

      public Point2D_F64 getClosest()
    • getTheta

      public double getTheta()