Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!teklds!zeus!bobr From: bobr@zeus.UUCP Newsgroups: comp.graphics Subject: Re: Point inside of polygon revisited... Message-ID: <1881@zeus.TEK.COM> Date: Wed, 17-Jun-87 16:54:21 EDT Article-I.D.: zeus.1881 Posted: Wed Jun 17 16:54:21 1987 Date-Received: Fri, 19-Jun-87 05:26:10 EDT References: <948@elrond.CalComp.COM> <790@thumper.UUCP> Reply-To: bobr@zeus.UUCP (Robert Reed) Organization: CAE Systems Division, Tektronix Inc., Beaverton OR Lines: 14 Steve Hawley writes: A somewhat better (but still fallable) way than arbitrarily picking a ray, is to use a vector that is defined by the given point and the midpoint of a particular edge. The only reason for this is that it will be fast, and only less fallable in the sense that you know it will definitely cross ONE edge without intersecting a point. There is no guarantee that a ray which intersects the midpoint of some edge will not also hit a vertex, even if the polygon is convex. Also, there is a slight disadvantage in using an arbitrarily sloped ray, on the order of two extra subtractions per intersection test. -- Robert Reed, Tektronix CAE Systems Division, bobr@zeus.TEK