Path: utzoo!attcan!uunet!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!pasteur!ucbvax!ucsfcgl!pixar!eliot From: eliot@pixar.UUCP (Eliot Smyrl) Newsgroups: comp.graphics Subject: Re: Point in a polygon (3D case) Message-ID: <10167@pixar.UUCP> Date: 10 Apr 90 19:08:46 GMT References: <5405@amelia.nas.nasa.gov> <2094@crash.cts.com> <10077@pixar.UUCP> Reply-To: eliot@pixar.UUCP (Eliot Smyrl) Organization: Pixar -- Marin County, California Lines: 38 X-Local-Date: 10 Apr 90 12:08:46 PDT In article <10077@pixar.UUCP> I wrote: >In article <2094@crash.cts.com> jcs@crash.cts.com (John Schultz) writes: >>[finding] the intersection of a line with a polygon. The solution I worked out >[ algorithm description ] > >This is exactly the method used by the UgRay raytracer at UC Berkeley, > >If you need to see the Tech. Report on UgRay explaining his method, I >can email you the info. There was enough interest that I will post this: to obtain this Tech. Report, send a check for $6 made out to 'UC Regents' to Publications 571 Evans Hall UC Berkeley Berkeley, CA 94720 and ask for Tech. Report # 87/360, "UgRay: An Efficient Ray-Tracing Renderer for UniGrafix", by Donald M. Marsh. (And obviously include info telling them where to mail it). If you want to call them, the person to talk to is Jean Root at (415) 643-6619. But they won't send it without a check from you. The report is well-written and is a good introduction to many of the standard problems in ray-tracing and some practical design decisions about how to deal with them. By the way, Don did in fact use the enhancement described by Mark V., in which the polygon is not rotated but projected into the coordinated plane in which it has the largest projected area (for maximum numerical accuracy). This decision requires just two comparisons to determine the largest coordinate of the polygon's plane normal, and as Mark mentioned, the projection itself is essentially a null operation - you just ignore one of the coordinates. Eliot Smyrl {ucbvax,sun}!pixar!eliot