3

Deceptively tricky - will it fit through the door?

I work in an art gallery and we regularly take delivery of large paintings housed in wooden crates. Our old building has a door measuring 180 x 234 cm (290 cm diagonal).

What is the formula for calculating whether a painting will fit through our doors diagonally?

For example, I am trying to calculate if we can receive a painting in a crate sized 281 x 347 x 23 cm. Its shortest side (281 cm) is within our diagonal dimension but I estimate that the 23 cm depth means that it will not fit. What is the formula for establishing this accurately?

Ideally I would like to refer to a formula each time I find out the dimensions of a wooden crate.

Door and Crate

amWhy
  • 209,954
WG108
  • 41

3 Answers3

2

Let's say you have a door with sides $2a<2b$ and a painting with smaller dimensions $2\alpha<2\beta$. Of course, if $\alpha<a$ and $\beta<b$, the case is trivial, so I'll assume otherwise. The diagonal of the painting is $2d=2\sqrt{\alpha^2+\beta^2}$ and the smaller angle between those diagonals is $\varphi=2\tan^{-1}(\alpha/\beta)$. We can center the painting in the center of the door since you will remain inside the door by moving the center of the painting through to the point opposite the center of the door.

enter image description here

We need to make sure all four corners lie inside the door. Pick two adjacent corners. If these two corners fit, all four will fit. Orient the picture as above with $\theta$ the angle from the horizontal to the first corner. Then, $\varphi$ is the additional angle to reach the next corner.

The inequalities we need to solve are

$$d\cos\theta<a$$ $$d\sin(\theta+\varphi)<b$$

We assume the painting cannot fit at all angles, so we can find an angle where one of these conditions is equality. Thus, we have two cases

(I) $d\cos\theta = a$ so we use $sin(x+y)=\sin x\cos y+\sin y\cos x$ then ask if the following is true

$$\sqrt{d^2-a^2}\cos\varphi+a\sin\varphi<b$$

(II) $d\sin(\theta+\varphi)=b$ so we use $cos(x-y)=\cos x\cos y+\sin x\sin y$ ask if the following is true

$$\sqrt{d^2-b^2}\cos\varphi+b\sin\varphi<a$$

In your case, paintings are generally thinner than doors, so we opt for (II). In terms of dimensions, this becomes

$$\sqrt{\beta^2-p^2}+\sqrt{b^2-p^2}<a$$

where

$$p^2=\frac{b^2\beta^2}{\alpha^2+\beta^2}$$

Notice, it checks out for $\alpha=0$.

1

Unless someone comes with a better formula i can give you a preliminary one which has a slight error due to rounding. The crate will not fit through the door and we can show this with trigonometry. Since we know width and height we can calculate the diagonal $$\sqrt{180^2 +234^2}=295.22 $$ we can also calculate the angle $\alpha= \arccos(\frac{234}{295.22})=37.568^{\circ}$ degrees. Since we have side of length $281$ i will to calculate how far we are from the corner on the diagonal line, we subtract and half $\frac{295.22-281}{2}=7.11$ and now since we know $\alpha$ and the adjacent side we can calculate the hypotenuse so we can calculate the opposite side(distance from the diagonal to door frame) $$\frac{7.11}{h}=\cos (37.568^{\circ})$$ to get $h=8.957$ so from $x_1=\sqrt{h^2-7.11^2}$ and $x_1=5.469$ but $x_1<\frac{23}{2}=11.5$ and in a similar way to get the distance from diagonal to floor $x_2=\sqrt{(\frac{7.11}{sin(\alpha)})^2-7.11^2}=9.2432$ so you get $x_1+x_2=14.71219<23$. For a formula you would always have to repeat this process (you know $\alpha$) to find the distance from the diagonal line to door frame and it needs to be more than the half the depth of your desired package which was in this instance $D=23$.You have package height $p_h$ so you calculate $r_c=\frac{295.22-p_h}{2}$ and do same with $\frac{r_c}{h}=\cos (37.568^{\circ})$ to get $$d_{max}=\sqrt{h^2-r_c^2}=\sqrt{(\frac{r_c}{ \cos (37.568^{\circ})})^2-r_c^2}$$ for half of maximum depth of your desired package so $D=2 \cdot d_{max}$

Or you can change the the formula for $$\frac{d_{dp}}{h}=\sin(\alpha) $$ $p_h=\sqrt{h^2-(d_{dp})^2}=\sqrt{(\frac{d_{dp}}{ \sin(37.568^{\circ})})^2-(d_{dp})^2}$
to get max height $295.22-2 \cdot p_h$

