6.838, Computational Geometry; Fall 2001
Point Location
Sergi Elizalde & David Pritchard
Back to the original
problem: now that we have a trapezoidal decomposition of S, how
can we determine which trapezoid our query point q lies in?
We would like
to make some kind of decision tree (DAG), composed of simple queries that we
can use to narrow down the location of q (like a binary search)
Each node of
this tree represents an individual query: it has out-degree 2, corresponding
to a yes-no question
The leaves should
point to individual trapezoids - once we hit one of these leaves we have determined
which trapezoid q is in, and thus which face q is in.
For each leaf,
we store a pointer to the face that trapezoid lies in
We will use two
kinds of queries:
- point query: does q lie to the left or the right of a given point?
- segment query: does q lie above or below a given line segment?
Although we could
accomplish what we need with just the second kind of query, the combination
of these two queries works very will with our trapezoidal map
A possible decision
tree D for the trapezoidal map T is shown below:
Result of perfmorming
a search against the point q is shown below:
Query against point p1:
It lies to the right, so query against point q1:
It lies to the left, so query against segment s1:
It lies below, so query against point p2:
It lies to the right, so query against segment s2:
It lies above, so we know q lies in trapezoid D.