How to calculate the distance from the inside of a swept body to it's boundary?

11 Views Asked by At

As an example, a line segment on 2D plane, moving along a certain trajectory, produces a swept body. Select a point inside the swept body, how to get the distance from this point to the boundary of the swept body? If the point is outside, this distance appears to be the closest distance from the point to the line segment during the trajectory. However, once inside, there must be a timestamp when the point is on the line segment thus the distance is 0.

The figure is an easy example for the trajectory is a straight line. enter image description here