mail  mail@stemandmusic.in
    
call  +91-9818088802
Donate

Projection of a Point on Quadric Surface and Distance of a Point from Quadric Surface Using Normal to the Quadric Surface

  1. Let's consider a Quadric Surface represented by General Quadratic Equations in 3 Variables as follows

    \(Ax^2 + By^2 + Cz^2 + Dxy + Exz + Fyz + Gx + Hy + Iz + K=0\)   ...(1)

    The Projection of any given Point (\(x_0,y_0,z_0\)) on the Quadric Surface given by equation (1) above can be calculated using following steps
    1. Since the Quadric Surface is an Implicit Function of \(x\), \(y\) and \(z\) (i.e. \(F(x,y,z)=0\)), it's Partial Derivatives with respect to Variables \(x\), \(y\) and \(z\) are calculated as

      \({\Large \frac{\partial F}{\partial x}} = 2Ax + Dy + Ez + G\)   ...(2)

      \({\Large \frac{\partial F}{\partial y}} = Dx + 2By + Fz + H\)   ...(3)

      \({\Large \frac{\partial F}{\partial z}} = Ex + Fy + 2Cz + I\)   ...(4)

      So, the Direction Ratio of Normal to the Quadric Surface at Any Point (\(x,y,z\)) on the Quadric Surface is given by the Vector

      \(\begin{bmatrix}{\Large \frac{\partial F}{\partial x}} \\ {\Large \frac{\partial F}{\partial y}} \\ {\Large \frac{\partial F}{\partial z}}\end{bmatrix}= \begin{bmatrix}2Ax + Dy + Ez + G \\ Dx + 2By + Fz + H \\ Ex + Fy + 2Cz + I\end{bmatrix}\)   ...(5)

      Now, the Direction Ratio of Any Line Connecting the Point (\(x_0,y_0,z_0\)) to any Point (\(x,y,z\)) on the Quadric Surface is given by the Vector

      \(\begin{bmatrix}x-x_0 \\ y-y_0 \\ z-z_0\end{bmatrix}\)   ...(6)

      Now, if the Line Connecting the Point (\(x_0,y_0,z_0\)) to any Point (\(x,y,z\)) on the Quadric Surface is Normal to the Quadric Surface, then the Vector given by expression (6) above is same as Vector given by equation (5) Multiplied by Scalar Constant \(t\). That is,

      \(t \begin{bmatrix}2Ax + Dy + Ez + G \\ Dx + 2By + Fz + H \\ Ex + Fy + 2Cz + I\end{bmatrix}=\begin{bmatrix}x-x_0 \\ y-y_0 \\ z-z_0\end{bmatrix}\)   ...(7)

      Equation (7) above can be written in form of a System of Linear Equations in \(x\), \(y\) and \(z\) and represented as the following Matrix Equation

      \(\begin{bmatrix}(2At-1) & Dt & Et \\ Dt & (2Bt-1) & Ft \\ Et & Ft & (2Ct-1)\end{bmatrix}\begin{bmatrix}x\\ y \\ z\end{bmatrix}=\begin{bmatrix}-Gt-x_0 \\ -Ht-y_0 \\ -It-z_0\end{bmatrix}\)   ...(8)
    2. Find the Value of \(x\), \(y\) and \(z\) by solving the System of Linear Equations given by Matrix Equation (8) above as follows

      \(\begin{bmatrix}x\\ y \\ z\end{bmatrix}={\begin{bmatrix}(2At-1) & Dt & Et \\ Dt & (2Bt-1) & Ft \\ Et & Ft & (2Ct-1)\end{bmatrix}}^{-1}\begin{bmatrix}-Gt-x_0 \\ -Ht-y_0 \\ -It-z_0\end{bmatrix}\)   ...(9)

      The value of \(x\), \(y\) and \(z\) get calculated as

      \(x={\Large \frac{-4BCGt^3-4BCx_0t^2+2BGt^2+2Bx_0t+2CGt^2+2Cx_0t-Gt-x_0+F^2Gt^3+F^2x_0t^2+2CDHt^3+2CDy_0t^2-DHt^2-Dy_0t-EFHt^3-EFy_0t^2-DFIt^3-DFz_0t^2+2BEIt^3+2BEz_0t^2-EIt^2-Ez_0t}{-2BE^2t^3+2DEFt^3-2CD^2t^3-2AF^2t^3+8ABCt^3+E^2t^2+D^2t^2+F^2t^2-4BCt^2-4ACt^2-4ABt^2+2Ct+2Bt+2At-1}}\)   ...(10)

      \(y={\Large \frac{2CDGt^3+2CDx_0t^2-DGt^2-Dx_0t-EFGt^3-EFx_0t^2-4ACHt^3-4ACy_0t^2+2AHt^2+2Ay_0t+2CHt^2+2Cy_0t-Ht-y_0+E^2Ht^3+E^2y_0t^2+2AFIt^3+2AFz_0t^2-FIt^2-Fz_0t-DEIt^3-DEz_0t^2}{-2BE^2t^3+2DEFt^3-2CD^2t^3-2AF^2t^3+8ABCt^3+E^2t^2+D^2t^2+F^2t^2-4BCt^2-4ACt^2-4ABt^2+2Ct+2Bt+2At-1}}\)   ...(11)

      \(z={\Large \frac{-DFGt^3-DFx_0t^2+2BEGt^3+2BEx_0t^2-EGt^2-Ex_0t+2AFHt^3+2AFy_0t^2-FHt^2-Fy_0t-DEHt^3-DEy_0t^2-4ABIt^3-4ABz_0t^2+2AIt^2+2Az_0t+2BIt^2+2Bz_0t-It-z_0+D^2It^3+D^2z_0t^2}{-2BE^2t^3+2DEFt^3-2CD^2t^3-2AF^2t^3+8ABCt^3+E^2t^2+D^2t^2+F^2t^2-4BCt^2-4ACt^2-4ABt^2+2Ct+2Bt+2At-1}}\)   ...(12)
    3. Putting the value of \(x\), \(y\) and \(z\) from equations (10), (11) and (12) above in equation (1) we get a Sextic Polynomial Equation in Variable \(t\). Solving this Sextic Polynomial Equation in Variable \(t\) can give from 1 to 6 Real Values of \(t\). Putting these Real Values of Variable \(t\) in equations (10), (11) and (12) above we can get the Points of Projection of the Point (\(x_0,y_0,z_0\)) on the Quadric Surface.
    4. Once all the Points of Projection (\(x,y,z\)) have been calculated, their Distances can be calculated from the Point (\(x_0,y_0,z_0\)). The one with the Minimum Value of Distance is the Distance Between the Point and the Quadric Surface.
    Related Calculators