Determining if a point is inside two planes

552 Views Asked by At

I have two planes(Plane 1 and Plane 2) the normals ($n_1$ and $n_2$) of which are known to me. How do I determine if a point is inside the two planes?

By inside I mean the 3d space between Planes 1 and 2. In the image below: P2 is inside, while P1 is outside.

Note: Planes need not be parallel.

enter image description here

Hope its clear.

Thanks in advance!!!!

Cheers

3

There are 3 best solutions below

0
On

If you have a plane, you have its equation, meaning that the plane $1$ is defined by the equation $$ax+by+cz=d$$ for some real values $a,b,c,d$. Now, for a point $(x_0,y_0,z_0)$, it is a part of the plane if $$ax_0+by_0+cz_0=d.$$

Sam for the second plane.

0
On

Presumably the planes are parallel so that we can say without loss of generality that points on the planes are defined by:

$$\begin{align*} \Pi_1: z&=ax+by+\lambda_1 \\ \Pi_2:z&=ax+by+\lambda_2 \end{align*}$$

The point is between the planes if $$ax_0+by_0+\lambda_1<z_0<ax_0+by_0+\lambda_2.$$

EDIT: If the planes are not parallel just do a similar thing except with $a_1,a_2$ and $b_1,b_2$.

enter image description here

0
On

This is what i finally did.

  1. Calculate the plane equation for both the planes.

    Plane 1: P1 = a1*x + b1*y + c1*z + d1

    Plane 2: P2 = a2*x + b2*y + c2*z + d2

    Use the formulae in the link below to calculate the values for a1,b1,c1 and a2,b2,c2. http://keisan.casio.com/exec/system/1223596129

  2. Get the values for P1 and P2 for the concerned point x1,y1,z1 by substituting them in the equation given above.

  3. The point x1,y1,z1 is in between the planes if the values P1 and P2 satisfy the following condition.

    a. P1 < 0 and P2 > 0, or

    b. P1 > 0 and P2 < 0.

Thanks all !!!!