# Moving a rectangular box around a $90^\circ$ corner

I have seen quite a few problems like this one presented below. The idea is how to determine if it is possible to move a rectangular 3d box through the corner of a hallway knowing the dimensions of all the objects given.

Consider a hallway with width $1.5$ and height $2.5$ which has a corner of $90^\circ$. Determine if a rectangular box of dimensions $4.3\times 0.2\times 0.07$ can be taken on the hallway around the corner.

I know that intuitively, the principle behind this is similar to the 2 dimensional case (illustrated here), but how can I solve this rigorously?

-
This doesn't answer your question, but it's neat and relevant: Moving sofa problem. – Zev Chonoles Jul 15 '11 at 20:22
Some of the references posted at the following web page may have what you're looking for: <mathforum.org/kb/message.jspa?messageID=5802152>; – Dave L. Renfro Jul 15 '11 at 20:36
I don't think "the principle behind this is similar to the 2 dimensional case" (in the illustrated case the "box" is actually one-dimensinal). This is in fact a very difficult problem, but I'm sure such problems are of relevance, e.g., in robotics. – Christian Blatter Jul 15 '11 at 20:47
I believe some of the references at the URL I gave earlier deal with the 3-dimensional case, but if one is interested in the 2-dimensional case, try googling (together, but as separate words) "ladder", "corner", and "envelope". – Dave L. Renfro Jul 15 '11 at 20:59

Here is an attempt based on my experiences with furniture moving. The long dimension a=4.3 will surely be horizontal. One of the short dimensions, call it b will be vertical, the remaining dimension c will be horizontal. The box must be as "short" as possible during the passage at the corner. So, one end of the box will be lifted:

We calculate the projection L = x1 + x2 of the lifted box onto the horizontal plane. Now we move the shortened box around the corner. Here is an algorithm as a Python program (I hope it is readable):

# hallway dimensions:
height = 2.5
width  = 1.5

def box(a, b, c):
# a = long dimension of the box = 4.3, horizontal
# b = short dimension, 0.2 (or 0.07), vertical
# c = the other short dimension, horizontal

d = math.sqrt(a*a + b*b)  # diagonal of a x b rectangle
alpha = math.atan(b/a)    # angle of the diagonal in axb rectangle
omega = math.asin(height/d) - alpha          # lifting angle
x1 = b * math.sin(omega)  # projection of b to the floor
x2 = a * math.cos(omega)  # projection of a to the floor
L = x1 + x2               # length of the lifted box projected to the floor
sin45 = math.sin(math.pi/4.0)
y1 = c * sin45           # projection of c to the y axis
y2 = L / 2 * sin45       # projection of L/2 to the y axis
w = y1 + y2              # box needs this width w
ok = (w <= width)        # box passes if its width w is less than the
# the available hallway width
print "w =", w, ", pass =", ok
return ok

def test():
# 1) try 0.07 as vertical dimension:
box(4.3, 0.07, 0.2) # prints w= 1.407,  pass= True
# 2) try 0.2 as vertical dimension:
box(4.3, 0.2, 0.07) # prints w= 1.365,  pass= True

test()


So, the box can be transported around the corner either way (either 0.2 or 0.07 vertical).

Adding Latex formulae for the pure mathematician:

\begin{align*} d= & \sqrt{a^{2}+b^{2}}\\ \alpha= & \arctan(b/a)\\ \omega= & \arcsin(height/d)-\alpha\\ L= & x_{1}+x_{2}=b\sin\omega+a\cos\omega\\ w= & y_{1}+y_{2}=\frac{c}{\sqrt{2}}+\frac{L}{2\sqrt{2}} \end{align*}

The box can be transported around the corner if $w \le width$.

-
Thank you. That was my intuition also. – Beni Bogosel Jul 16 '11 at 14:28