Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!liuida!isy!lysator.liu.se!zap From: zap@lysator.liu.se ("Zap" Andersson) Newsgroups: comp.graphics Subject: Re: Point in Polygon Problem Message-ID: <185@lysator.liu.se> Date: 27 Aug 90 20:02:07 GMT References: <2034@idunno.Princeton.EDU> <1990Aug23.174650.3592@odin.corp.sgi.com> <1990Aug23.181401.2258@jarvis.csri.toronto.edu> <1990Aug24.014840.18610@twinsun.com> Sender: news@isy.liu.se (Lord of the News) Distribution: comp.graphics Organization: Lysator Computer Club, Linkoping University, Sweden Lines: 5 Forgive me if I am but a fool, but I have created a very simple algorithm and I have never had any problems with the Ambiguos Ray Intersections. But perhaps my polygon storage methods help me? I simply swap all endpoints so each line has its 'first' end upwards and its 'last' end downwards. Then I simply EXCLUDE the 'first' point from the intersection test, but INCLUDE the 'last' i.e. point is on the line if first < point <= last .... I havn't been thinking to hard if this is a loser method but it works ok in my implementations.....??? /Zap