JOIN
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings View: Flat (newest first)  | Threaded  | Tree Previous Thread  |  Next Thread Forums Tutorial Discussions Geometry Concepts PointInPolygon trick
 PointInPolygon trick | Reply Hi, how about summing up the area(SUM_ALL) of all the triangles built-up by picking P(to be examined) and 2 points from given polygon set. If SUM_ALL != REAL_SUM ( actual area of polygon) then point "EXTERIOR" elseINTERIOR or BOUNDARY , which can be easily sorted out.
 Re: PointInPolygon trick (response to post by mohit_verma) | Reply according to me , This is wrong .As area of triangle is calculated by taking sum of area (taken with signs) from a point P ( which may be anywhere ) , to pi, pi+1So this area you are talking about will always be equal to actual area
 Re: PointInPolygon trick (response to post by mohit_verma) | Reply This works if the polygon is convex, but does not necessarily work otherwise.
 Re: PointInPolygon trick (response to post by mohit_verma) | Reply Another way to test whether a point is in a polygon is by looking at its winding number. It works for concave polygons too.
 Forums Tutorial Discussions Geometry Concepts PointInPolygon trick Previous Thread  |  Next Thread