2

Context:

A BoundingPolytope defines a polyhedral bounding region using the intersection of four or more half spaces. The region defined by a BoundingPolytope is always convex and must be closed. Each plane in the BoundingPolytope specifies a half-space defined by the equation:

Ax + By + Cz + D <= 0

source: from a javadoc, this is for programming purpose


I need the value of A, B, C, and D for a plane as in that equation and all I have is corner points of a rectangle that lies in that plane.

1 Answers1

2

You only need $3$ of these corner points. Let these corner points be denoted $\vec{v_1}$, $\vec{v_2}$, and $\vec{v_3}$, treated as vectors from the origin to the point.

Then, the equation of your plane is: $$\left((x, y, z)-\vec{v_1}\right) \cdot \left[(\vec{v_3}-\vec{v_1})\times(\vec{v_2}-\vec{v_1})\right] = 0$$

Where $\times$ is the cross product, $\cdot$ is the dot product, and $(x, y, z)$ are the free variables describing the plane.

apnorton
  • 17,706
  • 1
    A more straighforward method is to plug the coordinates of 3 of the points in the equation of the plane. You get a homogeneous system of 3 equations for the 4 unknowns $A,B,C,D$. This you can solve by say Gaussian elimination. Or, set $D=1$ (assuming the plane doesnt pass through the origin), then you get a inhomogenous system of 3 equations with 3 unkowns, which you can solve by Gaussian elimination, or by inverting the cooeficient matrix (if you do it on a computer, like in Mathematica, there are commands that invert matrices). – Gil Bor Feb 06 '14 at 05:06
  • Thank you it solved my problem – rismanrp Feb 06 '14 at 07:15