AMS 345/CSE 355 Computational Geometry - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

AMS 345/CSE 355 Computational Geometry

Description:

AMS 345/CSE 355 Computational Geometry Triangulation Algorithms Joe Mitchell Some figures: [O Rourke]: Computational Geometry in C: Chap 2 Convex Decomposition ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 46
Provided by: amsSunys2
Category:

less

Transcript and Presenter's Notes

Title: AMS 345/CSE 355 Computational Geometry


1
AMS 345/CSE 355 Computational Geometry
  • Triangulation Algorithms

Joe Mitchell
Some figures ORourke Computational Geometry
in C Chap 2
2
Triangulation
  • Input Set S of n points
  • Input Other shapes
  • 3D Surfaces and solids (tetrahedralization)

Simple polygon
Planar Straight-Line Graph (PSLG)
Polygon with holes
Triangulation applet for simple polygons
3
Triangulation Theory in 2D
Also with holes
  • Thm A simple polygon has a triangulation.
  • Lem An n-gon with n?4 has a diagonal.
  • Thm Any triangulation of a simple n-gon has n-3
    diagonals, n-2 triangles.
  • Thm The dual graph is a tree.
  • Thm An n-gon with n?4 has ?2 ears.
  • Thm The triangulation graph can be 3-colored.

But, NOT true in 3D!
Proofs Induction on n.
4
Triangulating a Simple Polygon
  • Simple ear-clipping methods O(n2 )
  • Cases with simple O(n) algorithms
  • Convex polygons (trivial!)
  • Monotone polygons, monotone mountains
  • General case (even with holes!)
  • Sweep algorithm to decompose into
  • monotone mountains
  • O(n log n)
  • Best theoretical results
  • Simple polygons O(n) Chazelle90
  • Polygons with h holes O(nh log1? h), ?(nh
    log h) BC
  • Good practical method FIST Held, based on
    clever methods of ear clipping (worst-case O(n2 )
    )

fan
Not practical!
5
Lower Bound ?(nh log h)
  • ?(n) Have to read the data
  • ?(h log h) from SORTING

6
FIST Fast Industrial-Strength Triangulation
Based on ear clipping
Constrained Delaunay
Simple polygon
FIST
Works nicely also for highly degenerate and
crazy polygons
3D cycles
http//www.cosy.sbg.ac.at/held/projects/triang/tr
iang.html
7
Ear-Clipping Triangulation
Input Simple polygon P
vi1
vi-1
vi
pq is a diagonal, cutting off a single triangle
(the ear)
Naive O(n3) Smarter Keep track of ear
tip status of each vi (initialize O(n2)
) Each ear clip requires O(1) ear tip tests ( _at_
O(n) per test ) Thus, O(n2) total, worst-case
  • Ear-clipping applet

8
Triangulate
9
Ear-Clipping
  • Lemma When clipping ear wth tip vi the only ear
    tip statuses that can change are at vi-1 and
    vi1

10
(No Transcript)
11
(No Transcript)
12
Example Triangulate
13
Example Output
14
W(n2 ) Examples Exist
15
Faster Algorithm O(n log n)
  • Input PSLG of size n can enclose by a big box B
  • Step 1 Use sweep to decompose B into y-monotone
    mountains y-monotone polygons having one side
    (left/right) a single segment (the base) O(n
    log n)
  • Step 2 Triangulate each y-monotone polygon (size
    ni ) in time O(ni), for total O(n)
  • Overall O(n log n) to triangulate PSLG

16
Monotone Polygons
  • P is monotone in direction d

d
17
Monotone Polygons
  • P is monotone in direction d

18
y-Monotone Polygon
d
19
y-Monotone Polygon
d
20
Monotone Mountains
d
21
Triangulating a Monotone Mountain in O(n)
  • Ear clipping is easy!
  • Testing if vi-1 vi1 is a diagonal takes only
    O(1) time

t
vi-1
vi
vi1
vi is ear tip iff Left(vi1 , vi , vi-1 )
Just traverse vertices from top to bottom.
Test/clip ears. If an ear is clipped, re-test
the earity of the upper endpoint (vi-1 ) of the
diagonal just clipped.
monotone
b
22
Triangulating a Monotone Mountain in O(n)
23
Example
24
Triangulation in O(n log n)
  • (1) Plane sweep to get horizontal
    trapezoidalization

