Quickest Visibility Queries in Polygonal Domains Haitao Wang
Quickest Visibility Queries in Polygonal Domains Haitao Wang Utah State University So. CG 2017, Brisbane, Australia
Shortest paths queries in a polygonal domain § A polygon P of h holes with a total of n vertices, a source point s § Given a query point t, find a shortest path from s to reach t t s
Our problem: Quickest visibility queries § Given a query point t, find a shortest path from s to see t a s b t
A subproblem: shortest-path-to-segment queries § Given a query segment t, find a shortest path from s to any point of t § q is a closest point of t to s q s t
Why a subproblem? § To answer a quickest visibility query for t § Compute the visibility polygon Vis(t) of t § Find a closest point q on the boundary of Vis(t) § Observation: q must be on a window of t a window b The quickest visibility query can be solved by computing a closest point in each window of t, using the shortest path to segment queries q s a Vis(t) t
The simple polygon case is easier § Observation: Only one window needs to be considered § Difficulty for polygons with holes: have to consider many windows s q t s t
A polygonal domain § A polygon P of h holes with a total of n vertices § h could be much smaller than n § Complexities are better measured by h instead of n § O(n 2) vs. O(n + h 2) h=3 n = 32
Previous work: Simple polygons § Shortest-path-to-segment queries Arkin et al. 2015, Chiang and Tamassia 1997 § Preprocessing time and space: O(n) § Query time: O(log n) § Quickest visibility queries Arkin et al. 2015 § Preprocessing time and space: O(n) § Query time: O(log n) § Apply the shortest-path-to-segment query on the single window
Previous work and our result: Polygonal domains § Shortest-path-to-segment queries Preprocessing Space Query time O(n 2 2α(n) log n) O(log 2 n) Arkin et al. 2015 O(n 3 log n) O(log n) Arkin et al. 2015 O(n) O(h log n/h) This talk § Quickest visibility queries Assume SPM(s) has been computed in O(n log n) time Preprocessing Space Query time O(n 2 2α(n) log n) O(K log 2 n) Arkin et al. 2015 O(n 8 log n) O(n 7) O(log n) Arkin et al. 2015 O(n log h + h 2 log h) O(n log h + h 2) O(h log n) This talk K: the size of the visibility polygon Vis(t) of the query point t, and K = O(n)
The Quickest Visibility Queries - O(h log n) time § A preliminary result: O((K+h) log h log n) query time § First, compute Vis(t) and find all O(K) windows § O(K h log n/h) time, if applied our shortest-path-to-segment queries on each window § Reduce the time to O((K+h) log h log n) § Goal: find a closest point q in all windows q s t
Extended-windows § Extended-windows: Extend each window to t § q is also the closest point on extended-windows § Assumption: q is not an endpoint of these extended-windows § Otherwise, find a shortest path from s to each endpoint § Observation: if q is on an extended-window w, then π(s, q) arrives at q from the left or the right side of w § S 1: The set of points on all extended-windows whose shortest paths are from the left side § q 1: a closest point in S 1 § q 2: a closest point for the right side § q is either q 1 or q 2 s § Assume q is q 1 w q t
Computing q (= q 1) § Prune some (parts of) extended-windows § For an extended-window w, if we know that a sub-segment w’ of w does not contain a closest point, then w’ can be pruned § Observation: For any point p on an extended-window, if π(s, p) intersects another extended-window, then p cannot be a closest point and can be pruned p a s t
The pruning principle § Consider two extended-windows ta and tb, and three shortest paths from: π(s, a), π(s, b), π(s, t) § Case 1: no pruning can be done § Case 2: the entire tb can be pruned § Case 3: the sub-segment tc can be pruned b a a b c p p s t Case 1 s t Case 2 s t Case 3
An example and the algorithm § Step 1: Pruning § Step 2: Compute a closest point from s to each remaining sub-segment § O((K+h) log h log n) time in total 6 5 2 1 4 8 7 3 9 s t 10
Reducing the query time: O((K+h) log h log n) O(h log n) § Main Idea: § Instead of Vis(t), only compute a special subset S(t) of O(h) windows § Lemma: a closest point q must be on a window of S(t) § Apply the preliminary algorithm on all windows of S(t) § How to find S(t)? § Extended corridor structure
Defining the window set S(t) s q a t
Defining the window set S(t) b q s a t t
Thank you for your attention! 6 5 2 1 4 8 7 3 9 s t 10
Shortest-path-to-segment queries § Our approach: Using a decomposition D of P § Bisectors of the shortest path map SPM(s) of s § V: the set of all intersections between bisectors and obstacles, and triple points (intersections of bisectors) b § All shortest paths from s to all points of V § Remove all bisectors § The resulting decomposition is D a s
Important properties of the decomposition D § D can be computed in O(n) time from SPM(s) § Each cell is simply connected § After O(n) time preprocessing, given any segment t in a cell C, a shortest path from s to t can be computed in O(log |C|) time § For any segment t, t can intersect O(h) cells § For any segment t in P, the shortest path from s to t can be computed in O(h log n/h) time by a “pedestrian” algorithm t b t s a
Important properties of the decomposition D § D can be computed in O(n) time from SPM(s) § Each cell is simply connected § Each cell C has two super-roots r 1 and r 2, such that for any point t in C, the shortest s-t path is the concatenation of a shortest s-r path and a shortest r-t path in C, for some super-root r § After O(n) time preprocessing, given any segment t in a cell C, a shortest path from s to t can be computed in O(log |C|) time § For any segment t, t can intersect O(h) cells § For any segment t in P, the shortest path from s to t can be computed in O(h log n/h) time by a “pedestrian” algorithm t r 2 t b t s r 1 a
The pruning principle § Consider two extended-windows ta and tb, and three shortest paths from: π(s, a), π(s, b), π(s, t) § Case 1: no pruning can be done § Case 2: the entire tb can be pruned § Case 3: the sub-segment tc can be pruned b a a b c p p s t Case 1 s t Case 2 s t Case 3
An example and the algorithm § Step 1: Pruning § Step 2: Compute a closest point from s to each remaining sub-segment § O((K+h) log h log n) time using the decomposition D § only need to consider O(h) cells of D 6 5 2 1 4 8 7 3 9 s t 10
A summary on the preliminary result § § Preprocessing time: O(n log h + h 2 log h) O(n log h) Space: O(n log h + h 2) O(n log h) If the windows are given Query time: O((K+h) log h log n) The quadratic preprocessing is only for computing the windows of t § A new problem: Given a query set of k=O(n) segments in P intersecting at a point t, find the closest point on these segments q § Preprocessing time and space: O(n log h) § Query time: O((k+h) log h log n) s t
- Slides: 24