home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!tessi!eaglet!slipknot!robert
- From: robert@slipknot.rain.com (Robert Reed)
- Subject: Re: Point inside a triangle
- Message-ID: <BxvnnI.90x@slipknot.rain.com>
- Reply-To: robert@slipknot.rain.com.UUCP (Robert Reed)
- Organization: Home Animation Ltd.
- References: <1992Nov16.115211.23169@sophia.smith.edu> <Bxtz3s.6xA@slipknot.rain.com> <1992Nov17.132302.6345@sophia.smith.edu>
- Date: Tue, 17 Nov 1992 20:30:53 GMT
- Lines: 28
-
- In article <1992Nov17.132302.6345@sophia.smith.edu> orourke@sophia.smith.edu (Joseph O'Rourke) writes:
- |
- |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 \
- | / \
- | +--a---+
- |
- |At least this seems to be what the code that Michael Goza posted does.
- |Am I right?
-
- A trivial modification to the algorithm as I suggested it would correct for
- this. If the boundaries of any polygon are to be considered interior, then if
- a bounding edge is collinear with the test point, it is sufficient to test
- whether the point is within the interval of the edge. If it is not, the edge
- is trivially rejected as before. If it is, the algorithm can be prematurely
- terminated with a TRUE result.
- ________________________________________________________________________________
- Robert Reed Home Animation Ltd. 503-656-8414
- robert@slipknot.rain.com 5686 First Court, West Linn, OR 97068
-
- My friend George is a radio announcer.
- When he walks under a bridge, you can't hear him talk.
- --Steve Wright
- ________________________________________________________________________________
-