L
Fire bullets left/right from each vertex
SLS left-to-right ordering of segments crossed
by L (balanced binary tree) Events L hits a
vertex
Time O(n log n)
25
Trapezoidalization
26
Trapezoidalization
27
Trapezoidalization
In each case We do O(1) updates to the SLS, each
taking time O(log n), since the SLS is stored in
a balanced binary search tree.
28
Trapezoidalization
29
Triangulation in O(n log n)
  • (2) Join top vertex to bottom vertex in each
    trapezoid

Lemma Resulting pieces are monotone mountains
30
Triangulation in O(n log n)
  • (3) Triangulate each monotone mountain

Triangulate each, in time O(ni ), for total time
O(n)
Summary O(n log n) to triangulate n points or a
planar straight-line graph (PSLG)
31
Minimum-Weight Triangulation
  • MWT of a simple polygon O(n3), using dynamic
    programming
  • MWT of a polygon with holes (or of a set of
    points in the plane) is NP-hard
  • Min-Weight Steiner Triangulation allow extra
    Steiner points to be added
  • Not known to exist
  • 316-approximation known

32
Convex Decomposition
  • Partition simple polygon P into a small number of
    convex pieces

One way to do it Triangulate P
33
Convex Decomposition
  • Partition simple polygon P into a small number of
    convex pieces

Another way to do it Use diagonals to partition
P into convex polygons
34
Convex Decomposition
  • Partition simple polygon P into a small number of
    convex pieces

Another way to do it Allow Steiner points
(non-vertices) inside P. May get fewer pieces!
35
Convex Decomposition
  • Goal Partition P into a small number of convex
    pieces (convex polygons)
  • A triangulation is one possible decomposition
    into convex pieces, but it may have many more
    pieces than necessary!
  • Dynamic Programming algorithms yield optimal
    solutions for simple polygons (for both Steiner
    and non-Steiner versions), in roughly O(n3)
  • Hertel-Mehlhorn algorithm 4-approximation in
    time O(n)

O(r2n log n) without Steiner Keil85 O(nr3)
allowing Steiner Chazelle80
36
Convex Decomposition
37
Convex Decomposition
38
Optimal Convex Decomposition
  • Allowing Steiner points

39
Convex Decomposition
r6
40
Convex Decomposition
One diagonal resolves the local nonconvexities
at 2 reflex vertices at once
r6
We need at least r/2 segments to resolve all r
reflex vertices
Results in at least ceil(r/2)1 pieces
41
Hertel-Mehlhorn Algorithm
  • Start with any triangulation of simple polygon P
    (time O(n), Chazelle)
  • Remove inessential diagonals, in any order (time
    O(n), since we can test a diagonal locally in
    time O(1) to see if it is essential if we remove
    a diagonal, we only have to update the
    inessential flag of O(1) other diagonals)

42
Hertel-Mehlhorn Algorithm
  • Lemma 2.5.2 At the end of the algorithm, for
    each reflex vertex v, there can be at most 2
    diagonals essential for v

43
Hertel-Mehlhorn Algorithm
  • Theorem 2.5.3 The H-M algorithm yields a
    decomposition into at most 4OPT pieces, where
    OPT is the minimum possible number of convex
    pieces in a (Steiner) convex decomposition.

We say that the H-M Algorithm is a
4-approximation algorithm
OPEN Find a better factor than 4, which still
runs very efficiently (say, in O(n log n) or O(n)
time).
44
Hertel-Mehlhorn Algorithm
  • Proof At end, each diagonal is essential for
    some (reflex) vertex.
  • By Lemma 2.5.2, there are at most 2r diagonals
    left (since each reflex vertex is responsible
    for at most 2 diagonals)
  • Thus, the number, M, of pieces is 2r1 lt 2r4
    4OPT
  • (Since, by Theorem 2.5.1, OPT ceil(r/2)1, so
    4OPT 4ceil(r/2)42r4)

45
H-M Algorithm Example
Write a Comment
User Comments (0)
About PowerShow.com