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

Homework Help: Vectors: Distance between 3D object and line

  1. Jan 30, 2010 #1
    1. The problem statement, all variables and given/known data
    a) Find the shortest distance between the surface A: (x+2)^2+(y-3)^2+(z-5)^2=9 and the line that passes by the points P0:(9,8,10) and P1:(16,6,14).

    b)Find the coordinates of a point on the line and a point on the surface that are nearest to each other.

    2. Relevant equations
    Surface is a sphere, centered around PC:(-2, 3, 5).

    Distance Line-Point = [tex] \frac {||P0P1 x P0PC||}{||POP1||}[/tex]

    3. The attempt at a solution
    I found the distance between the line and the center of the sphere, then substracted by the radius (3) of the sphere, to find a distance of approx. 7.355 units.

    However, how can I now find the Vector that defines the line of the shortest distance between the sphere and the line? Once I have the equation of that line, I can solve for b) by finding the intersects.

    I know I'm looking for a perpendicular line to the one that is defined by POP1, so that the scalar product must equal 0, however in 3D, there is an infinite answer of perpendicular lines.

  2. jcsd
  3. Jan 31, 2010 #2


    User Avatar
    Science Advisor

    You are looking for a line that is perpendicular to both given line and given sphere. Of course, any line perpendicular to a sphere lies along a diameter and passes through the center of the sphere.

    The line through P0:(9,8,10) and P1:(16,6,14) has "direction vector" <16- 9, 6- 8, 14- 10>= <7, -2, 4> and so has perpendicular plane [itex]7(x- x_0)- 2(y- y_0)+ 4(z- z_0)= 0[/itex] where [itex](x_0, y_0, z_0)[/itex] is any point in that plane. The plane we want must contain the center of the circle, (-2, 3, 5) and so is [itex]7(x+ 2)- 2(y- 3)+ 4(z- 5)= 0[/itex].

    Find the point where the given line crosses that plane and you will have the point where the perpendicular line touches the given line. Once you have that, find where the line through that point and (-2, 3, 5) crosses the sphere. The distance between those two points is the distance from sphere to line.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook