I want to place one polyhedron(Object) into another (Container). Both the polyhedrons are convex and defined by a set of points and triangles. The container has a constant size. The object can be scaled and should be strictly inside the container. I want to compute the position and orientation for the object which makes it the biggest. Approximate and efficient solutions also help.
Any suggestions? Thanks a lot.
Another suggestion, if running-time allows it:
For a fixed pose of the outer polyhedron, the pose of the inner polyhedron is defined by 3 translation and 3 rotation parameters (such as Euler angles) around an arbitrary center.
When these parameters are fixed, casting rays from the center through the inner vertices until you hit the outer polyhedron gives you the allowed scaling factor.
Now the problem is recast as the maximization of a function of 6 variables, with local maxima to be expected. This can be addressed by Hooke & Jeeves steps, the up-hill simplex method (Nelder-Mead) and/or simulated annealing.
I do not recommend to start from the solution in my other answer and stay close to it, as you could be trapped in a local maximum.
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