Home »
Public Forums »
archive »
determining if a point is "inside" or "outside" a shape
determining if a point is "inside" or "outside" a shape [message #17515] |
Mon, 18 October 1999 00:00 |
dmarshall
Messages: 23 Registered: December 1997
|
Junior Member |
|
|
I have an interesting problem that I'm betting someone has solved already
in some form or another.
I have a set of x,y coordinates that describe a polygon, 2d in my case.
How do I tell if another x,y point is inside the boundary of my polygon?
I had an idea to take the center of my polygon and extend a line from it to
the point and beyond, seeing if I cross the perimeter an odd number of
times.
Any other suggestions?
Dave.
David Marshall Physics Dept. Trent University
dmarshall@remove.this.ivory.trentu.ca Peterborough Ontario Canada
|
|
|
Current Time: Fri Oct 10 00:44:10 PDT 2025
Total time taken to generate the page: 0.72059 seconds