We need a routine that can create a featureline with step heights that fall within a user supplied range. This would typically be a range of 4" - 7" to conform to building codes.
Building code requires:
-the individual step heights not vary in the stair system by more than some tolerance amount.
-the tread depths be some minimum depth (i.e., 11")
The photos below show the bottom and top step elevations to calculate between. Note that the treads may be the minimum depth on tight situations, or span several feet on long walk approaches..