0

I have a plane i reprensent by its normal $n$ and a point on it $p$. I calculate $d = -n^Tp$, and i consider "point $x$ is above the plane" if $n$ is pointing at $x$.

How to determine if a point $x$ is above or below the plane?

I thought that if $n^Tx-d>=0$ then $x$ is above the plane but that seem to not hold to any plane...

Ofek Ron
  • 281

2 Answers2

1

Let's pretend $\vec{xp}$ is a vector representing the point on the plane and $\vec{x0}$ is a vector representing the point you want to determine the location in respect to the plane.

You could simply check if $(\vec{x0}-\vec{xp})\cdot \vec{n} \geq 0$ (where $\cdot$ is dot product of vector).

If it is greater than 0, it is in the direction of the normal. If it is less than 0, the point is in the opposite direction of the vector.

1

You want $d = n^Tp$, not $d = -n^Tp$. (Or you can keep your definition of $d$, but then your check should be $n^Tx+d \ge 0$, not $n^Tx-d \ge 0$.)

TonyK
  • 64,559