home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!news.kpc.com!kpc!hollasch
- From: hollasch@kpc.com (Steve Hollasch)
- Subject: Re: polyhedron/polyhedron intersection
- Message-ID: <1992Nov11.193439.20660@kpc.com>
- Summary: Trivial accept and reject tests; a defense
- Keywords: 3d graphics, intersection
- Sender: usenet@kpc.com
- Organization: Kubota Pacific Computer, Inc.
- References: <1992Nov10.192804.13981@zip.eecs.umich.edu> <1992Nov11.002123.27579@kpc.com> <1992Nov11.041237.9669@cis.uab.edu>
- Date: Wed, 11 Nov 1992 19:34:39 GMT
- Lines: 50
-
- katkere@engin.umich.edu writes:
- | I am looking for code/ideas for finding if two polyhedrons intersect.
-
- hollasch@kpc.com (Steve Hollasch) writes:
- > 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.
-
- sloan@cis.uab.edu (Kenneth Sloan) writes:
- | 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.
-
- No, the trivial reject is sufficient. It's basically a test to see if
- the bounding spheres can intersect. If the bounding spheres cannot
- intersect, then the objects themselves cannot.
-
- The trivial accept doesn't work though. Not for the reason you mention,
- but because it doesn't properly handle concave polyhedra (e.g. a cylinder
- passing through the hole of a torus). If it's easy to break the polyhedron
- into convex components, then this test should work, provided that you are
- testing for volume (not just surface) intersection. This is because an
- object wholly enclosed in another object is an intersection of volumes but
- not of surfaces.
-
- With respect to rigorous (as opposed to trivial) intersection, I really
- just sort of kind of tossed out the vertex containment test without giving
- it a great deal of thought. I now agree that edge-face intersection must
- also be considered. In order to test this, I propose we hold a contest ...
-
- B^)
-
- ______________________________________________________________________________
- Steve Hollasch Kubota Pacific Computer, Inc.
- hollasch@kpc.com Santa Clara, California
-