How to calculate if a box will fit through a hallway with a 90 degree turn
Tichy: Don't have time to properly look into it, but here is a quick guess: I suppose the best you can do is rotate the box around the corner on one point on the "upper" side of the box (upper in 2d). If you pick one point on the upper side of the box (which will be the turning point), you can calculate the distance of the lower corners of the box to that point. These distances have to be less or equal to the distance of the inner corner of the hallway to the opposing side of the hallway (which incidentally might be the width of the hallway).This gives you two equations for determining the point on the box to rotate around. If you can solve them, the box will fit through the hallway.Btw., voted up for reminding me of that classic Douglas Adams story where the hero ends up writing a program to calculate how his sofa could have gotten stuck in the hallway.