Point on the line closest to another point

90 Views Asked by At

If we are given a line with scalar parametric equation $$x=x_0 + ta$$$$y=y_0+tb$$$$z=z_0+tc$$ And we want to obtain the point $Q$ of the line closest to the point $P$, then we could proceed as follows. First find the value of the parameter $t$, corresponding to point $Q$, by taking the dot product $$\bar P \cdot (x_0+ta,y_0+tb,z_0+tc)=0 $$

If $Q$ is the point closest to $P$, the line between them must be perpendicular. We obtain parameter $t$ from this equation and obtain $Q$. Is this a valid method?

2

There are 2 best solutions below

0
On BEST ANSWER

The idea is right, but that's not what you wrote in the formula. Your $Q$ is given by $(x_0+ta,y_0+tb,z_0+tc)$. Then you are interested in the line between $P$ and $Q$, which is $$PQ=(p_x,p_y,p_z)-(x_0+ta,y_0+tb,z_0+tc)$$ Also, the direction of the line is not the same as the direction of $Q$. You can choose two points on the line, and write the difference. The best ones in your case are $Q$ and $(x_0,y_0,z_0)$. So the vector for the line is $(at,bt,ct)$.

0
On

Let us write the parametric equation as

$$Q=R+tD$$ and let us minimize

$$PQ^2.$$

As

$$PQ^2=PR^2+2PR\cdot D\,t+D^2t^2$$ we know that the minimum is achieved for

$$PR\cdot D+D^2t=0,$$

which is also $$(PR+tD)\cdot D=0.$$