Optimal motion planning of autonomous vehicles in three dimensional terrains | Synapse