home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 11922 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.3 KB  |  30 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: <BxsLL1.5H5@slipknot.rain.com>
  6. Reply-To: robert@slipknot.rain.com.UUCP (Robert Reed)
  7. Organization: Home Animation Ltd.
  8. References: <7bv1svg@rpi.edu>
  9. Date: Mon, 16 Nov 1992 04:53:24 GMT
  10. Lines: 18
  11.  
  12. In article <7bv1svg@rpi.edu> bohn@rdrc.rpi.edu writes:
  13. |
  14. |Does anyone have any suggestions on how to check if a point is located
  15. |inside a triangle, accurately and fast.
  16.  
  17. The standard edge crossing test, which works for any other polygon, should work
  18. fine here.  See page 34, Foley and van Dam Computer Graphics.  In brief you
  19. count the number of polygon edges that cross a ray drawn from the point to
  20. infinity.  An odd number of crossings means the point is interior.
  21. ________________________________________________________________________________
  22. Robert Reed            Home Animation Ltd.        503-656-8414
  23. robert@slipknot.rain.com    5686 First Court, West Linn, OR 97068
  24.  
  25. It is practically impossible to teach good programming to students who've
  26. had a prior exposure to BASIC; as potential programmers they are mentally
  27. mutilated beyond hope of regeneration.
  28. --Edsgar Dijkstra
  29. ________________________________________________________________________________
  30.