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: <BxzDJC.DGB@slipknot.rain.com>
- Reply-To: robert@slipknot.rain.com.UUCP (Robert Reed)
- Organization: Home Animation Ltd.
- References: <1992Nov18.003415.9990@cis.uab.edu> <BxxoH3.BAH@slipknot.rain.com> <1992Nov19.115634.27148@sophia.smith.edu>
- Date: Thu, 19 Nov 1992 20:42:47 GMT
- Lines: 32
-
- In article <1992Nov19.115634.27148@sophia.smith.edu> orourke@sophia.smith.edu (Joseph O'Rourke) writes:
- |
- |Why do you only test on horizontal edges? The point a below is called inside
- |and the point b outside by the raw ray algorithm.
- |
- | /\
- | a b
- | / \
- | +------+
- |
- |In order to classify either both inside or both outside, it seems necessary
- |to check for collinearity with every edge. Checking for collinearity
- |requires a signed area calculation (or its equivalent).
-
- Yes, you're right. To include points that are collinear with the edges, you
- need to perform a collinearity test. However, with nonhorizontal edges and the
- ray crossing algorithm, you must compute the intersection point to determine on
- which side of the point the edge crosses. If you are concerned with including
- all the edges in the triangle, just do an equality test with the point, and
- trivially accept it if they are equal; otherwise rely on the crossing number.
- This is just what I suggested three or four messages ago.
-
- However, as someone else pointed out, if you want to place a point in a
- triangular mesh, you probably don't want boundary points to be interior to more
- than one triangle.
- ________________________________________________________________________________
- Robert Reed Home Animation Ltd. 503-656-8414
- robert@slipknot.rain.com 5686 First Court, West Linn, OR 97068
-
- Do you think that illiterate people get the full effect of alphabet soup?
- --Steve Wright
- ________________________________________________________________________________
-