We consider the following two problems: (P1) We are given a rectilinear simple polygon P with n edges and a point s in its interior. Given a query point t in the interior of P, find a rectilinear shortest path between s and t. (P2) We are given a rectilinear simple polygon P with n edges. Given a query point pair (s,t) in the interior of P, find a rectilinear shortest path between s and t. For problem P1, we present an efficient algorithm which works in O(log n plus L) query time and O(n log n) preprocessing time, where L is the number of line segments in the shortest path. The shortest path obtained by the algorithm is of minimum bends among all the paths between the two points. If only the distance between s and t is needed, then O(log n) time is enough for the query. For problem P2, O(n) query time is needed while the preprocessing time is the same. Based on the algorithms, it is shown that given m points in a rectilinear n-edge simple polygon we can compute the distance between every pair of points in O(m(m plus n) plus n log n) time.
浅野 et al. (Sun,) studied this question.