home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!berlin
- From: berlin@is.morgan.com (Alexander Berlin)
- Subject: Re: Deciding point-in-polygon: A new idea.
- Message-ID: <1992Aug31.092205@is.morgan.com>
- Sender: news@is.morgan.com
- Nntp-Posting-Host: chico
- Organization: Morgan Stanley - IS
- References: <schnitzi.715219193@eola.cs.ucf.edu>
- Distribution: comp
- Date: Mon, 31 Aug 1992 13:22:05 GMT
- Lines: 39
-
- In article <schnitzi.715219193@eola.cs.ucf.edu>, schnitzi@cs.ucf.edu (Mark Schnitzius) writes:
- |> How about this:
- |>
- |> Compute the area of the polygon in question (this is a well
- |> known and simple procedure). Now consider the polygon formed
- |> by adding the point in question as another vertice, anywhere
- |> in the original list of vertices. If the area of this new
- |> polygon is greater than the original, the point is outside
- |> the polygon. If less, it is inside.
- |>
- |> My question: will it work?
- |>
-
- No, it won't.
-
- A B
- +----------------+ See what happens when you go from ABCD to
- | | ABXCD.
- | |
- X | |
- . | |
- | |
- | |
- | |
- | |
- | |
- +----------------+
- D C
-
-
-
- |>
- |> Mark Schnitzius
- |> schnitzi@eola.csu.ucf.edu
- |> Univ. of Central Florida
-
- ---
- Alex Berlin
- berlin@is.morgan.com
-