wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> cs >> Condition for putting one cuboid box inside anothe
(Message started by: singhar on Nov 20th, 2014, 11:21pm)

Title: Condition for putting one cuboid box inside anothe
Post by singhar on Nov 20th, 2014, 11:21pm
Hi,

Given the length, breadth and height of two rectangular boxes, what is the condition that must be true (in terms of the dimensions of course), so that we can put one box inside another?

For example, a 7x5x1 box actually could be put inside a 6x6x6 box.

Thanks for your help.

Title: Re: Condition for putting one cuboid box inside an
Post by singhar on Nov 21st, 2014, 3:27am
One way of knowing whether a box fits in another, is by taking three different projections of the box to be put inside (with a given orientation) on to the flat sides of the outer box (i.e inside which we are going to put the other box) and checking if the projection is completely contained within the flat side. If all the three projections are within the respective sides, then the box will fit and the orientation tried is good.

But the problem with this approach is we need to try many different orientations of the inner box and take these projections. This looks cumbersome. Any easier approach to this problem?

Title: Re: Condition for putting one cuboid box inside an
Post by towr on Nov 21st, 2014, 7:36am
In most cases you can probably use an incremental improvement algorithm to find an orientation. And I think there are only a few potential orientations where you might get stuck in a local minimum, so it might be possible to guarantee a solution if there is one by finding all of them.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board