Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

closest distance between hull and box

What would be the best way to find the closest distance between a convex hull and an axis aligned box ? By closest distance I mean the pair of points on the hull and box that are closest to each other. We can assume that we know that we know that the hull and box do not intersect.

The hull is given by faces, vertices and I can triangulate the faces if necessary.

like image 681
I J Avatar asked Dec 08 '25 21:12

I J


1 Answers

The paper here gives an algorithm to find closest pair between two convex hulls. http://realtimecollisiondetection.net/pubs/SIGGRAPH04_Ericson_GJK_notes.pdf

For some time, I thought that may be one of the hulls being AABB would make this algorithm unnecessary. Unfortunately, I didn't find that to be true.

The idea behind this algorithm is that you take Minkowski difference of two hulls. The closest pair would be a point in this Minkowski difference closest to the origin. Cartheodory's theorem says that in a d dimensional space, you need only d+1 points to represent a point in the hull. So basically you choose d+1 sized sets of the minkowski difference and find their closest distance to the origin. The closest point to the origin is found through an iterative algorithm.

like image 180
I J Avatar answered Dec 10 '25 11:12

I J



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!