Given a point\'s coordinates, how can I determine if it is within an arbitrary shape?
The shape is defined by an array of points, I do not know where the shape is \'
If you want to determine whether or not a point P is in an arbitrary shape, I would simply run a flood fill starting at P. If your flood fill leaves a pre-determined bounding box, you are outside the shape. Otherwise if your flood fill terminates, then you're within the shape :)
I believe this algorithm is O(N^2) where N is the number of points, since the maximum area is proportional to N^2.
Wikipedia: Flood Fill