Professional Documents
Culture Documents
09 13 05 PDF
09 13 05 PDF
Computational Geometry:
Convex Hulls
Definitions
Algorithms
Definition I
Definition I
S
p
q
Not Convex
Definition I
Definition II
Not Convex
Convex?
Not Convex
Convex?
Definition II
Outline
Definitions
Algorithms
S
p
q
Not Convex
Convex
Convex Hull
Convex Hull
Definition:
Given a finite set of points P={p1,,pn},
the convex hull of P is the smallest
convex set C such that PC.
Definition:
Given a finite set of points P={p1,,pn},
the convex hull of P is the smallest
convex set C such that PC.
p1
p1
p2
pn
p2
pn
Examples
Examples
Two Dimensions:
The convex hull of P={p1,,pn} is a set
of line segments with endpoints in P.
Three Dimensions:
The convex hull of P={p1,,pn} is a
triangle mesh with vertices in P.
p1
p2
pn
Algorithms
Algorithms
Algorithms
Algorithms
3):
Computation time is O(nsegment,
the segment
is on the convex hull
O(n) complexity tests,
for each of O(n2) edges
3):
Computation time is O(nsegment,
the segment
is on the convex hull
O(n) complexity tests,
for each of O(n2) edges
Algorithms
Gift Wrapping
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Gift Wrapping
Gift Wrapping
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Gift Wrapping
Gift Wrapping
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Gift Wrapping
Gift Wrapping
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Key Idea:
Iteratively growing edges of the convex
hull, we want to turn as little as possible.
Algorithms
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
b
c
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
b
c
b
c
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
b
c
d
a
b
c
d
Quickhull
Quickhull
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
Key Idea:
For all a,b,cP, the points contained in
abcP cannot be on the convex hull.
b
c
d
e
b
c
d
e
Algorithms
Key Idea:
Finding the convex hull of small sets is
easier than finding the hull of large ones.
Key Idea:
Finding the convex hull of small sets is
easier than finding the hull of large ones.
All we need is a fast way to merge hulls.
Merging Hulls:
Need to find the tangents joining the
hulls.
Upper Tangent
Lower Tangent
Observation:
The edge ab is a tangent if the two points
about a and the two points about b are on
the same side of ab.
Proof:
The edge ab is a tangent if the points on
both hulls are all on one side of it.
b
A
Proof:
The edge ab is a tangent if the points on
both hulls are all on one side of it.
If a and a are on the same side of ab,
then all of A must be on one side of ab.
Tangent Algorithm:
Tangent Algorithm:
Tangent Algorithm:
A
a
b
B
a
a
A
a
b
b
B
a
Tangent Algorithm:
Tangent Algorithm:
Algorithms
There are many algorithms for
computing the convex hull:
Brute Force: O(n3)
Gift Wrapping: O(n2)
Quickhull: O(nlogn) O(n2)
Divide and Conquer: O(nlogn)