Title: COT 5520 Computational Geometry, Lecture notes
1 Point location by Triangle refinement method
Triangle refinement method
2Geometric Search, Point location, Triangle
refinement method
Triangulating G, part 1 We assume that the PSLG
given in the point location problem is a
triangulation if not, it is transformed into
one in O(NlogN) time using O(N) storage.
Chazelle published an O(N) triangulation
algorithm in 1991 if you want to use that. We
futher assume that the triangulation has a
triangular boundary. If not, one can be added in
O(1) time by adding three vertices and
triangulating the inbetween region.
3Geometric Search, Point location, Triangle
refinement method
Hereinafter, we assume 1. G is a
triangulation 2. G has a triangular boundary 3.
G has exactly 3N - 6 edges (? O(N)) Though this
triangulated G is not the PSLG we started
with, we will call it G, and say it has N
vertices.
4- Sequence of triangulations
- We have triangulation G with N vertices.
Construct a sequence of - triangulations S1, S2, ..., Sh(N), where S1 G
and Si is obtained from - Si-1 as follows
- Remove a maximal independent set of non-boundary
vertices - of Si-1and their incident edges. ( A set of
vertices of a graph (in our - case a planar graph)is said to be
independent if no two pair of - vertices are adjacent in the graph. A
maximal set is one such that - adding one more vertex will make at least
one pair of vertices to - become adjacent. How this set is chosen
will determine the - performance of the algorithm.)
- (2) Re-triangulate the polygons arising from the
removal of - vertices and edges.
- Sh(N), the final triangulation in the sequence,
has no internal vertices - it is just one triangle. In the example below,
the numbers denote - faces the set of circled vertices denote
independent set.
5Geometric Search, Point location, Triangle
refinement method
Notation The notation Rj denotes a triangle. A
triangle Rj may appear in more than one
triangulation in the sequence, but is said to
belong to triangulation Si if Rj was created in
step (2) while constructing Si. Search data
structure We now build a search data structure T,
an acyclic directed graph. The nodes of T
represent triangles. When discussing T, we say
triangle Rj or just Rj when the node of T
that represents Rj is meant. In T, there is an
arc from triangle Rk to triangle Rj if, when
constructing triangulation Si from triangulation
Si-1, we have 1. Rj is removed from Si-1 in step
(1) 2. Rk is created in Si in step (2) 3. Rj ? Rk
??? The triangles in S1 have no outgoing arcs
(they are not created). All other triangles in T
will have outgoing arcs. T is also called the
triangulation intersection graph.
6Geometric Search, Point location, Triangle
refinement method
14
8
8
13
7
19
17
11
5
10
12
9
16
18
S1
S2
6
4
15
4
2
0
3
1
S3
S4
S4
0
S3
2
3
1
S2
5
7
6
9
10
S1
15
7Geometric Search, Point location, Triangle
refinement method
Query process, informal The query process uses a
primitive operation, triangle inclusion, which
can be computed in O(1) with 3 Left tests. The
query begins by determining if the query point q
is within the enclosing triangle. If not, the
unbounded face is the answer to the query. If it
is, the current node is set to the root node of
T. Then q is tested for inclusion in the triangle
for each of the descendants of the current node
it will be in exactly one. The search advances
along the arc to that node, which becomes the
current node, and the process repeats. Eventually
the bottom of T is reached (the nodes for Si, the
original triangulation of G). The triangle
corresponding to the node so reached is the
answer to the point location problem. If the
original PSLG were not triangulated, a set of
triangles located in a given face of PSLG will
represent that face.
8Geometric Search, Point location, Triangle
refinement method
8
7
5
10
9
S1
S2
6
4
2
0
3
1
S3
S4
Query starts here
S4
0
S3
2
3
1
S2
5
7
6
9
10
S1
15
9Geometric Search, Point location, Triangle
refinement method
Query process Define ?(v) to be a list of all
descendants of node v of T, and TRIANGLE(v) to be
the triangle represented by node v. 1 procedure
PointLocation(T,q) 2 begin 3 if (q ??
TRIANGLE(root(T))) 4 q in unbounded
face 5 else 6 v root(T) 7 while (?(v)
???) 8 for each u ? ?(v) 9 if (q ?
TRIANGLE(u)) 10 v u / See comment below.
/ 11 endif 12 endfor 13 endwhile 14 q
in face TRIANGLE(v) 15 endif 16 end For this
to work, it must be assumed that the assignment v
u at line 10 changes the list ?(v) that will be
checked in the next iteration of the for at line
8, and that the for goes to the front of the list
when that happens.
10Geometric Search, Point location, Triangle
refinement method
Query time The choice of the triangulation
vertices to be removed in constructing Si from
Si-1 determines the performance (query time and
storage) of the method. Define Ni as the number
of vertices in triangulation Si. Suppose it was
possible to choose vertices to be removed such
that these properties hold (1) Ni ?iNi-1,
with ?i ? ? lt 1 for i 2, ..., h(N). ?i lt 1 ?
Ni lt Ni-1, i.e., each successive triangulation
Si is smaller than Si-1. All are smaller than
their predecessor by at least ?. (2) Each
triangle Rj ? Si intersects at most H triangles
in Si-1, and vice versa. H will be quantified
later it is the maximum fan out in T. Property
(1) ? h(N) ? ?log1/? N? ? O(log N). For example,
? .5 ? ?log1/? N? ?log2 N?, i.e., binary
search. h(N) is the number of triangulations in
the sequence, i.e., the number of levels in
T. Because the query processes at most constant H
nodes at each of h(N) ? O(log N) levels of T,
the query time is ? O(log N). Note error in
text, p. 59, O(log N) should be ? O(log N).
11Geometric Search, Point location, Triangle
refinement method
Storage Properties (1) and (2) imply O(N)
storage required for T. Heres why Storage for
T includes storage for nodes and for
pointers. How may nodes? One per triangle in S1,
S2, ..., Sh(N). How many triangles? Si contains
Fi lt 2Ni triangles, by Eulers formula, p. 19, f
? 2v - 4. Total triangles for the sequence of
triangulations is ???N1 2?N1 2??N1 ...
2?i-1Ni ... 2?h(N)-1N1 S1 S2 S3 Si Sh(N)
?N1(1 ? ?? ... ?i-1 ... ?h(N)-1) lt
2N/(1 - ?? (N N1) ? O(N) storage for
nodes. Each node has at most H pointers, so
there is lt 2HN/(1 - ???? O(N)?storage required
for pointers.
12Geometric Search, Point location, Triangle
refinement method
Justifying the properties, part 1 Having shown
that properties (1) and (2) lead to a query time
? O(log N) and storage ? O(N), the question
remains how can the vertices to be removed when
constructing the sequence of triangulations be
selected to satisfy the properties? The
selection criteria to be used is Remove a set
of nonadjacent vertices of degree less than
K. Integer K will be given a value
momentarily. The order of selection at each
stage is not important. Procedure (1) Arbitraril
y select one vertex with degree less than K to
remove. (2) Mark its neighbors as
non-removable. (3) Continue until no unmarked
vertices remain. The criteria produces the
desired properties. For property (2) Removal of
a vertex of degree lt K ? The resulting polygon
has less than K edges. ? Each of the replaced
(removed) triangles intersects at most K - 2 ? H
new triangles. H is max fan out in T.
K 6 Removed vertex of degree 5 Removed
triangles intersect ? 3
13Geometric Search, Point location, Triangle
refinement method
Justifying the properties, part 2 To show
property (1) we use properties of planar
graphs. Eulers formula for a triangulation with
a 3 edge boundary is e 3v 6, where e is
number of edges and v is number of vertices (v
N) Assume there exist internal vertices in the
triangulation, i.e., N gt 3. ? Each boundary
vertex has degree ? 3. There are 3N - 6 edges and
each edge contributes 2 to the sum of vertex
degrees for the triangulation. ? Sum of vertex
degrees2e lt 6N. ? ? at least N/2 vertices of
degree lt 12. Let K 12. Let si be the number of
vertices selected at stage Si). Each selected
vertex may eliminate at most K - 1 11
adjacent vertices, and the three boundary
vertices are non-selectable. ? si ? ?1/12(Ni/2 -
3)? At least 1/24 are taken away. ??? ? 1 - 1/24
lt .959 lt 1, satisfying property (1).
14Geometric Search, Point location, Triangle
refinement method
Analysis Query time O(log N) Storage
O(N) Preprocessing O(N log N) or O(N)? The
steps in preprocessing consists of triangulation
of the PSLG ( takes O(NlogN) time or O(N) time
if Chazelles algorithm is used), finding
maximal independent set ( O(N) work),
re-traingulation ( takes O(N) time since each
new face created has less than 12 sides and
re-triangulation of the new polygon takes O(1)
time and we repeat this for at most the size of
the independent set lt N. The creation of the
intersection graph also takes O(N) time since
each new triangle created can intersect with
at most 11 old triangles. The computation of the
intersection of two triangles involves computing
the intersection of 6 half planes. Such a task ,
in general, takes O(nlogn) time with n half
planes but here n is fixed viz. n6. Thus,
except for the triangulation step which could
take O(nlogn), all preprocessing takes O(N)
time. This algorithm is optimum and but is not
very practical.