Distance from points to a hyperbola (Scripts) Publisher's description
from Hui Ma
This is an adaptation of the projecting method for ellipse introduced by D. Eberly
This is an adaptation of the projecting method for ellipse introduced by D. Eberly.
Internet publication: "Distance from a point to an ellipse in 2D" (2004) Geometric Tools, LLC, www.geometrictools.com
Book publication: "3D Game Engine Design", 2nd edition.
Morgan Kaufmann Publishers, San Francisco, CA, 2007.
(see Section 14.13.1)
Usage: [RSS, XYproj] = Residuals_hyperbola(XY,ParG)
Input: XY(n,2) is the array of coordinates of n points
ParG is a vector 5x1 of the hyperbola parameters
ParG = [Center(1:2), Axes(1:2), Angle]'
Center - the coordinates of the hyperbola's center
Axes - the axes (major, minor)
Angle - the angle of tilt of the hyperbola
Note: if hyperbola is defined by equation
Output: RSS is the Residual Sum of Squares (the sum of squares of the distances)
XYproj is the array of coordinates of projections
This algorithm is proven to converge and reaches an accuracy of 7-8 significant digit. It takes 6-7 iterations per point, on average
System Requirements:MATLAB 7.6 (R2008a)
Program Release Status: New Release
Program Install Support: Install and Uninstall