I have two convex polygons in 3D. They are both flat on different planes, so they’re a pair of faces.
What’s the simplest way to calculate the closest distance between these two polygons?
Edit: The length of the shortest possible line that has an endpoint in the first polygon and another other endpoint in the second polygon. The distance that I’m looking for is the length of this shortest possible line.
This is a simple bounded optimization with linear constraints and a quadratic goal function. There are many algorithms which can be used, such as gradient descent.