Distance from a point to a polygon
Your best bet is to iterate over all the lines and find the minimum distance from a point to a line segment. To find the distance from a point to a line segment, you first find the distance from a point to a line by picking arbitrary points P1 and P2 on the line (it … Read more