Distance from points to a parabola

Versión 1.0.0.0 (2,23 KB) por Hui Ma
Projects a set of points onto a parabola and returns the nearest points on the parabola
519 descargas
Actualizado 24 may 2010

Ver licencia

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_parabola(XY,ParG)
Input: XY(n,2) is the array of coordinates of n points
x(i)=XY(i,1), y(i)=XY(i,2)
ParG is a vector 4x1 of the ellipse parameters
ParG = [Vertex(1:2), p, Angle]'
Vertex - the coordinates of the parabola's vertex
p - distance from the focus to the directrix
Angle - the angle of tilt of the parabola

Output: RSS is the Residual Sum of Squares (the sum of squares of the distances)
XYproj is the array of coordinates of projections

The algorithm is proven to converge and reaches an accuracy of 8-9 significant digits. It takes 5-6 iterations per point, on average.

Citar como

Hui Ma (2024). Distance from points to a parabola (https://www.mathworks.com/matlabcentral/fileexchange/27710-distance-from-points-to-a-parabola), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2008a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Linear Algebra en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0