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: <BxsLL1.5H5@slipknot.rain.com>
- Reply-To: robert@slipknot.rain.com.UUCP (Robert Reed)
- Organization: Home Animation Ltd.
- References: <7bv1svg@rpi.edu>
- Date: Mon, 16 Nov 1992 04:53:24 GMT
- Lines: 18
-
- In article <7bv1svg@rpi.edu> bohn@rdrc.rpi.edu writes:
- |
- |Does anyone have any suggestions on how to check if a point is located
- |inside a triangle, accurately and fast.
-
- The standard edge crossing test, which works for any other polygon, should work
- fine here. See page 34, Foley and van Dam Computer Graphics. In brief you
- count the number of polygon edges that cross a ray drawn from the point to
- infinity. An odd number of crossings means the point is interior.
- ________________________________________________________________________________
- Robert Reed Home Animation Ltd. 503-656-8414
- robert@slipknot.rain.com 5686 First Court, West Linn, OR 97068
-
- It is practically impossible to teach good programming to students who've
- had a prior exposure to BASIC; as potential programmers they are mentally
- mutilated beyond hope of regeneration.
- --Edsgar Dijkstra
- ________________________________________________________________________________
-