>>2834315This thread is too long and too retarded but I think I know what his problem is:
He want's an algorithm for an optimal path. Literally a solved problem, that stuff exists. The only caveat is that there is no such thing as optimal. Different costs are associated with distance, grade, terrain etc. The least grade path is trivial: Trade distance for grade, just walk around any hill or mountain in the direction of your choosing for as many times as you like while maintaining shallow positive grade. There. You made it to the top but walked a thousand miles. Want it even shallower? Circle the mountain even more times on the way up.
And that is OPs problem, probably. The algos are as old as enlightenment itself. But the 'optimal' costs are highly individual. You're a good rock climber and enjoy that? Up you to as the crow flies. You're in a wheelchair? I guess terrain now matters. You're pushing a wheelbarrow? Guess you wont mind going the long route with the least gradient.
How far OP is willing to stray from the shortest path to keep the gradient down is everyones guess
OP maybe just look at BRouter for a practical example. It's open source and works pretty good.
>inb4 criticismDidnt reas thread so comment might be missguided then just dismiss it