Find Shortest Distance to Point on Ellipsoid

Click For Summary
SUMMARY

The discussion focuses on optimizing the calculation of the shortest distance from a point to the surface of an ellipsoid defined by the equation \(\frac{x^2}{a^2}+ \frac{y^2}{b^2}+ \frac{z^2}{c^2}= 1\). The user currently employs a brute force method, which is inefficient for large datasets. A more efficient approach involves using the gradient at the point \((x_0, y_0, z_0)\) and deriving a parametric line equation to find the intersection with the ellipsoid. The solution requires solving three equations to determine the intersection point and subsequently calculating the distance to the original point.

PREREQUISITES
  • Understanding of ellipsoid equations and geometry
  • Knowledge of gradient vectors in multivariable calculus
  • Familiarity with parametric equations
  • Basic skills in solving systems of equations
NEXT STEPS
  • Research methods for optimizing distance calculations in computational geometry
  • Learn about numerical methods for solving nonlinear equations
  • Explore libraries for geometric computations, such as CGAL or SciPy
  • Investigate alternative algorithms for point-to-surface distance calculations
USEFUL FOR

Mathematicians, computer scientists, and engineers working on geometric computations, optimization problems, or simulations involving ellipsoids and spatial analysis.

golmschenk
Messages
35
Reaction score
0
Right now I'm running this with a brute force program which takes points on an ellipsoid and checks the distance to the point, slightly readjusts, and keeps moving toward the minimum, but it takes far to long for the mass amount of points I want to run through the program. Is there an equation I can use to find the line?

The question more specifically is the following. I have the parameteric equation for an ellipsoid. I have the location of a point. I want to find the shortest distance from the surface of the ellipsoid to the point. The point could be on the inside or the outside of the ellipsoid. I currently have a brute force program solving this but would like an equation or something else cleaner/faster to solve this. Is there a better way I could be doing this? Thanks for your time.
 
Physics news on Phys.org


Suppose the equation of the ellipsoid is
\frac{x^2}{a^2}+ \frac{y^2}{b^2}+ \frac{z^2}{c^2}= 1

Then the gradient at the point (x_0,y_0, z_0) is
\frac{2}{a^2}x_0\vec{i}+ \frac{2}{b^2}y_0\vec{j}+ \frac{2}{c^2}y_0\vec{k}

The line through given point (u, v, w), parallel to that vector is
x= \frac{2}{a^2}x_0t+ u
y= \frac{2}{b^2}y_0t+ v
z= \frac{2}{c^2}z_0t+ w

Solve the three equations
x_0= \frac{2}{a^2}x_0t+ u
y_0= \frac{2}{b^2}y_0t+ v
z_0= \frac{2}{c^2}z_0t+ w
for x_0, y_0, and z_0 to find the point at which the shortest line (i.e. the perpendicular line) from the point intersects the ellipsoid, the find the distance between (u, v, w) and (x_0, y_0, z_0).
 


Fantastic! Thanks! I knew there had to be something like this, but wasn't finding it.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
30K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K