Check if line (with two 3D points) is lying on a plane (with 3 vertices)

130 Views Asked by At

I am having a line with start point as sp(x1,y1,z1) and end point as ep(x2, y2, z2). I need to check if the line is lying on the plane which is defined by three Cartesian coordinate points p1(x3,y3,z3), p2(x4,y4,z4) and p3(x5,y5,z5)

4

There are 4 best solutions below

2
On

To check if the line is lying the plane, you could check whether both points sp(x1,y1,z1) and ep(x2,y2,z2) are lying in the plane defined by the three points. So you need to check whether there is a solution of

$$ \vec{sp} = \vec{p_{1}}+a\cdot(\vec{p_{2}}-\vec{p_{1}})+b\cdot(\vec{p_{3}}-\vec{p_{1}})\\ \vec{ep} = \vec{p_{1}}+c\cdot(\vec{p_{2}}-\vec{p_{1}})+d\cdot(\vec{p_{3}}-\vec{p_{1}}) $$

where you have to solve for a,b,c, and d.

0
On

You may check whether the volumes of the parallelepipeds defined by $p_2-p_1$, $p_3-p_1$, $sp-p_1$ and $p_2-p_1$, $p_3-p_1$, $ep-p_1$, resp., equal zero. Use the Gram-determinant.

0
On

Both the start and end points should be in the plane contained among points $(p1,p2,p3)$.

Consider each point separably. We should have zero volume of tetrahedron, so the scalar triple product should vanish for each vector triad in the plane. A $(3\times3)$ matrix can be employed.

$$ (sp-p1) \cdot (sp-p2) \times (sp-p3) =0 $$ $$ (ep-p1) \cdot (ep-p2) \times (ep-p3) =0. $$

0
On

Pure linear algebra approach: check if all 5 points lies in the same plane. So if a system of 5 equations with 4 variables $ax+by+cz=d$ have a solution, answer is yes, otherwise no. Easier to calculate in practice for 3 variables and consider 2 possibilities for d=1 and d=0. Solvability condition of systems of linear equations of course is extensively used and well known.