6.838, Computational Geometry; Fall 2001
Point Location
Sergi Elizalde & David Pritchard
In practice, we don’t have to apply any transformation. We get the result using lexicographic order (compare first by x-coordinate, then by y-coordinate):
The only two operations used in the algorithm were:
Decide if q lies to the left of p, to the right, or on the vertical line through p.
Decide whether q lies above, below, or on the segment with endpoints p1 and p2.
Both can be done without actually computing F. Moreover, it is equivalent to the limit of these shears as e approaches zero (from the positive side).
This modification also makes the other initial assumption unnecessary: A query point never lies on the vertical line of a point node, nor on the segment of a segment node.