Easiest way to do it is cast a ray from that point and count how many times it crosses the boundary. If it is odd, the point is inside, even the point is outside.
Wiki: http://en.wikipedia.org/wiki/Point_in_polygon
Note that this only works for manifold shapes.
More Related Contents:
- How to determine if a point is in a 2D triangle? [closed]
- Circle line-segment collision detection algorithm?
- Algorithm to detect intersection of two rectangles?
- How to calculate an angle from three points? [closed]
- Sort points in clockwise order?
- How do you calculate the average of a set of circular data? [closed]
- How to compare two shapes?
- Puzzle: Find largest rectangle (maximal rectangle problem)
- Calculate largest inscribed rectangle in a rotated rectangle
- Two Rectangles intersection
- Circle-circle intersection points
- Determining if two line segments intersect? [duplicate]
- Calculating the position of points in a circle
- How do you find a point at a given perpendicular distance from a line?
- How can I perform Collision Detection on rotated rectangles? [closed]
- Location of highest density on a sphere
- An algorithm for inflating/deflating (offsetting, buffering) polygons
- Algorithm to find Largest prime factor of a number
- How to make rounded percentages add up to 100%
- Writing your own square root function
- How do I efficiently determine if a polygon is convex, non-convex or complex?
- Finding out nth fibonacci number for very large ‘n’
- Computing set intersection in linear time?
- Find the set of largest contiguous rectangles to cover multiple areas [duplicate]
- How to find the smallest number with just 0 and 1 which is divided by a given number?
- How to calculate the index (lexicographical order) when the combination is given
- How do I find a factorial? [closed]
- Strategies for simplifying math expressions
- What is the method for converting radians to degrees?
- Compute the area of intersection between a circle and a triangle?