<s>
The	O
point	B-Data_Structure
location	I-Data_Structure
problem	I-Data_Structure
is	O
a	O
fundamental	O
topic	O
of	O
computational	O
geometry	O
.	O
</s>
<s>
It	O
finds	O
applications	O
in	O
areas	O
that	O
deal	O
with	O
processing	O
geometrical	O
data	O
:	O
computer	O
graphics	O
,	O
geographic	B-Application
information	I-Application
systems	I-Application
(	O
GIS	B-Application
)	O
,	O
motion	O
planning	O
,	O
and	O
computer	B-Application
aided	I-Application
design	I-Application
(	O
CAD	B-Application
)	O
.	O
</s>
<s>
In	O
its	O
most	O
general	O
form	O
,	O
the	O
problem	O
is	O
,	O
given	O
a	O
partition	B-Algorithm
of	I-Algorithm
the	I-Algorithm
space	I-Algorithm
into	O
disjoint	B-Algorithm
regions	O
,	O
to	O
determine	O
the	O
region	O
where	O
a	O
query	O
point	O
lies	O
.	O
</s>
<s>
As	O
an	O
example	O
application	O
,	O
each	O
time	O
one	O
clicks	O
a	O
mouse	O
to	O
follow	O
a	O
link	O
in	O
a	O
web	B-Application
browser	I-Application
,	O
this	O
problem	O
must	O
be	O
solved	O
in	O
order	O
to	O
determine	O
which	O
area	O
of	O
the	O
computer	O
screen	O
is	O
under	O
the	O
mouse	O
pointer	O
.	O
</s>
<s>
A	O
simple	O
special	O
case	O
is	O
the	O
point	O
in	O
polygon	B-General_Concept
problem	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
one	O
needs	O
to	O
determine	O
whether	O
the	O
point	O
is	O
inside	O
,	O
outside	O
,	O
or	O
on	O
the	O
boundary	O
of	O
a	O
single	O
polygon	B-General_Concept
.	O
</s>
<s>
In	O
many	O
applications	O
,	O
one	O
needs	O
to	O
determine	O
the	O
location	O
of	O
several	O
different	O
points	O
with	O
respect	O
to	O
the	O
same	O
partition	B-Algorithm
of	I-Algorithm
the	I-Algorithm
space	I-Algorithm
.	O
</s>
<s>
To	O
solve	O
this	O
problem	O
efficiently	O
,	O
it	O
is	O
useful	O
to	O
build	O
a	O
data	B-General_Concept
structure	I-General_Concept
that	O
,	O
given	O
a	O
query	O
point	O
,	O
quickly	O
determines	O
which	O
region	O
contains	O
the	O
query	O
point	O
(	O
e.g.	O
</s>
<s>
Voronoi	B-Architecture
Diagram	I-Architecture
)	O
.	O
</s>
<s>
In	O
the	O
planar	O
case	O
,	O
we	O
are	O
given	O
a	O
planar	O
subdivision	O
S	O
,	O
formed	O
by	O
multiple	O
polygons	B-General_Concept
called	O
faces	O
,	O
and	O
need	O
to	O
determine	O
which	O
face	O
contains	O
a	O
query	O
point	O
.	O
</s>
<s>
A	O
brute	B-Algorithm
force	I-Algorithm
search	I-Algorithm
of	O
each	O
face	O
using	O
the	O
point-in-polygon	O
algorithm	O
is	O
possible	O
,	O
but	O
usually	O
not	O
feasible	O
for	O
subdivisions	O
of	O
high	O
complexity	O
.	O
</s>
<s>
Several	O
different	O
approaches	O
lead	O
to	O
optimal	O
data	B-General_Concept
structures	I-General_Concept
,	O
with	O
O(n )	O
storage	O
space	O
and	O
O(log n )	O
query	O
time	O
,	O
where	O
n	O
is	O
the	O
total	O
number	O
of	O
vertices	O
in	O
S	O
.	O
For	O
simplicity	O
,	O
we	O
assume	O
that	O
the	O
planar	O
subdivision	O
is	O
contained	O
inside	O
a	O
square	O
bounding	B-Algorithm
box	I-Algorithm
.	O
</s>
<s>
The	O
simplest	O
and	O
earliest	O
data	B-General_Concept
structure	I-General_Concept
to	O
achieve	O
O(log n )	O
time	O
was	O
discovered	O
by	O
Dobkin	O
and	O
Lipton	O
in	O
1976	O
.	O
</s>
<s>
The	O
region	O
between	O
two	O
consecutive	O
segments	O
inside	O
a	O
slab	O
corresponds	O
to	O
a	O
unique	O
face	O
of	O
S	O
.	O
Therefore	O
,	O
we	O
reduce	O
our	O
point	B-Data_Structure
location	I-Data_Structure
problem	I-Data_Structure
to	O
two	O
simpler	O
problems	O
:	O
</s>
<s>
While	O
this	O
algorithm	O
allows	O
point	B-Data_Structure
location	I-Data_Structure
in	O
logarithmic	O
time	O
and	O
is	O
easy	O
to	O
implement	O
,	O
the	O
space	O
required	O
to	O
build	O
the	O
slabs	O
and	O
the	O
regions	O
contained	O
within	O
the	O
slabs	O
can	O
be	O
as	O
high	O
as	O
O(n² )	O
,	O
since	O
each	O
slab	O
can	O
cross	O
a	O
significant	O
fraction	O
of	O
the	O
segments	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
size	O
of	O
the	O
data	B-General_Concept
structure	I-General_Concept
can	O
be	O
significantly	O
reduced	O
.	O
</s>
<s>
A	O
simple	O
polygon	B-General_Concept
is	O
(	O
vertical	O
)	O
monotone	O
if	O
it	O
is	O
formed	O
by	O
two	O
monotone	O
chains	O
,	O
with	O
the	O
first	O
and	O
last	O
vertices	O
in	O
common	O
.	O
</s>
<s>
This	O
process	O
does	O
not	O
add	O
any	O
vertices	O
to	O
the	O
subdivision	O
(	O
therefore	O
,	O
the	O
size	O
remains	O
O(n )	O
)	O
,	O
and	O
can	O
be	O
performed	O
in	O
O(n log n )	O
time	O
by	O
plane	B-Algorithm
sweep	I-Algorithm
(	O
it	O
can	O
also	O
be	O
performed	O
in	O
linear	O
time	O
,	O
using	O
polygon	B-Algorithm
triangulation	I-Algorithm
)	O
.	O
</s>
<s>
Therefore	O
,	O
there	O
is	O
no	O
loss	O
of	O
generality	O
,	O
if	O
we	O
restrict	O
our	O
data	B-General_Concept
structure	I-General_Concept
to	O
the	O
case	O
of	O
monotone	O
subdivisions	O
,	O
as	O
we	O
do	O
in	O
this	O
section	O
.	O
</s>
<s>
Edelsbrunner	O
,	O
Guibas	O
,	O
and	O
Stolfi	O
discovered	O
an	O
optimal	O
data	B-General_Concept
structure	I-General_Concept
that	O
only	O
uses	O
the	O
edges	O
in	O
a	O
monotone	O
subdivision	O
.	O
</s>
<s>
Converting	O
this	O
general	O
idea	O
to	O
an	O
actual	O
efficient	O
data	B-General_Concept
structure	I-General_Concept
is	O
not	O
a	O
simple	O
task	O
.	O
</s>
<s>
As	O
we	O
need	O
to	O
perform	O
another	O
nested	O
binary	O
search	O
through	O
O(log n )	O
chains	O
to	O
actually	O
determine	O
the	O
point	B-Data_Structure
location	I-Data_Structure
,	O
the	O
query	O
time	O
is	O
O(log² n )	O
.	O
</s>
<s>
To	O
achieve	O
O(log n )	O
query	O
time	O
,	O
we	O
need	O
to	O
use	O
fractional	B-Data_Structure
cascading	I-Data_Structure
,	O
keeping	O
pointers	O
between	O
the	O
edges	O
of	O
different	O
monotone	O
chains	O
.	O
</s>
<s>
A	O
polygon	B-General_Concept
with	O
m	O
vertices	O
can	O
be	O
partitioned	O
into	O
m	O
–	O
2	O
triangles	O
.	O
</s>
<s>
There	O
are	O
numerous	O
algorithms	O
to	O
triangulate	B-Algorithm
a	I-Algorithm
polygon	I-Algorithm
efficiently	O
,	O
the	O
fastest	O
having	O
O(n )	O
worst	O
case	O
time	O
.	O
</s>
<s>
Therefore	O
,	O
we	O
can	O
decompose	O
each	O
polygon	B-General_Concept
of	O
our	O
subdivision	O
in	O
triangles	O
,	O
and	O
restrict	O
our	O
data	B-General_Concept
structure	I-General_Concept
to	O
the	O
case	O
of	O
subdivisions	O
formed	O
exclusively	O
by	O
triangles	O
.	O
</s>
<s>
Kirkpatrick	O
gives	O
a	O
data	B-General_Concept
structure	I-General_Concept
for	O
point	B-Data_Structure
location	I-Data_Structure
in	O
triangulated	O
subdivisions	O
with	O
O(n )	O
storage	O
space	O
and	O
O(log n )	O
query	O
time	O
.	O
</s>
<s>
The	O
data	B-General_Concept
structure	I-General_Concept
is	O
built	O
in	O
the	O
opposite	O
order	O
,	O
that	O
is	O
,	O
bottom-up	O
.	O
</s>
<s>
A	O
randomized	B-General_Concept
approach	O
to	O
this	O
problem	O
,	O
and	O
probably	O
the	O
most	O
practical	O
one	O
,	O
is	O
based	O
on	O
trapezoidal	O
decomposition	O
,	O
or	O
trapezoidal	O
map	O
.	O
</s>
<s>
It	O
is	O
not	O
easy	O
to	O
see	O
how	O
to	O
use	O
a	O
trapezoidal	O
decomposition	O
for	O
point	B-Data_Structure
location	I-Data_Structure
,	O
since	O
a	O
binary	O
search	O
similar	O
to	O
the	O
one	O
used	O
in	O
the	O
slab	O
decomposition	O
can	O
no	O
longer	O
be	O
performed	O
.	O
</s>
<s>
Instead	O
,	O
we	O
need	O
to	O
answer	O
a	O
query	O
in	O
the	O
same	O
fashion	O
as	O
the	O
triangulation	O
refinement	O
approach	O
,	O
but	O
the	O
data	B-General_Concept
structure	I-General_Concept
is	O
constructed	O
top-down	O
.	O
</s>
<s>
Initially	O
,	O
we	O
build	O
a	O
trapezoidal	O
decomposition	O
containing	O
only	O
the	O
bounding	B-Algorithm
box	I-Algorithm
,	O
and	O
no	O
internal	O
vertex	O
.	O
</s>
<s>
The	O
expected	O
depth	O
of	O
a	O
search	O
in	O
this	O
digraph	O
,	O
starting	O
from	O
the	O
vertex	O
corresponding	O
to	O
the	O
bounding	B-Algorithm
box	I-Algorithm
,	O
is	O
O(log n )	O
.	O
</s>
<s>
There	O
are	O
no	O
known	O
general	O
point	B-Data_Structure
location	I-Data_Structure
data	B-General_Concept
structures	I-General_Concept
with	O
linear	O
space	O
and	O
logarithmic	O
query	O
time	O
for	O
dimensions	O
greater	O
than	O
2	O
.	O
</s>
<s>
In	O
three-dimensional	O
space	O
,	O
it	O
is	O
possible	O
to	O
answer	O
point	B-Data_Structure
location	I-Data_Structure
queries	O
in	O
O(log² n )	O
using	O
O(n log n )	O
space	O
.	O
</s>
<s>
The	O
general	O
idea	O
is	O
to	O
maintain	O
several	O
planar	O
point	B-Data_Structure
location	I-Data_Structure
data	B-General_Concept
structures	I-General_Concept
,	O
corresponding	O
to	O
the	O
intersection	O
of	O
the	O
subdivision	O
with	O
n	O
parallel	O
planes	O
that	O
contain	O
each	O
subdivision	O
vertex	O
.	O
</s>
<s>
In	O
the	O
same	O
fashion	O
as	O
in	O
the	O
slab	O
decomposition	O
,	O
the	O
similarity	O
between	O
consecutive	O
data	B-General_Concept
structures	I-General_Concept
can	O
be	O
exploited	O
in	O
order	O
to	O
reduce	O
the	O
storage	O
space	O
to	O
O(n log n )	O
,	O
but	O
the	O
query	O
time	O
increases	O
to	O
O(log² n )	O
.	O
</s>
<s>
In	O
d-dimensional	O
space	O
,	O
point	B-Data_Structure
location	I-Data_Structure
can	O
be	O
solved	O
by	O
recursively	O
projecting	O
the	O
faces	O
into	O
a	O
(	O
d-1	O
)	O
-dimensional	O
space	O
.	O
</s>
<s>
The	O
high	O
complexity	O
of	O
the	O
d-dimensional	O
data	B-General_Concept
structures	I-General_Concept
led	O
to	O
the	O
study	O
of	O
special	O
types	O
of	O
subdivision	O
.	O
</s>
<s>
An	O
arrangement	O
of	O
n	O
hyperplanes	O
defines	O
O(nd )	O
cells	O
,	O
but	O
point	B-Data_Structure
location	I-Data_Structure
can	O
be	O
performed	O
in	O
O(log n )	O
time	O
with	O
O(nd )	O
space	O
by	O
using	O
Chazelle	O
's	O
hierarchical	O
cuttings	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
point	B-Data_Structure
location	I-Data_Structure
can	O
be	O
answered	O
in	O
O(logd-1 n )	O
time	O
with	O
O(n )	O
space	O
.	O
</s>
