Quantcast Distance of a point from a line (3-D) Text - Physics Forums Library

PDA

View Full Version : Distance of a point from a line (3-D)


forty
Aug28-08, 06:00 AM
Find the distance of the point P(-1, 2, -1) from the line whose parametric equations are:

x = 2+2t
y = 2-t
z = -3-3t

***

So i worked out the vector equation of the line r = ro + vt

r = (2,2,-3) + t(2,-1,-3)

if i take the dot product of the the point P with the t component of r and equate it to 0 will the value of t give me the point on the line that is closest to P?

(-1,2,-1) . (2+2t,2-t,-3-3t) = 0

-2-2t+4-2t+3+3t = 0

t = 5

So if i use that value in r to get the point (12,-3,-18) is that point the closest point to P? in which case calculating the distance is just the distance from this point to P?

I have a feeling this is all so very very wrong >.<

Thanks :)

************EDIT

This is obviously wrong, re-working this out and will repost to see if what i come up with is even logical ;)

*************NEW try

If i put everything relative to the origin ie so the r vector becomes just t(2,-1,-3) and P becomes (-3,0,2). then take some point on the line Q = (x,y,z) that is closest to P, then QP.r should = 0 (perpendicular)

QP = OP - OQ = (-3,0,2) - (x,y,z) = (-3-x,-y,2-z)

then (-3-x,-y,2-z).(2,-1,-3) = 0

which gives -2x + y + 3z = 12

so where to from here? (if my logic is right)

HallsofIvy
Aug28-08, 06:44 AM
Find the distance of the point P(-1, 2, -1) from the line whose parametric equations are:

x = 2+2t
y = 2-t
z = -3-3t

***

So i worked out the vector equation of the line r = ro + vt

r = (2,2,-3) + t(2,-1,-3)

if i take the dot product of the the point P with the t component of r and equate it to 0 will the value of t give me the point on the line that is closest to P?
No, it won't and you have no reason to thinks so.

(-1,2,-1) . (2+2t,2-t,-3-3t) = 0

-2-2t+4-2t+3+3t = 0

t = 5

So if i use that value in r to get the point (12,-3,-18) is that point the closest point to P? in which case calculating the distance is just the distance from this point to P?

I have a feeling this is all so very very wrong >.<
It is!

Thanks :)

************EDIT

This is obviously wrong, re-working this out and will repost to see if what i come up with is even logical ;)

*************NEW try

If i put everything relative to the origin ie so the r vector becomes just t(2,-1,-3) and P becomes (-3,0,2). then take some point on the line Q = (x,y,z) that is closest to P, then QP.r should = 0 (perpendicular)

QP = OP - OQ = (-3,0,2) - (x,y,z) = (-3-x,-y,2-z)

then (-3-x,-y,2-z).(2,-1,-3) = 0

which gives -2x + y + 3z = 12
gives that as what? What is the significance of that equation? It appears to be the equation of a plane but what plane?

so where to from here? (if my logic is right)

The line from the point to the line is, as you say, perpendicular to the line but there is a whole plane of of such lines through any point on the line. You need first to find the plane perpendicular to that line, containing (-1, 2, -1).
But that's easy. As you have already determined, the direction vector of the line is <2, -1, -3>. And that vector is normal to any plane that is normal to the line. So the plane you want is the plane having normal vector <2, -1, -3> and containing point (-1, 2, -1). Of course, that is given by 2(x+1)- (y- 2)- 3(z+ 1)= 0 or 2x-y- 3z+ 1= 0.

Now, where does the given line intersect that plane? Do you see that that point is the point where the perpendicular from (-1, 2, -1) intersects the line? And so the distance between those points is the distance from the point to the line?

forty
Aug28-08, 06:55 AM
i really need pictures >.<

so what i think your saying is:

point where the plane 2x-y- 3z+ 1= 0 and the line given to me r = (2,2,-3) + t(2,-1,-3) intersect is the point that is the closest to point P. so if i find where that line intersects this plane then just calculate the distance from this point to P thats the answer?

forty
Aug28-08, 09:40 AM
worked it out to be root(19/7) using pythag theorem

thanks for your help !

HallsofIvy
Aug28-08, 09:44 AM
worked it out to be root(19/7) using pythag theorem

thanks for your help !
?? Not root(19)/7? Be careful!

forty
Aug28-08, 09:59 AM
i feel bad saying this... but are you sure?

2 of my friends both worked it out to be the root(19/7)

!_!