What I have to send to you
It's actually a modified version of a project I did for another topic on this forum.
I actually posted the previous version to someone else on here just earlier today. This version does the following:
Allows you to plot a series of points for a path to traverse (the code closes the path to make a polygon as that is what it was originally designed to do.
Allows you to generate a pseudo-random polygon of n sides.
Allows you to Save / Load the series of points in your path to disk.
Allows you to click on the picturebox and start the traversal of the path. As the path is traversed if in the default "debug mode" an info box appears giving details of distance and angle (in degrees) to reach the next point.
Once the path has been traversed, the program will indicate if the point you specified is either inside the shape, outside the shape or on the edge of the shape.
When the settings are set to enable crosshair, enable on move, disable all debug info, the program will indicate whether the mouse is inside, outside or on the edge in real time.
The project isn't pretty as far as naming conventions etc go, but it should be relatively bug free.
I thing the maths in the pclPolygon and pclPoint classes will be what you are most interested in.
Good luck. When you let me know your email address I will zip it up and send it to you.
Regards