Ask HN: How to calculate if a box will fit through a hallway with a 90 degree turn
Will my box:
--
I I
I I
--
Fit through my hallway: I I
I I
I ------
I
----------Will my box:
--
I I
I I
--
Fit through my hallway: I I
I I
I ------
I
----------
[+] [-] noonespecial|17 years ago|reply
If you don't know the size of the box in advance, hold the string at the corner and make the string the longest possible length that can sweep this arc. Take the sting with you to the box.
What you are really doing is measuring the distance to the corner from the closest wall and then making sure the line from the box's midpoint to one of its corners is not longer. There are edge cases (ha!), but this generally works.
[+] [-] NoBSWebDesign|17 years ago|reply
Mathematically this "string theory" (sorry, couldn't help myself) is saying the following:
sqrt[ (l/2)^2 + b^2 ] < min(x,y)
where l = length of box, b = base of box, and x and y are the respective widths of the two hallways.
However, this ignores the fact that the pivot point on the box around the corner can slide as you push the box around the corner. So the pivot point could essentially slide from one end of the box to the other (at some point sliding through the midpoint you are measuring for), which allows a lot more leeway for the box's acceptable dimensions.
I worked on this problem a bit this morning, but I don't have my trusty TI-89 calculator to help out. This is actually a calculus problem that I have a difficult time explaining without posting some sketches. Maybe I'll do that in the near future.
[+] [-] Anon84|17 years ago|reply
Sometimes you can get around it by leaning the box at a vertical angle, thus reducing the length that actually needs to get around the corner.
[+] [-] kduncklee|17 years ago|reply
[+] [-] NoBSWebDesign|17 years ago|reply
I feel much better now knowing I wasn't missing something obvious, and I can finally move onto my actual work for the morning after seeing the solutions. Thanks!
[+] [-] quellhorst|17 years ago|reply
[+] [-] niyazpk|17 years ago|reply
let x = width of one corridor.
let y = width of the perpendicular corridor.
We will disregard the height of the box here since I assume that you can find out the correct way to orient the box.
The box will fit throught the hallway if:
(sqrt(x^2+y^2) - l/2) >= b
I will post the reasoning after I get out of my office.
BTW, thanks for posting this intersting problem.
[+] [-] NoBSWebDesign|17 years ago|reply
The equation I came up with is as follows:
y1 = [l/(2b(1/tan(a)^2 - cos(a))] * [x - l/cos(a) + b/sin(a)] + l/cos(a) + b/sin(a)
where you plugin b, l, and x based on your parameters, and find the maximum value for y1 when a goes from 0 to 90 degrees. That maximum value should be less than y for the box to be able to fit around the corner.
[+] [-] tocomment|17 years ago|reply
If it helps, it's an elliptical machine I was thinking of buying (I was using a rectangular box shape as an abstraction.)
I'm not sure how easily it can be disassembled.
The dimensions are 22" x 57" x 66" and the hallway is 31" in the first corridor and 32" in the next, with a height of 82".
[+] [-] niyazpk|17 years ago|reply
Here let us take h=66 since it will fit only that way in the corridor.
x = 31, y = 32
b = 22, l = 57, h =66
So (sqrt(x^2+y^2) - l/2) = 44.55 - 28.5 = 16.05
Now 16.05 is less than b(=22), so the box will not fit through.
[+] [-] NoBSWebDesign|17 years ago|reply
sqrt[ (57/2)^2 + 22^2 ] = 36", which is greater than 31"
[+] [-] Tichy|17 years ago|reply
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.
[+] [-] pg|17 years ago|reply
[+] [-] kduncklee|17 years ago|reply
[+] [-] unknown|17 years ago|reply
[deleted]
[+] [-] noodle|17 years ago|reply
[+] [-] ander501|17 years ago|reply
http://archives.math.utk.edu/visual.calculus/3/applications....
[+] [-] thexa4|17 years ago|reply
If you really want to turn the box, make sure the hallway is wider then 3/4 * sqrt(2) * lengthBox If you turn the box 45 degrees, that's when the box will use the most space. The hallway will have to be 3/4 of the diagonal of the box.
[+] [-] anigbrowl|17 years ago|reply
[+] [-] jsz0|17 years ago|reply
[+] [-] stelund|17 years ago|reply
Assumed the hallways size is symetrical and your object cannot be tilted to achive a smaller length. For example, an object of little height in a high to ceiling room will be possible to tilt with the same measurements are presented above (pythagoras). But if the box has any substancial height you wont get any help from a tilt. A soffa would tilt, a dish washer does not.
[+] [-] stevejalim|17 years ago|reply
[+] [-] nailer|17 years ago|reply
Personally I reckon you should keep it closed.
[+] [-] tocomment|17 years ago|reply
[+] [-] Raphael|17 years ago|reply
[+] [-] patio11|17 years ago|reply
[+] [-] Raphael|17 years ago|reply