Subject: Re: CCL:Inside or outside of a polyhedron

From: Harry Johnson <[email-masked]>
Date: Mon, 15 Apr 1996 20:02:42 -0400 (EDT)

>>>>> "Rui" == Rui Luo <[email-masked]> writes:

    Rui> Second look at the sign of the transformed coordinates of all
    Rui> vertices.  If all xi's, where i=1,...,N, have the same sign,
    Rui> the point is outside of the polyhedron. The statement holds
    Rui> for all yi's or all zi's. So if any one of the three
    Rui> conditions holds, the point will be outside. Otherwise if
    Rui> none of the conditions hold, it's inside.

Your last statement is incorrect.  Consider the 2D case:

    ----
   /   /
 +/   /
 /   /
/   /
---

If the point '+' is the origin, then all of the Xi's do not have the
same sign, nor do all of the Yi's, so none of the above conditions
hold, yet the point is still outside the polygon.  Your method is
another implementation of a bounding box.  Usually, however, it is
done by simply finding the maximum and minimum value of each
coordinate, x, y, and z, and checking to see whether the point's
coordinates lie within the extrema of the polyhedrons coordinates.  If
most of the points of interest likely lie outside the polyhedron this
is a quick initial screening method.

-Harry
______________________________________________________________________
Avant!			 Harry C. Johnson IV      [email-masked]
1101 Slater Rd		  Software Engineer       Phone: (919)941-6726
RTP, NC 27703		                            FAX: (919)941-6700
______________________________________________________________________