The best methods we have (afaik) basically randomly position the object and then nudge it until it gives up after doing lots of tries
I’m skeptical. I can think of some problems that do work like that, like graphviz’s node-cluster-and-fit-to-a-plane layout stuff. But here, you should just need to be working with the convex hull. It should be possible to eliminate a lot of classes of potential solutions by reducing it to looking at edge cases, like some face of the convex hull is in-plane with the bounding box or something.
kagis
Yeah.
en.wikipedia.org/…/Minimum_bounding_box_algorithm…
In computational geometry, the smallest enclosing box problem is that of finding the oriented minimum bounding box enclosing a set of points. It is a type of bounding volume. “Smallest” may refer to volume, area, perimeter, etc. of the box.
It is sufficient to find the smallest enclosing box for the convex hull of the objects in question.
In 1985, Joseph O’Rourke published a cubic-time algorithm to find the minimum-volume enclosing box of a 3-dimensional point set.
HelloRoot@lemy.lol 1 day ago
Have you read the algo?
It basically takes the global minimum over all edge pairs (and their zero-curves) and return the orientation and extents with the smallest encountered volume. Which is basically like trying every possible position along the edges of the convex hull around your obect.
But I edited my comment to remove that part, because that bit is honestly irrelevant for OPs question.
tal@lemmy.today 1 day ago
It’s not the nudging that you referred to. You edited your comment after I responded to remove that part of your comment.
HelloRoot@lemy.lol 1 day ago
I edited it before I read your reply.
tal@lemmy.today 1 day ago
Fair enough, sorry.