comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » determining if a point is "inside" or "outside" a shape
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
determining if a point is "inside" or "outside" a shape [message #17515] Mon, 18 October 1999 00:00
dmarshall is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with license manager
Next Topic: Smith Charts

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:02:48 PDT 2025

Total time taken to generate the page: 1.99893 seconds