home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.tek.com!ogicse!emory!utkcs2!willis1.cis.uab.edu!sloan
- From: sloan@cis.uab.edu (Kenneth Sloan)
- Newsgroups: comp.graphics
- Subject: Re: polyhedron/polyhedron intersection
- Keywords: 3d graphics, intersection
- Message-ID: <1992Nov11.041237.9669@cis.uab.edu>
- Date: 11 Nov 92 04:12:37 GMT
- Article-I.D.: cis.1992Nov11.041237.9669
- References: <1992Nov10.192804.13981@zip.eecs.umich.edu> <1992Nov11.002123.27579@kpc.com>
- Organization: CIS, University of Alabama at Birmingham
- Lines: 40
-
- In article <1992Nov11.002123.27579@kpc.com> hollasch@kpc.com (Steve Hollasch) writes:
- >katkere@engin.umich.edu writes:
- >| I am looking for code/ideas for finding if two polyhedrons intersect.
- >| I think that polygon/polygon intersection will be used as a building
- >| block for this. Is there a better way to do this? Can the sgi
- >| rendering engine be used in any way to do this? Where can I find
- >| code for polygon/polygon intersection?
- >
- > Polyhedron intersection has both trivial accept and trivial reject
- >conditions. Let P and Q be two polyhedra, and let Pc and Qc be some
- >arbitrary "center" of the polyhedron. Then let Prmin & Qrmin be the
- >minimum distance from the center to any of the vertices of the polyhedra,
- >and Prmax & Qrmax be the maximum distances from the polyhedra centers to any
- >vertex on the corresponding polyhedra.
- >
- > Trivial Reject: |Pc - Qc| > (Prmax + Qrmax)
- >
- > Trivial Accept: |Pc - Qc| < (Prmin + Qrmin)
- >
- > If neither of these tests succeed, then you must test each vertex of P
- >to see if it lies within Q, and then you have to test each vertex of Q to
- >determine if it lies within P.
- >
- > This is not all that simple for non-simple polyhedra (e.g. a torus), but
- >you may just be dealing with simple polyhedra anyway.
-
- Even for simple polyhedra, is it not possible for two polyhedra to
- intersect even though your Trivial Reject fails, your Trivial Accept
- fails, and no vertex lies INSIDE the other polyhedron? I believe that
- you must also test all edges for intersection with all faces of the
- other polyhedron or triangulate (tetrahedralize) and test all tetrahedra
- in one polyhedron against all tetrahedra in the other.. Testing
- vertices works for polygons - but polyhedra are tougher.
-
-
- --
- Kenneth Sloan Computer and Information Sciences
- sloan@cis.uab.edu University of Alabama at Birmingham
- (205) 934-2213 115A Campbell Hall, UAB Station
- (205) 934-5473 FAX Birmingham, AL 35294-1170
-