arXiv:2609.01472cs.CGSep 2026

Manuscript Offprint

arXiv:2609.01472

Efficient K-Visibility Query in Polygons

Yeganeh Bahoo, Roni Sherman

Yeganeh Bahoo 1^{1}[0000-0001-5349-4946] and Roni

Sherman 1^{1}[0009-0004-0542-3480]

Toronto Metropolitan University, Toronto, ON M5B 2K3, Canada

{bahoo,roni.sherman}@torontomu.ca

Abstract. This paper investigates k-visibility, where a line of sight can penetrate up to k obstacles. While computing the k-visibility polygon from a single query point is well-studied, existing spatial preprocessing approaches rely on full O(n2)O(n^2) line arrangements through all vertex pairs without characterizing the minimal set of topological boundaries. We present a refined cell decomposition framework that isolates the exact geometric events governing k-visibility: primary vertex horizon lines and secondary mutually critical hinge lines. We prove that this minimal set of partition lines yields a spatial decomposition of Θ(n4)\Theta(n^4) cells within which the combinatorial structure of the k-visibility polygon remains strictly invariant. By leveraging a combinatorial δ\delta-compression scheme across cell boundaries, we achieve an overall storage complexity of O(n4)\mathcal{O}(n^4) while supporting optimal O(log⁡n+m)\mathcal{O}(\log n + m) query time to reconstruct explicit k-visibility polygons of size mm. Our framework naturally extends to polygons containing holes.

1 Introduction

Given a simple polygon PP with nn vertices and an integer k≥0k \geq 0, two points p,q∈Pp, q \in P are said to be kk-visible to each other if the open line segment pq‾\overline{pq} intersects the boundary ∂P\partial P at most kk times. The integer kk represents the visibility depth (or the number of obstacle walls penetrated). The kk-visibility polygon of a query point qq, denoted Visk(q,P)\text{Vis}_k(q, P), is the set of all points in PP that are kk-visible from qq. A central goal in computational geometry is to preprocess PP into a spatial partition called a cell decomposition—a division of PP into open, connected regions (cells) such that as a query point qq moves within a single cell, the combinatorial structure of its visibility polygon Visk(q,P)\text{Vis}_k(q, P) remains invariant. Such decompositions allow efficient point-location query data structures to report Visk(q,P)\text{Vis}_k(q, P) for any query point qq.

Computing the visibility region of a point within a geometric domain is a classic problem in computational geometry, with foundational linear-time algorithms established for standard 0-visibility in simple polygons with n vertices [13, 11]. Several algorithms have been proposed to calculate the k-visibility polygon of

We acknowledge the support of the Natural Sciences and Engineering Research Council of Canada (NSERC).

Y. Bahoo et al.

a point—the region visible when allowing up to kk obstacle intersections—from scratch, including an initial O(n2)O(n^{2}) time framework by Martins et al. [10], an O(nlog⁡n)O(n\log n) approach, and an asymptotically faster parameterized algorithm by Bahoo et al [4]. Complementary research investigated time-space trade-offs under severe memory constraints [3]. Efficient query data structures for 0-visibility have also seen significant development. Early methods achieved O(log⁡n+m)O(\log n + m) query time—where mm is the number of vertices in the reported visibility region—with O(n3)O(n^{3}) space [9], while recent advancements utilize O(n2+ϵ)O(n^{2+\epsilon}) space to optimize visibility queries [8]. In dynamic settings, extensive research has targeted kinetic visibility algorithms [2]. Concurrently, generalized kk-cell decompositions have been studied to track shadow transitions and prevent the split or merge of unseen regions in pursuit-evasion games [6, 7]. While these structures share the goal of partitioning the domain into invariant visibility regions, key technical differences exist: the framework in [6] introduces redundant partition lines, whereas the exact decomposition in [7] focuses specifically on shadow-level events for shadows defined strictly within PP. In contrast, our new decomposition explicitly tracks boundaries where the generating tuples of the visibility windows change and accounts for shadows defined outside of PP as well, yielding a tight, non-redundant cell arrangement tailored for exact point-location queries. This decomposition also takes into account windows of the kk and k−2k-2 visibility polygons of vertices.

Beyond theoretical exploration, k-visibility structures have gained significant traction in modern applications, most notably in solving the wireless k-modem or illumination problem, where guards act as transmitters capable of penetrating up to k walls [1]. Furthermore, recent developments have leveraged inverse k-visibility for real-time RSSI-based indoor geometric mapping and autonomous path-planning [14, 15]. k-visibility has also been recently studied in relation to M-guarding [5].

While k-visibility query structures exist, constructing a tight, minimal cell decomposition without redundant partition boundaries remains unresolved. In their work exploring static structures, Bahoo et al. [4] proposed a data structure requiring O(n5)O(n^{5}) space to support k-visibility queries. However, their model relies on a global, unrefined arrangement formed by extending lines through all (n2)\binom{n}{2} pairs of vertices. While this guarantees topological completeness, it creates an oversized O(n4)O(n^{4})-cell arrangement populated by redundant, spurious boundaries where no actual visibility changes occur. Post-merging these cells is computationally expensive and fails to reveal the underlying structural geometry. Fully resolving this challenge requires a tight classification of the minimal spatial arrangement that triggers discrete topological mutations—abrupt structural changes in the combinatorial state of the k-visibility polygon that a point sees.

In this work, we generalize the cell-decomposition query framework of Bose et al. [9] and Guibas et al. [12] to k-visibility environments. We establish the minimal set of primary and secondary horizon lines required for structural invariance, directly constructing a tight arrangement of Θ(n4)\Theta(n^{4}) cells without redundant lines. Furthermore, by introducing a delta-compressed dual arrangement tree that stores only O(1)O(1) atomic mutations along tree edges, our scheme reduces total space complexity from O(n5)O(n^{5}) to O(n4)O(n^{4}) while supporting optimal O(log⁡n+m)O(\log n + m) query reconstruction time.