Abstract: This seminal 1989 paper by Bernard Chazelle and Leonidas Guibas presents an optimal $O(\log n)$ query time algorithm for the ray-shooting problem within a simple polygon of $n$ vertices. By integrating geometric duality, hierarchical polygon decomposition, and fractional cascading, the authors achieve a linear-space data structure that efficiently determines the first edge intersected by a query ray. This work established a new standard for efficiency in visibility problems, with significant implications for computer graphics and robotics.
Introduction
Imagine standing inside a complex, many-sided room (a simple polygon) and firing a laser pointer in a specific direction. Determining which wall the light hits first is known as the ray-shooting problem. In computational geometry, while a brute-force approach—checking the ray against every single edge—takes $O(n)$ time, this is insufficient for real-time applications like ray tracing, collision detection, or CAD systems. The goal is to preprocess the polygon so that any subsequent query can be answered in logarithmic time ($O(\log n)$).
Methodology
Chazelle and Guibas achieve optimality by building a sophisticated pipeline of geometric and algorithmic techniques:
1. Geometric Duality
The authors transform the problem from "primal" space (points and lines) to "dual" space. In this dual representation, a point becomes a line and a line becomes a point. This transformation allows visibility—fundamentally the set of lines passing through gaps—to be treated as a point-location problem within a subdivision of the dual plane.
2. Polygon-Cutting and Hourglasses
To manage complexity, a divide-and-conquer approach is used to recursively split the polygon into balanced pieces using diagonals. This creates a hierarchical tree structure. When moving between these pieces, the authors define "hourglasses"—regions of space representing all possible rays that can pass through two specific diagonals. In the dual plane, these hourglasses correspond to convex visibility polygons.
3. Fractional Cascading
To avoid the $O(\log^2 n)$ time complexity that typically arises from performing a binary search at every level of a hierarchy, the authors employ fractional cascading. This technique "links" related sorted lists, allowing for one initial binary search followed by $O(1)$ work at each subsequent level of the tree, ensuring the final $O(\log n)$ query time.
Key Results
- Optimal Query Time: The algorithm answers ray-shooting queries in $O(\log n)$ time.
- Efficient Preprocessing: The data structure is constructed in $O(n \log n)$ time.
- Linear Space: Through a "tree-pruning" technique that removes the lowest levels of the hierarchy, the authors compressed the data structure to $O(n)$ space without sacrificing query speed.
- Generalization: The method extends to finding all $k$ intersections of a line segment with a polygon in $O((k+1) \log(n/(k+1)))$ time.
Conclusion and Impact
As a theoretical milestone, this paper proved that the "impossible" $O(\log n)$ query time was achievable for simple polygons. While the combination of fractional cascading and dual-plane geometry makes the algorithm complex to implement, its mathematical rigor provided the foundation for subsequent advancements in spatial data structures. The paper remains a landmark in computational geometry for its elegant synthesis of disparate algorithmic tricks into a single, optimal solution.
Summary updated