Trajectory Visibility at First Sight
摘要
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 \(\tau _q\) and \(\tau _r\) inside P. We study the exact 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. [9, 10] focused on this question in the setting of a simple polygon. They gave a one-shot decision algorithm running in \(\mathcal {O}(n)\) time. For a stationary entity and a moving one, they suggested a structure that, after \(\mathcal {O}(n \log n)\) pre-processing, answers the decision query in \(\mathcal {O}(\log n)\) time, requiring \(\mathcal {O}(n)\) space. In addition, for moving entities, after preprocessing time of \(\mathcal {O}(n \log ^5 n)\) , they construct a data structure with \(\mathcal {O}(n^{3/4}\,\log ^3 n)\) query time and \(\mathcal {O}(n\log ^5 n)\) space. Variants for polygonal domains with holes or when entities cross the boundary of P lie beyond our scope. In this work, we go beyond the decision to compute \(t^*\) exactly under three models for a simple polygon P. When both trajectories are known in advance, we preprocess P in \(\mathcal {O}(n)\) time and space and thereafter answer each query in \(\mathcal {O}(\log n)\) time. If one trajectory \(\tau _r\) is fixed while \(\tau _q\) is given as query, we build a structure in \(\mathcal {O}(n\log n)\) time and space that computes \(t^*\) in \(\mathcal {O}(\log ^2 n)\) time per query. In a setting where the trajectories are not known in advance, we develop a randomized structure with \(\mathcal {O}(n^{1+\varepsilon })\) expected pre-processing time and \(\mathcal {O}(n)\) space, achieving an \(\mathcal {O}(n^{1/2}\, \text {polylog}(n))\) expected query time for any fixed \(\varepsilon >0\) .