Calculating the easiest path when walking over a hill