Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!iuvax!chiuk From: chiuk@iuvax.cs.indiana.edu (Kenneth Chiu) Newsgroups: comp.graphics Subject: Re: point in volume? Message-ID: <60728@iuvax.cs.indiana.edu> Date: 28 Sep 90 16:07:09 GMT References: <11800013@uxh.cso.uiuc.edu> Organization: Indiana University, Bloomington Lines: 20 In article <11800013@uxh.cso.uiuc.edu> thender@uxh.cso.uiuc.edu writes: >Currently we are needing a routine to find >if a point is in a volume. > >The volume in question has two restrictive constraints that >should make the job easier. > > 1. it is always 6 sided > 2. each side is made up of 4 points which may > or may not be planar. the definition of the > surface defined by the four points is also not > defined yet. Depending on the exact definition of the sides, you may find it possible to test the point against all six surface normals. If the signs are all the same, then it is inside. In the general case, it only works for convex volumes. Of course, your surface normals must all agree to either point outside or inside.