Introduction

The target of this short article is to inspect if 4 points space coplanar, i.e. They lieon the same plane. Let’s consider four clues \( P_1 \), \( P_2 \), \( P_3 \)and \( P_4 \) defined in \( \mathbbR^3 \).


You are watching: How to tell if points are coplanar


See more: What Does The Name Sariah Mean, What Does Sariah Mean

This question may be reformulated as“is the allude \(P_4\) belongs come the plane defined by clues \( P_1 \), \( P_2 \) and also \( P_3 \)“.

*


Proof

First, stop compute the common vector come the airplane defined by points \( P_1 \), \( P_2 \) and also \( P_3 \):

$$ \vecn_1=\vecP_1P_2 \times \vecP_1P_3 $$

Let’s currently compute the common vector to the plane defined by point out \(P_1\), \(P_2\) and also \(P_4\):

$$ \vecn_2=\vecP_1P_2 \times \vecP_1P_4 $$

If the point out lie top top the same plane, \( \vecn_1 \) and also \( \vecn_2 \) space colinear and this have the right to be inspect thanks come the cross product with this relation:

$$ \vecn_1 \times \vecn_2 =0 $$

This have the right to be rewriten:

$$ (\vecP_1P_2 \times \vecP_1P_3) \times (\vecP_1P_3 \times \vecP_1P_4) = 0 $$

The previous equation have the right to be simplified, and also we can prove that the allude \( P_4 \) belongs come the aircraft if :

$$ \det ( \vecP_1P_2 , \: \vecP_1P_3 , \:\vecP_1P_4 ) = 0 $$

Proof (references right here or here ):

$$\beginalign(\vecu \times \vecv) \times (\vecu \times \vecw) &= ( (\vecu \times \vecv) \cdot \vecw) \vecv - ((\vecu \times \vecv) \cdot \vecv) \vecw \\(\vecu \times \vecv) \times (\vecu \times \vecw) &= ( (\vecu \times \vecv) \cdot \vecw) \vecv \\(\vecu \times \vecv) \times (\vecu \times \vecw) &= \det ( \vecu , \vecv , \vecw ) \vecv\endalign$$

Conclusion

The four points room coplanar if, and only if:

$$ \det( \: \vecP_1P_2 \: , \: \vecP_1P_3 \: , \: \vecP_1P_4 \: ) = 0 $$

Matlab resource code

close all;clear all;%% 3 points for the planP1=<0;0;0>;P2=<1;0;1>;P3=<0;1;1>;%% allude to check% BelongP4=<2;2;4>;% carry out not belong%P4=<2;2;-2>;%% screen points and planeplot3(0,0,0);hold on;grid on;axis on;patch ( , , , "red" );plot3 (P1(1), P1(2), P1(3), ".", "MarkerSize", 50);plot3 (P2(1), P2(2), P2(3), ".", "MarkerSize", 50);plot3 (P3(1), P3(2), P3(3), ".", "MarkerSize", 50);plot3 (P4(1), P4(2), P4(3), ".", "MarkerSize", 50);%% technique 1: overcome productC = overcome (cross(P2-P1, P3-P1), cross(P2-P1, P4-P1));if (any(C)) disp("P4 does no belong to the aircraft (cross product)");else disp("P4 belongs to the airplane (cross product)");end;%% technique 2: determinant D = det( );if (any(D)) disp("P4 does not belong to the plane (determinant)");else disp("P4 belongs to the airplane (determinant)");end;

*