******************* Finding shortest gentle paths on a land surface (cont.)