Abstract. We present a data structure for ray shooting and insertion in the free space between disjoint polygonal obstacles with a total of n vertices in the plane, where each ray starts at the boundary of some obstacle. The portion of each query ray between the starting point and the first obstacle hit is inserted permanently as a new obstacle. Our data structure uses O(n log n) space and preprocessing time, and it supports m successive ray shooting and insertion queries in O((n + m) log 2 n + m log m) total time in the real RAM model of computation. We present two applications: (1) Our data structure supports efficient implementation of auto-partitions in the plane, that is, binary space partitions where each partition is done along the supporting line of an input segment. If n input line segments are fragmented into m pieces by an auto-partition, then it can now be implemented in O(n log 2 n + m log m) time. This improves the expected runtime of Patersen and Yao's classical randomized auto-partition algorithm for n disjoint line segments in the plane to O(n log 2 n). (2) If we are given disjoint polygonal obstacles with a total of n vertices in the plane, a permutation of the reflex vertices, and a half-line at each reflex vertex that partitions the reflex angle into two convex angles, then the convex partitioning algorithm draws a ray emanating from each reflex vertex in the prescribed order in the given direction until it hits another obstacle, a previous ray, or infinity. The previously best implementation (with a semidynamic ray shooting data structure) requires O(n 3/2−ε/2 ) time using O(n 1+ε ) space for any ε > 0. Our data structure improves the runtime to O(n log 2 n).
Key words. ray shooting, tessellation, hierarchical decomposition
AMS subject classifications. 68P05, 05C10DOI. 10.1137/1008043101. Introduction. Ray shooting data structures are a classical core component of computational geometry. They preprocess a set of objects in space such that one can efficiently find the first object hit by a query ray. A simple polygon with n vertices can be preprocessed in O(n) time to answer ray shooting queries in O(log n) time, using either a balanced geodesic triangulation [10] or a Steiner triangulation [21]. However, the free space between disjoint polygonal obstacles with a total of n vertices (e.g., n/2 disjoint line segments) cannot be handled as easily: the best ray shooting data structures can answer a query in O(n/ √ s) time using O(s) space and preprocessing, based on range searching data structures via parametric search. That is, an average query takes O( √ n) time using O(n) space (ignoring polylogarithmic factors). Geometric algorithms often rely on a ray shooting data structure, in which the result of