CCL:Inside or outside of a polyhedron
There are a few quick checks:
If the x coords of all vertices are all less than or all greater than the
x coord of the pt, then the point must be outside. Similarly for y and z.
Find the center of an enclosing sphere for the polyhedron. If the point
is outside the enclosing sphere, then it is outside the polyhedron.
Find the center of a maximal enclosed sphere for the polyhedron. If the
point is inside the enclosed sphere, then it must be inside the polyhedron.
There is also the scheme of shooting out a ray from the point. If it
crosses the polyhedron surface an odd number of times, then it is inside,
if an even number of times, then it is outside.
-Todd Wipke
Molecular Engineering Laboratory
University of California
Santa Cruz, CA
wipke "at@at" chemistry.ucsc.edu