home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!stanford.edu!eos!aio!norm!goza
- From: goza@norm.JSC.NASA.GOV (Mike Goza)
- Subject: Re: Point inside a triangle
- Message-ID: <1992Nov17.152242.27794@aio.jsc.nasa.gov>
- Sender: goza@norm (Mike Goza)
- Organization: IGOAL
- References: <BxsLL1.5H5@slipknot.rain.com> <1992Nov16.115211.23169@sophia.smith.edu> <Bxtz3s.6xA@slipknot.rain.com> <1992Nov17.132302.6345@sophia.smith.edu>
- Date: Tue, 17 Nov 1992 15:22:42 GMT
- Lines: 24
-
- >It seems from your description that points on the boundary of the triangle
- >T are not handled consistently by the ray algorithm. Below, a is not in T
- >but b is in T.
- >
- > /\
- > b c
- > / \
- > +--a---+
- >
- >At least this seems to be what the code that Michael Goza posted does.
- >Am I right?
-
-
- The above analysis is correct for the algorithm that I posted. For that matter a point c on the
- other edge would be considered outside as well. The algorithm will make mistakes on points that
- are exactly on the edge, but then how many times do computers calculate points that are EXACTLY
- on the edge of a polygon. For my purposes, the small error is fine, but your application may be
- different. I have found it to be quite satisfactory and very fast. Everything in computers is a
- compromise and the only exact thing about math is the theory. Actual aplication is something
- completely different.
-
- Hope this clears up things,
- Mike Goza
- goza@cheer.jsc.nasa.gov
-