Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Distance of a point to an Ellipsoid

  1. Jun 18, 2012 #1
    I am working on a Matlab sim and I need to find the shorted distance of a point to an Elliposid surface.

    The point is defined as [X,Y,Z].
    Elliposid center is defined as [Xc,Yc,Zc]

    Ellipsoid is defined as
    A B C
    E F G
    H I J

    (I dont if thats sufficient information for ellipsoid, assuming its having standard equation.)
  2. jcsd
  3. Jun 18, 2012 #2


    User Avatar
    Science Advisor

    I really don't know what you mean by saying the ellipsoid is "given" by that array of letters but if you have an equation for the ellipsoid the most direct thing to do is write the equation for the line between the given point and the center of the ellipsoid. Put the parametric equations for the line, in terms of the parameter, t, say, into the equation of the ellipse to get a single quadratic equation for t. Put that t into the parametric equations to find the point. That quadratic equation will have two solutions. One gives the point on the ellipsoid closest to the given point, the other the point farthest away.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook