|
| |||
Let be the plane defined by the points p, q,
and r. Note that the order defines the orientation of
. The function computes the orientation of points p,
q, and s in : Iff p, q, s are
collinear, COLLINEAR is returned. Iff and the plane
defined by p, q, and s have the same orientation,
POSITIVE is returned; otherwise NEGATIVE is returned.
| ||||
|
| |||
If p,q,r are collinear, then COLLINEAR is returned. If not, then p,q,r define a plane . The return value in this case is either POSITIVE or NEGATIVE, but we don't specify it explicitly. However, we guarantee that all calls to this predicate over 3 points in will return a coherent orientation if considered a 2D orientation in . |