if you have a set depth of desired package to find the maximum height allowed, ofc $d_{dp}=\frac{D}{2}$ and $\alpha=37.568^{\circ}$ will always be the same.

in the image i have calculated you can have a maximum height of around with a slight error $272cm$ for depth $D=23cm$ i used $24cm$ in image just to be on the safe side.

EDIT3: i underestimated the length of the other side so the true height limit for package $D=23$ will be $3\%$ and a bit higher than $264$ which is $272$ as you can see in the picture the closer side is $12$ units from the door frame but is $20$ units from the floor which gives us a depth of $32$. For best accuracy you would have to add the distance to both the floor and door frame so that $d_{floor}+d_{frame}<D_{depth}$ what i did here $x_2=\sqrt{(\frac{7.11}{sin(\alpha)})^2-7.11^2}=9.2432$ so you get $x_1+x_2=14.71219<23$. You can better approximate $x_2\cdot(1+0.592)=D_{depth}$ and $x_1=0.592\cdot x_2$ from here we would get max height $272$ for $D_{depth}=24$ to explain how to calculate the maximum height from getting say $x_1$ it would be as $r_c=\sqrt{(\frac{x_1}{\sin(37.568^\circ)})^2 -x_1^2}=11.60$ and $H_{max}=295.22-2 \cdot 11.60=272$. Please ask if you have any questions, i wont be editing this answer any further

improved approximation

image of calculation with errors

bek3711
  • 89
0

Imagine that in front of your door is an alleyway $180$ cm wide. That is, it has the dimensions of your door except that it has no top frame. Imagine that you lean the crate over in the alleyway until the bottom of the crate touches one wall and the top of the crate touches the other, like this:

enter image description here

The angle at which the crate leans is determined by the diagonal of the crate that touches both walls. The length of this diagonal is $$d = \sqrt{w_C^2 + h_C^2}$$ where $w_C$ is the width of the crate and $h_C$ is its height. For a short, wide crate there could be two solutions, but for a crate containing a painting that is taller than the door frame, I am fairly sure there will be only one, and it will be the solution shown above.

The diagonal $d$ is the hypotenuse of a right triangle; one of the triangle's legs runs along the wall and the other leg is parallel to the ground and has length $w_D$ (the width of the door frame). The angle opposite the ground leg, which is represented in the figure by the sum $\phi + \theta,$ can then be computed by the formula

$$ \phi + \theta = \arcsin\left(\dfrac{w_D}{d}\right). $$

Solving for $\theta,$

$$ \theta = \arcsin\left(\dfrac{w_D}{d}\right) - \phi. $$

The angle $\phi$ is easily computed by $\phi = \arctan\left(\dfrac{w_C}{h_C}\right)$, so

$$ \theta = \arcsin\left(\dfrac{w_D}{d}\right) - \arctan\left(\dfrac{w_C}{h_C}\right). $$

As shown in the diagram, the angles $\phi$ and $\theta$ and the crate's width $w_C$ determine the height from the ground to the uppermost corner of the crate. If this height is less than the height of the door frame, $h_D,$ the crate can pass through; otherwise it cannot. So we want to know whether

$$ 2 w_C \sin \theta + d \cos(\theta + \phi) < h_D. $$

An alternative formula, using the Pythagorean theorem rather than trigonometry to find the length of the segment $d \cos(\theta + \phi),$ is

$$ 2 w_C \sin \theta + \sqrt{d^2 - w_D^2} < h_D. $$


As a practical matter you will have to do some rounding both while measuring and while calculating. I would round the door frame dimensions down, round all other linear dimensions up (including the value of $\sqrt{d^2 - w_D^2}$, which I would use instead of $d \cos(\theta + \phi)$), and round $\theta$ up because of the factor $\sin\theta$.


For your example, we have $w_D = 180,$ $h_D = 234,$ $w_C = 23,$ and $h_C = 281.$ Then $d = \sqrt{23^2 + 281^2} \approx 281.94$ (rounded up), and

$$ \theta = \arcsin\left(\dfrac{180}{281.94}\right) - \arctan\left(\dfrac{23}{281}\right) = 0.6108 $$

(in radians, rounded up). This is about $35^\circ.$ Then

$$ 2 (23 \sin (0.6108)) + \sqrt{281.94^2 - 180^2} \approx 243.385 > 234, $$

so this crate will not fit through the doorway.

David K
  • 98,388