Projection of a Point on Conic and Distance of a Point from Conic Using Normal to the Conic
Let's consider a Conic represented by General Quadratic Equations in 2 Variables as follows
\(Ax^2 + Bxy + Cy^2 + Dx + Ey + F=0\) ...(1)
The Projection of any given Point (\(x_0,y_0\)) on the Conic given by equation (1) above can be calculated using following steps
Since the Conic is an Implicit Function of \(x\) and \(y\) (i.e. \(F(x,y)=0\)), it's Partial Derivatives with respect to Variables \(x\) and \(y\) are calculated as
Now, if the Line Connecting the Point (\(x_0,y_0\)) to any Point (\(x,y\)) on the Conic is Normal to the Conic, then the Vector given by expression (5) above is same as Vector given by equation (4) Multiplied by Scalar Constant \(t\). That is,
\(t \begin{bmatrix}2Ax + By + D \\ Bx + 2Cy + E\end{bmatrix}=\begin{bmatrix}x-x_0 \\ y-y_0\end{bmatrix}\) ...(6)
Equation (6) above can be written in form of a System of Linear Equations in \(x\) and \(y\) and represented as the following Matrix Equation
Putting the value of \(x\) and \(y\) from equations (9) and (10) above in equation (1) we get a Quartic Polynomial Equation in Variable \(t\) as follows
Solving the Quartic Polynomial Equation in Variable \(t\) as given by equation (11) above can give from 1 to 4 Real Values of \(t\).
Putting these Real Values of Variable \(t\) in equations (9) and (10) above we can get the Points of Projection of the Point (\(x_0,y_0\)) on the Conic.
Once all the Points of Projection (\(x,y\)) have been calculated, their Distances can be calculated from the Point (\(x_0,y_0\)). The one with the Minimum Value of Distance is the Distance Between the Point and the Conic.