I'm looking for an algorithm that will let me determine if a solid object can fit inside of a box (rectangular prism) with given dimensions. The solid may be rotated and translated to fit inside the box.
I already have a solution to this problem:
(EDIT: this is not a valid solution)
This works, but I am looking for a more efficient solution. The minimum bounding box algorithm runs in O(n^3) time where n is the number of vertices. I am hoping for an O(n^2) algorithm.
Note that instead of a "solid object" I may just as well be asking if the set of points which form the convex hull of the solid can fit inside the box.
You might want to take a look at this paper. It gives an algorithm than compute an 1+epsilon approximation of a 3D minimum bounding box in O(n log n + 1/epsilon^3) time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With