Trajectory Visibility at First Sight
Abstract
Let $P$ be a simple polygon with $n$ vertices, and let two moving entities $q(t)$ and $r(t)$ travel at constant (possibly distinct) speeds $v_q$ and $v_r$ along line-segment trajectories $τ_q$ and $τ_r$ inside $P$. We study the first-visibility time $ 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)$ and $r(t)$ lies entirely within $P$. 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)$ time. For a stationary entity and a moving one, they gave a data structure with ${O}(n \log n)$ preprocessing time and ${O}(n)$ space that answers decision queries in ${O}(\log n)$ time. For two moving entities, after ${O}(n \log^5 n)$ preprocessing time, they built a data structure of size ${O}(n \log^5 n)$ with ${O}(n^{3/4}\log^3 n)$ query time. Variants for polygonal domains with holes or when entities cross the boundary of $P$ lie beyond our scope. In this work, we go beyond decision to compute $t^*$ exactly under three models for a simple polygon $P$. When both trajectories are fixed in advance, we preprocess $P$ in ${O}(n)$ time and space and answer each query $(v_q, v_r)$ in ${O}(\log n)$ time. If one trajectory $τ_r$ is fixed while $τ_q$ is given as a query, we build a structure in ${O}(n \log n)$ time and space that computes $t^*$ in ${O}(\log^2 n)$ time per query. When neither trajectory is known in advance, we develop a data structure with ${O}(n^{1+\varepsilon})$ expected preprocessing time and ${O}(n)$ space that achieves ${O}(n^{1/2}\,\text{polylog}(n))$ expected query time for any fixed $\varepsilon > 0$.
- Journal ref
- 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
- DOI
- 10.1007/978-981-95-7127-7_33