I have a point located inside a concave polygon and I want to find the closest point that is just outside the polygon. I implemented the answer in: For a point in an irregular polygon, what is the most efficient way to select the edge closest to the point? but that finds the closest point on a polygon edge, not outside the polygon.
I tried just extending the line from the point inside the polygon to the point on the edge, but there are instances where that wont work.
Any suggestions?
EDIT: To make it more clear, I have a point inside a concave or convex polygon, and I want to find a point outside the polygon, as close as possible to the point inside. So in below illustration, I want to find the red point. It doesn't have to be perfectly minimized in distance, just needs to be outside and not too far from the original point. Maybe by a fixed amount?