[Math] Equation for a line through a plane in homogeneous coordinates.

geometry

For calculations in 2D space, there exist a few useful equations to compute general geometry with the vector dot product . and the vector cross product x when working with homogeneous coordinates (remember even though we are working in 2D space the homogeneous representation of lines and point are 3D vectors):

1) The point where two lines cross x = l1 x l2.

2) The line between two points l = x1 x x2

3) A point lies on a line if x . l = 0

In 3D space a plane can be described by a normal vector n = [n1, n2, n3] and a point on the plane x = [x1, x2, x3] both in Euclidean coordinates.

In homogeneous coordinated the plane can be defined as p = [n1, n2, n3, -(n1*x1 + n2*x2 + n3*x3)].

Is there a short equation for finding the point where a line passes through a plane? Intuitively it feels as it should be x = l x p in homogeneous coordinates, but this computation does not exist, since there is no cross product in 4 dimensions.

At the moment I am only able to compute the intersection by defining the line with the equation l(t) = a + b(t), where a is a point on the line and b is the direction of the line in Euclidean coordinates.

For a = [a1, a2, a3], b = [b1, b2, b3] and the plane in question p = [p1, p2, p3, p4], the point of intersection x = [x1, x2, x3] can be obtained by substituting t in the line equation with t = -(p . [a1, a2, a3, 1])/(p . [b1, b2, b3, 0])

In summary, is there a elegant equation to find a point x where a line l crosses through a plane p preferably in homogeneous coordinates?

Best Answer

Definition

You are right, 3D points and planes are described with 4 homogeneous coordinates. A point at $\vec{r}$ is $P=(\vec{r};1)$ and a plane $W=(\vec{n};-d)=(\vec{n};-\vec{r}\cdot\vec{n})$ with normal $\vec{n}$ through point $\vec{r}$, or with minimum distance to origin $d$.

A line needs 6 coordinates (plücker coordinates) describing the direction and moment about the axis. A line along $\vec{e}$ through a point $\vec{r}$ has coordinates $L=[\vec{e};\vec{r}\times\vec{e}]$. Given a line $L=[\vec{l};\vec{m}]$, the direction is recovered by $\vec{e}=\frac{\vec{l}}{|\vec{l}|}$ and the position by $\vec{r} = \frac{\vec{l}\times\vec{m}}{|\vec{l}|^2}$

Now derive the point $P=(\vec{r};1)$ where line $L=[\vec{l};\vec{m}]$ meets plane $W=(\vec{w};\epsilon)$ as follows:

  • See that for the point to be on the plane you must have $\epsilon = - \vec{r}\cdot \vec{w}$
  • For the point to be on the line you must have $\vec{m} = \vec{r} \times \vec{l}$
  • Use the vector triple product to get $$ \vec{w} \times \vec{m} = \vec{w} \times \left( \vec{r} \times \vec{l} \right) = \vec{r} (\vec{w}\cdot\vec{l})-\vec{l}(\vec{w}\cdot\vec{r}) $$

$$ \vec{w} \times \vec{m} = \vec{r} (\vec{w}\cdot\vec{l}) - \vec{l}(-\epsilon) $$

$$ \vec{r} = \frac{\vec{w}\times\vec{m}-\epsilon \vec{l}}{\vec{w}\cdot\vec{l}} $$

  • Define the line-plane meet operator as

$$ \begin{aligned} P & = [W\times] L \\ \begin{pmatrix} \vec{p} \\ \delta \end{pmatrix} & = \begin{bmatrix} -\epsilon {\bf 1} & \vec{w}\times \\ \vec{w}^\top & 0 \end{bmatrix} \begin{pmatrix} \vec{l} \\ \vec{m} \end{pmatrix} \end{aligned}$$

where $\vec{w}\times = \begin{pmatrix}x\\y\\z\end{pmatrix} \times = \begin{bmatrix} 0 & -z & y \\ z & 0 & -x \\ -y & x & 0 \end{bmatrix}$ is the cross product matrix operator in 3×3 form.

  • The meet operator $[W\times]$ has dimensions 4×6 to work between lines and points.

Example

  • A plane normal to the $x$ axis located at $x=3$ has coordinates $W=(1,0,0;-3)$
  • A line through $y=2$ directed towards $\hat{i}+\hat{k}$ has coordinates $L=[1,0,1;2,0,-2]$
  • The meet operator is $$ [W\times] = \left[ \begin{array}{ccc|ccc} 3 & 0 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 & -1 \\ 0 & 0 & 3 & 0 & 1 & 0 \\ \hline 1 & 0 & 0 & 0 & 0 & 0 \end{array}\right]$$
  • The point where the line meets the plane is $P=[W\times]L$ $$P=\left[ \begin{array}{ccc|ccc} 3 & 0 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 & -1 \\ 0 & 0 & 3 & 0 & 1 & 0 \\ \hline 1 & 0 & 0 & 0 & 0 & 0 \end{array}\right] \begin{bmatrix}1\\0\\1\\ \hline 2 \\ 0 \\ -2 \end{bmatrix} =\begin{pmatrix}3\\2\\3\\ \hline 1 \end{pmatrix}$$
  • The point is located at $\vec{r} = (3,2,3)$