# How do I find the distance of a point from a plane while moving along a line?

Let's say I've got a plane P, a point A and a vector V, how do I find the distance from A to P moving along the direction to which V points? Also, once I've got that, how do I get the point of intersection between the line indicated by V and the plane?

Thanks

P.S.: of course this is in an N-dimensional case

-

I don't know about the $N$-dimensional space, but in the real world of Homogeneous coordinates and and projective geometry your quantities have coordinates

• $P = \left[\vec{n},-d\right]$
• $A = \left(\vec{a},\delta\right)$
• $V = \left(\vec{v}, 0\right)$

The parametrized point location is $A+t V$ and the distance to the plane is

$$\rho = (A+t V)^T (P\,) = (\vec{a}+t\,\vec{v})\cdot\vec{n}-\delta d$$ when $\vec{n}$ and $\vec{v}$ are unit vectors, and and $\delta=1$.

## Example

A plane along the YZ axes at a distance of 5 from the origin is

• $P =\left[\vec{n},-d\right] = [ (1,0,0), -5 ]$

A starting point $\vec{a} = (0,2,0)$ moves along the $\vec{v}=(1,-2,0)$ axis. The point is located at

• $A = \left(\vec{a} + t \vec{v},\delta\right) = \left((t,2-2\,t,0), 1\right)$

and the distance is

• $\rho = (t,2-2 t,0)\cdot(1,0,0)+(-5)*1 = t-5$

So the intersection is when $t=5$ when $Q = A + t V = \left((5,-8,0),1\right)$ or at $(5,-8,0)$ coordinates.

I suppose for the $N$-dimensional case the homogeneous coordinates are of $N+1$ size with the appropriate dot products and such defined.

There is a way to construct a homogeneous line using pluecker coordinates from the point and direction, and then directly intersect the line with the plane to yield point Q.

-
Parametrize the straight line from $A$ pointing in the direction of $v$. Plug that into the equation for the plane and solve for $t$ (parametrization variable). Then you have the point of intersection.