How would you determine the shortest distance between a point and one or more segments?
For example, what is the shortest distance between the point and the two segments below? Clearly the point is closer to the right line segment. That means the shortest distance between the point and the line segments is equal to the distance between the point and the right segment.
point = {{8, 15}}
lines = {{{20, 10}, {11, 27}}, {{11, 27}, {1, 27}}}
Show[Graphics[{Thick, Line@lines}],
Graphics[{PointSize[Large], Pink, Point@point}]]
Can you think of a way that also works with an arbitrary number of segments?