How to do the point in polygon search?

jimmylost

Member
Joined
Sep 9, 2005
Messages
6
Programming Experience
Beginner
If I have an arraylist to store the points that draw in the panel, then I draw a polygon in the panel, how can I classify the points is inside or outside the polygon??
 
As the picture show in the attachement. Firstly, i draw the points in the panel, then i draw the polygon, then i want the VB to separate the points inside and outside the polygon.
 

Attachments

  • how.JPG
    how.JPG
    13 KB · Views: 64
I have to say that this is quite a hard one and not something that i'd be able to come up with an answer to straight away. I'll need some time to think about it. It is possible that if you are using a graphics path to place the points on the panel and another graphics path to draw the polygon, then you could use the 'Is Visible' method of the graphics path to determine the points that are contained within the polygon-graphicspath.
 
Back
Top