I'll tell you one of my personal hells:
"Ce qui vaut la peine d'être fait vaut la peine d'être bien fait". ("What is worth doing is worth doing well".) You've heard that one before. That's just a gateway drug, though. Doing something well leads to wanting to understand the patterns and causes and then, once you can start to get a grip on the classes and methods of that something it's only natural to want to start building a machine of some sort to do that something for you.
(I'm saying "you" but I know I'm thinking "me". Bear with me on this one. I need to talk about this like it's your problem. It's easier to deal with, etc.)
My big Home Project now is building some steps from the back door of the garage down to the back yard—the Backyard Steps Project. In isolation: it's not that difficult of a problem.
My wife would also like the backyard to be leveled—the Backyard Leveling Project. In its current state (which I was tempted to call its "natural state", although this would be a casual lie because it was certainly modified during the installation of these suburbs in the ~1960s, and perhaps even before that, I don't know) there is a downslope from north-to-south and from west-to-east. As the proud owner of a shovel (a collection of shovels, really, don't judge), the solution to the leveling problem is simple: take a shovelful of dirt from the high side and put it on the low side. Repeat until there is no high side or low side.
Simple specification, simple implementation. I'd crawl on my knees and beg for a spec to be this easy to implement at work. However, there is some coupling between the Backyard Steps Project and the Backyard Leveling Project that is giving me a headache.
How many steps does one need? Assuming you care about your user (you should—I do), the steps should be an equal height—an obvious assumption, sure, but we're just building out the model here. Now you have h_step, and n_steps * h_step will be the total elevation change (h_total) from the landing at the top (z_top) to the landing at the bottom (z_bottom); or, in reverse, the total elevation change will give you n_steps, just divide h_total by h_step. z_top is fixed—the garage slab is not going anywhere. But z_bottom is z_backyard, and the value of z_backyard to use is its future value, after leveling. h_step—we'll limit the values for this one between 6 and 7.5 inches.
And, to some extent, since setting z_bottom affects the rise-over-run of the whole set of steps, z_bottom also affects d_step, the depth (or amount of run) of each step—and we'll also assume d_step to be equal for all steps. But this can be somewhat mitigated by changing the length of the top and bottom landing. (w_step, the width of the path, was fixed at 60 inches through what we might call stakeholder feedback.)
A diagram would be helpful, no?
I've also gathered measurements (good ol' stick, string, and bubble level) for the project. The measurements break down into two groups: (1) the ground leading from the garage door to the edge of the deck (a single arc); and (2) the back yard measured in 2-ft increments 32 feet south of each deck pier (so, basically, six arcs of data). Call it data_1 and data_2 for reference.
data_1 is easy because it is just measured from the deck (the top edge of the deck planks) down to the ground with a (large) ruler. It assumes that the deck level is fixed because otherwise why bother. It also assumes that the east-west slope here is zero, which is not accurate, but not far off—since this bit is not part of the yard leveling scheme, it doesn't need to be accurate, I'm not accounting for the volume of dirt to move.
data_2 was massively annoying to capture. I attached the string a clamp on the wood supports one inch above each of the concrete piers to provide a reference height for each series of measurements. But each pier has a different absolute height—so, essentially, there is a z_string for each series of measurements that defines the height of the fixed string above the ground to give the raw measurements.
This all needs to be adjusted so that the height measurements are taken from the same level—deck level.
There is one more transformation that I did, that might be overkill—but what the hell. As mentioned at the start: if it's worth doing, it's worth overdoing. The distance measured south of the deck is really the distance along the ground, not the distance measured along the north-south axis—so a little trigonometry needs to be done to pull out the y-axis (north-south axis) component.
Then add in the distance between the piers for x-axis (east-west axis):
Then, at this point, I've got the transformed (x,y,z) field data for leveling the backyard.