3 ms·
> From this it seems enough to only test combinations where two edges align. That can't be correct in general. Imagine a 9x9x9 cube, and nine 3x3x1 squares. Th
by StephanTLavavej 10y ago
> From this it seems enough to only test combinations where two edges align.
That can't be correct in general. Imagine a 9x9x9 cube, and nine 3x3x1 squares. This can fit into a 9x9x10 box, with the squares all on one side of the big cube. However, four of the squares will share only one edge with the cube, and one of the squares will share no edges with the cube.
- bemmu 10y agoLike this? http://imgur.com/a/61EnF http://imgur.com/a/61EnF I probably misunderstood, but it seems to work. "Align with edge" I meant aligning with any edge of any box which is already in play.
- StephanTLavavej 10y agoHmm, as long as you don't always use the big cube as the baseline, that works.
- jtolmar 10y agoThere are still cases it won't work; in fact, sometimes the optimal packing is pretty strange. For example, check the fifth optimal square packing: https://en.wikipedia.org/wiki/Square_packing_in_a_square https://en.wikipedia.org/wiki/Square_packing_in_a_square
- bemmu 10y agoWow, that's a more bizarre case than I would have imagined. I started with the assumption that rotating them other than multiples of 90 degrees would never help, but looks like I was wrong.
- SerLava 10y agoWell to be fair, packing a physical good in that type of arrangement would often cause breakage of the diagonal object. So establishing flush edges seems like a good assumption here.
- jtolmar 10y agoThere's also an upper bound on how bad an axis-aligned solution can be. And, on a less mathematical note, weird diagonal packings are counter-intuitive to everyone and you're not likely to get customers complaining that you packed inefficiently just because you missed an opportunity to use one.