home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!sgiblab!news.kpc.com!kpc!hollasch
- From: hollasch@kpc.com (Steve Hollasch)
- Subject: Re: polyhedron/polyhedron intersection
- Message-ID: <1992Nov11.002123.27579@kpc.com>
- Summary: How I'd approach the problem...
- Keywords: 3d graphics, intersection
- Sender: usenet@kpc.com
- Organization: Kubota Pacific Computer, Inc.
- References: <1992Nov10.192804.13981@zip.eecs.umich.edu>
- Date: Wed, 11 Nov 1992 00:21:23 GMT
- Lines: 28
-
- 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.
-
- ______________________________________________________________________________
- Steve Hollasch Kubota Pacific Computer, Inc.
- hollasch@kpc.com Santa Clara, California
-