Intersection between line segment and a plane

$\begingroup$

Is there a very simple test to check if a line segment in $3D$ space cuts a plane? It is assumed we have the coordinates of the endpoints of the line segment, so $p_1,p_2$ and that we have the equation of the plane: $z = d$ (so for simplicity we're assuming it's a plane orthogonal to the z-axis).

$\endgroup$ 3

2 Answers

$\begingroup$

Represent the plane by the equation $ax+by+cz+d=0$ and plug the coordinates of the end points of the line segment into the left-hand side. If the resulting values have opposite signs, then the segment intersects the plane. If you get zero for either endpoint, then that point of course lies on the plane.

You can get the coefficients of the plane equation from a normal vector $\mathbf n$ and a point $\mathbf p$ on the plane via the point-normal form of the equation: $\mathbf n\cdot(\mathbf x-\mathbf p)=0$.

$\endgroup$ 3 $\begingroup$

So the plane is given by $ax + by + 0z -d = 0$ Using the parametric form - you must find the line equation in each direction. E.g $x=t, y=2+3t, z=t$

Then you plug that into the plain eq.: $a(t) + b(2+3t)0 + 0(t) - d = 0$. Take that value and plug it in for $t$ in the 3 equations given for the line.

Eg. Let $a=2, b=1, d=7$ (we dont care about $c$) then the plane is given by $2x +1y -4 = 0$ and plugin for line: $2(t)+1(2+3t)-7=0 => t=-1$ and solution is: $(-1,-1,-1)$

If there is one solution thats the intersection, $0t = k$ for constant $k$ there is no solution - and the line is parallel, and if $0t = 0$ all values for $t$ is a solutions for $x, y, z$ and the line is on the plain.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like