Question: How can I enumerate valid stair dimensions with a whole number of risers in Maple?

As interior architects, we often have to fit a new staircase into an existing home, where the floor-to-floor height and the available horizontal run are fixed by the building. We already check comfort with Blondel's rule, which relates twice the riser height plus the tread depth to an average stride, and we keep the number of risers a whole number so that every step is identical. Today we do this by hand or in a spreadsheet, testing one riser count after another. In Maple, what would be a clean way to take the floor height, the available run and the comfort range as parameters, loop over the possible integer riser counts, and return every combination of riser height and tread depth that satisfies all the constraints? Would you use a simple loop that builds a list of solutions, or is there a more idiomatic approach with select or with integer constraints in the Optimization package? A small plot of the valid combinations would also help us compare options with our clients.

Please Wait...