0
\$\begingroup\$

I.e. n0 for A and n1 for B. Plane divided by plane CD.

Illustration

\$\endgroup\$
1
\$\begingroup\$

First, find the center:

p0 = (C + D) * 0.5

Now, take the relative vector from the center to the point in question:

p1 = (X - p0)

Finally, take the dot product with the normals you might want:

d0 = n0.dot(p1)
d1 = n1.dot(p1)
...
etc.

Then, check to see if its greater than zero

abovePlane0 = d0 > 0
abovePlane1 = d1 > 0

... etc.

\$\endgroup\$
  • \$\begingroup\$ Is p0 = (C + D) * 0.5 the same, as just coordinates of vector CD D-C \$\endgroup\$ – Alex.M Feb 26 '15 at 17:38
  • \$\begingroup\$ No. (C + D) * 0.5 is the midpoint between C and D. \$\endgroup\$ – mklingen Feb 26 '15 at 17:39
  • \$\begingroup\$ And X - my point of interest ? \$\endgroup\$ – Alex.M Feb 26 '15 at 17:41
  • \$\begingroup\$ X, meaning A, B, etc. the point you want to check. \$\endgroup\$ – mklingen Feb 26 '15 at 17:42
  • \$\begingroup\$ I believe finding midpoint is superfluous. Knowing just two vectors (n and CA) dot product can be found and its sign checked for being smaller or greater than zero. \$\endgroup\$ – Kromster says support Monica Feb 27 '15 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.