Detect if a Point is visible inside irregular polygon in .NET Compact Framework on Windows Mobile 6
Hi there. I have moved my blog to www.binarychef.com. You can view this specific blog post over here.
Hi there. I have moved my blog to www.binarychef.com. You can view this specific blog post over here.
[…] my previous post I described how to determine whether a point is inside an irregular polygon. In this post […]
Alternative technique:
– Draw a line from the user’s point to a random far distant point.
– Find every intersection between the new line and the boundary of the polygon.
If there is an odd number of intersections, then the point is inside. An even number of intersections, then the point is outside.
This technique allows for complex re-entrant shaped polygons and circles.
I’m not sure whether it can be applied in situation, just mentioned for interest.
Regards, Dale
Paul Kolozsvari is a software developer currently employed at Psion Africa. His blog consists of posts on software development and useful tools/applications he comes across.
2 Comments
Jump to comment form | comment rss [?] | trackback uri [?]