home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 11990 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!tessi!eaglet!slipknot!robert
  3. From: robert@slipknot.rain.com (Robert Reed)
  4. Subject: Re: Point inside a triangle
  5. Message-ID: <BxvnnI.90x@slipknot.rain.com>
  6. Reply-To: robert@slipknot.rain.com.UUCP (Robert Reed)
  7. Organization: Home Animation Ltd.
  8. References: <1992Nov16.115211.23169@sophia.smith.edu> <Bxtz3s.6xA@slipknot.rain.com> <1992Nov17.132302.6345@sophia.smith.edu>
  9. Date: Tue, 17 Nov 1992 20:30:53 GMT
  10. Lines: 28
  11.  
  12. In article <1992Nov17.132302.6345@sophia.smith.edu> orourke@sophia.smith.edu (Joseph O'Rourke) writes:
  13. |
  14. |It seems from your description that points on the boundary of the triangle
  15. |T are not handled consistently by the ray algorithm.  Below, a is not in T
  16. |but b is in T.
  17. |
  18. |                   /\
  19. |                  b  \
  20. |                 /    \
  21. |                +--a---+       
  22. |
  23. |At least this seems to be what the code that Michael Goza posted does.
  24. |Am I right?
  25.  
  26. A trivial modification to the algorithm as I suggested it would correct for
  27. this.  If the boundaries of any polygon are to be considered interior, then if
  28. a bounding edge is collinear with the test point, it is sufficient to test
  29. whether the point is within the interval of the edge.  If it is not, the edge
  30. is trivially rejected as before.  If it is, the algorithm can be prematurely
  31. terminated with a TRUE result.
  32. ________________________________________________________________________________
  33. Robert Reed            Home Animation Ltd.        503-656-8414
  34. robert@slipknot.rain.com    5686 First Court, West Linn, OR 97068
  35.  
  36. My friend George is a radio announcer.
  37. When he walks under a bridge, you can't hear him talk.
  38. --Steve Wright
  39. ________________________________________________________________________________
  40.