Geometry of the plane in 3D and cross product

180 Views Asked by At

In computational geometry if three points $P_0, P_1, P_2$ are on a plane then we can tell if $P_2$ is to the left or to the right of $\overrightarrow{P_0 P_1}$ by examining the cross product $\overrightarrow{P_0P_1} \times \overrightarrow{P_0P_2}$ and particularly by examining the sign of: $$P = (x_2-x_1)(y_3-y_1) - (y_2-y_1)(x_3-x_1).$$

Question: If our plane is in 3D space and points $P_0, P_1, P_2$ have a $z$ component (they did before too, but it was zero) then how does the above expression changes? $P = $???

2

There are 2 best solutions below

1
On

In general we have

$\vec {P_0P_1}=(x_1-x_0,y_1-y_0,z_1-z_0)$

$\vec {P_0P_2}=(x_2-x_0,y_2-y_0,z_2-z_0)$

and thus

$$\vec {P_0P_1}\times\vec {P_0P_2} =\begin{vmatrix} \vec i&\vec j&\vec k\\ x_1-x_0&y_1-y_0&z_1-z_0\\ x_2-x_0&y_2-y_0&z_2-z_0 \end{vmatrix}=$$ $$=\begin{vmatrix} y_1-y_0&z_1-z_0\\ y_2-y_0&z_2-z_0 \end{vmatrix}\vec i =-\begin{vmatrix} x_1-x_0&z_1-z_0\\ x_2-x_0&z_2-z_0 \end{vmatrix}\vec j =\begin{vmatrix} x_1-x_0&y_1-y_0\\ x_2-x_0&y_2-y_0 \end{vmatrix}\vec k$$

0
On

The definition of cross product is as 'gimusi' explained and as wikipedia mentions here

The context of the question however, involved the notion of whether there is a mathematical shortcut, (a determinant of some sort) that would yield a single numeric value to determine positioning of a point relative to a vector on a plane (just like in 2D P=numeric value).

Thus far I have not been able to find such a thing, because on a 3D plane the orientation of a point relative to something else is ambiguous depending on which side of the plane we are standing on (there is no such thing as upside). Determination of orientation on 2D works only by convention because (silently) we assume the positive Z axis to be considered UP and this assumption factors-in as a positive or negative sign.

In 3D the cross product yields a vector (the determinant is no longer a single numeric value). We would need to compare that vector to a previously chosen plane normal. The direction of that vector relative to the chosen normal would give us the indication of whether a point is to the 'left' or to the 'right' of two other points.