You may be surprised, as we were, to know that every staircase must be custom-designed to fit the circumstances
of total elevation (total “rise”) and total horizontal extent (total “run”). Figure 2-1 shows these dimensions.
If you search the web, you can find algorithms—methods—for designing staircases.
To make stairs fit a person’s natural gait, the relationship of each step’s rise (lift height) to its run (horizontal
distance) should be consistent with a formula. Some say the following formula should be satisfied:
(rise * 2) + run = 25 to 27 inches
Others say the following simpler formula works well:
rise + run = 17 to 18 inches
Many say the ideal rise for each step is 7 in, but some say outdoor steps should be 6 in high because people
are more likely to be carrying heavy burdens outside. In either case, for any particular situation, the total rise of
the staircase will probably not be an even multiple of 6 or 7 in. Therefore, the rise of each step must be altered
to create a whole number of steps.
These rules lead to a procedure for designing a staircase. Our algorithm for designing a set of stairs will be to:
1 Divide the total rise by 7 in and round the result to the nearest whole number to get the number of steps.
2 We will then divide the total run by (the number of steps − 1) (see Fig. 2-1) to compute the run for each step.
3 We will apply one of the formulas to see how close this pair of rise and run parameters is to the ideal.
4 Then we will complete the same computations with one more step and one less step, and also compute the
values of the formula for those combinations of rise and run.
5 We will accept the combination of rise and run that best fits the formula for the ideal.
An algorithm is a way of solving a type of problem, and an algorithm is applicable to many particular
instances of the problem. A good algorithm is a tool that can be used over and over again, as is the case for our
staircase design algorithm.
No comments:
Post a Comment