Skip to content

Trajectory Visibility at First Sight

Mohammad Ali Abam, Mohammad Ghodsi, Seyed Mohammad Hussein Kazemi

cs.CG

Abstract

Let PP be a simple polygon with nn vertices, and let two moving entities q(t)q(t) and r(t)r(t) travel at constant (possibly distinct) speeds vqv_q and vrv_r along line-segment trajectories τqτ_q and τrτ_r inside PP. We study the first-visibility time t∗=min⁡{ t≥0∣q(t) r(t)‾⊆P },t^* = \min\bigl\{\,t \ge 0 \mid \overline{q(t)\,r(t)} \subseteq P\,\bigr\}, the earliest moment at which the segment joining q(t)q(t) and r(t)r(t) lies entirely within PP. Prior work by Eades et al.~\cite{swat2020,eeades-phd} focused on the decision version of this question in a simple polygon. They gave a one-shot decision algorithm running in O(n){O}(n) time. For a stationary entity and a moving one, they gave a data structure with O(nlog⁡n){O}(n \log n) preprocessing time and O(n){O}(n) space that answers decision queries in O(log⁡n){O}(\log n) time. For two moving entities, after O(nlog⁡5n){O}(n \log^5 n) preprocessing time, they built a data structure of size O(nlog⁡5n){O}(n \log^5 n) with O(n3/4log⁡3n){O}(n^{3/4}\log^3 n) query time. Variants for polygonal domains with holes or when entities cross the boundary of PP lie beyond our scope. In this work, we go beyond decision to compute t∗t^* exactly under three models for a simple polygon PP. When both trajectories are fixed in advance, we preprocess PP in O(n){O}(n) time and space and answer each query (vq,vr)(v_q, v_r) in O(log⁡n){O}(\log n) time. If one trajectory τrτ_r is fixed while τqτ_q is given as a query, we build a structure in O(nlog⁡n){O}(n \log n) time and space that computes t∗t^* in O(log⁡2n){O}(\log^2 n) time per query. When neither trajectory is known in advance, we develop a data structure with O(n1+ε){O}(n^{1+\varepsilon}) expected preprocessing time and O(n){O}(n) space that achieves O(n1/2 polylog(n)){O}(n^{1/2}\,\text{polylog}(n)) expected query time for any fixed ε>0\varepsilon > 0.

Create a lesson

Metadata

Journal
Abam, M.A., Ghodsi, M., Kazemi, S.M.H. (2026). Trajectory Visibility at First Sight. In: Di Giacomo, E., Mondal, D. (eds) WALCOM: Algorithms and Computation. WALCOM 2026. Lecture Notes in Computer Science, vol 16444. Springer, Singapore