Class OrthogonalEllipseProjectorNewton
Calculates the closest point on the ellipse for a given 2D point inside or outside the ellipse, using orthogonal
projection of points onto the ellipse. This is a robust algorithm based on [1]. See Sec.11.2.2 (Alg. 11.9) of [2] for
details. This version uses the Newton-method for root finding, which is quick but may fail to return a valid result
if the target point is close to the x- or y-axis. See OrthogonalEllipseProjector
for a robust solution or
ConfocalConicEllipseProjector
for an approximate but non-iterative (i.e., fast) alternative.
[1] D. Eberly: "Distance from a point to an ellipse, an ellipsoid, or a hyperellipsoid", Technical Report, Geometric
Tools, www.geometrictools.com, Redmont, WA (June 2013).
[2] W. Burger, M.J. Burge, Digital Image Processing
– An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/04/09
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
protected double[]
projectCanonical
(double[] u1) Calculates the projection point in canonical coordinates.Methods inherited from class imagingbook.common.geometry.ellipse.project.EllipseProjector
fromCanonicalFrame, fromFirstQuadrant, getDistance, getDistanceSq, project, project, toCanonicalFrame, toFirstQuadrant
-
Constructor Details
-
OrthogonalEllipseProjectorNewton
-
-
Method Details
-
projectCanonical
Description copied from class:EllipseProjector
Calculates the projection point in canonical coordinates.- Specified by:
projectCanonical
in classEllipseProjector
- Parameters:
u1
- target point in canonical coordinates.- Returns:
- the associated "contact" point on the ellipse
-
getLastIterationCount
-