6.838, Computational Geometry; Fall 2001
Point Location
Sergi Elizalde & David Pritchard
If we are given
a single map and a single query point q, there is a quick-and-easy O(n)
algorithm:
- Pick any ray going out from q
- Test the intersection of this ray with all edges
- If no intersections, q is in the unbounded outer face; otherwise look at the closest intersection to q
- Our planar subdivision can tell us which face this half-edge determines; clearly this is the same face that q is in
We can't do any
better than this for the single-shot problem.
Typical applications,
however, will want to query many points against a single graph (airplane example)
We can take advantage
of this, do some preprocessing on S and reduce the query time
significantly.