Shortest path in road map is not a real shortest path because some arcs are btw nodes that are far apart, whereas others are btw nodes that are close to each other. It is just minimum number of hop. To improve this problem, give each arc a weight corresponding to the Euclidean length, and use graph search algorithm that find the shortest path in a weighted graph. Dijkstra's algorithm But, it is still not a shortest path.
Shortest Paths Think of this path as an elastic rubber band. Fix the endpoints at the start and goal position. Try to tighten the rubber band. It will be stopped by the obstacles. The new path will follow parts of the obstacle boundaries and straight line segments through open space.
Visibility Graph Definition: The visibility graph of s and t and the obstacle set is a graph whose vertices are s and t the obstacle vertices, and vertices v and w are joined by an edge if v and w are either mutually visible or if (v, w) is an edge of some obstacle.