Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a spherical surface defined by four points on an ellipsoid centered at (0,0,0). That is, the four points define a bounding box projected onto the ellipsoid. I have another point, P at some location (x,y,z). I need to find the minimum and maximum distances between this point and the surface.

The equation of an ellipsoid is given by:

$r^2=\frac{x^2}{A} + \frac{y^2}{B} + \frac{z^2}{C} $

Here's a terribly drawn picture that might help: enter image description here

share|cite|improve this question
up vote 0 down vote accepted

If $P$ has coordinates $(a,b,c)$ and $Q(x,y,z)$ is a point on the surface, then

$$PQ^2=(x-a)^2+ (y-b)^2+(z-c)^2 $$

The problem asks you to minimize/maximize this function, on your domain. Inside the domain, this is a standard Lagrange Multipliers problem, and then you can take care of the boundary...

share|cite|improve this answer
Could you please elaborate on some of this? I read up a bit on Lagrange Multipliers; I get that I want to constrain the solution. I don't really know how to go from four points on the surface to constraints defining the projected bounding box. – Pris Oct 25 '12 at 17:01
It is not clear to me what the projected box is, my guess/understanding is that it is the intersection between the planes passing through two points and the centre and the elipsoid...So, find the equation of the plane passing through two neighbouring corners of the box and the origin, and intersect that plane with the elipse... – N. S. Oct 25 '12 at 21:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.