UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 - PowerPoint PPT Presentation

About This Presentation
Title:

UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004

Description:

Algorithms: 2D Gift Wrapping. Use one extreme edge as ... Algorithms: 3D Gift Wrapping ... Idea is extended to 3D in Chapter 4. Algorithm: 2D DIVIDE-and-CONQUER ... – PowerPoint PPT presentation

Number of Views:165
Avg rating:3.0/5.0
Slides: 22
Provided by: murrayd
Learn more at: https://www.cs.uml.edu
Category:

less

Transcript and Presenter's Notes

Title: UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004


1
UMass Lowell Computer Science 91.504 Advanced
AlgorithmsComputational Geometry Prof. Karen
Daniels Spring, 2004
  • Chapter 4 3D Convex Hulls
  • Monday, 2/23/04

2
Chapter 4 3D Convex Hulls
  • Polyhedra
  • Algorithms
  • Implementation
  • Polyhedral Boundary Representations
  • Randomized Incremental Algorithm
  • Higher Dimensions

3
Polyhedra What are they?
  • Polyhedron generalizes 2D polygon to 3D
  • Consists of flat polygonal faces
  • Boundary/surface contains
  • 0D vertices 1D edges 2D faces
  • Components intersect properly. Each face pair
  • disjoint or have vertex in common or have
    vertex/edge/vertex in common
  • Local topology is proper
  • at every point neighborhood is homeomorphic to
    disk
  • Global topology is proper
  • connected, closed, bounded
  • may have holes

polyhedra
not polyhedra!
for more examples, see http//www.ScienceU.com/geo
metry/facts/solids/handson.html
4
Polyhedra A Flawed Definition
  • Definition of Polyhedron1
  • A polyhedron1 is a region of space bounded by a
    finite set of polygons such that
  • every polygon shares at least one edge with some
    other polygon
  • every edge is shared by exactly two polygons.

polyhedra and polyhedra1?
not polyhedra and not polyhedra1?
HW Problem - What is wrong with this
definition? - Find an example of an object that
is a polyhedron1 but is not a polyhedron.
5
Polyhedra A Resource
6
Polyhedra Regular Polytopes
  • Convex polyhedra are polytopes
  • Regular polyhedra are polytopes that have
  • regular faces, faces, solid (dihedral) angles
  • There are exactly 5 regular polytopes

Excellent math references by H.S.M. Coxeter -
Introduction to Geometry (2nd edition), Wiley
Sons, 1969 - Regular Polytopes, Dover
Publications, 1973
7
Polyhedra Eulers Formula
V - E F 2
  • Proof has 3 parts
  • 1) Convert polyhedron surface to planar graph
  • 2) Tree theorem
  • 3) Proof by induction

8
Algorithms 2D Gift Wrapping
  • Use one extreme edge as an anchor for finding the
    next

9
Algorithms 3D Gift Wrapping
O(n2) time output sensitive O(nF) for F faces
on hull
CxHull Animations http//www.cse.unsw.edu.au/lam
bert/java/3d/hull.html
10
Algorithms 2D Divide-and-Conquer
  • Divide-and-Conquer in a geometric setting
  • O(n) merge step is the challenge
  • Find upper and lower tangents
  • Lower tangent find rightmost pt of A leftmost
    pt of B then walk it downwards
  • Idea is extended to 3D in Chapter 4.

B
A
Algorithm 2D DIVIDE-and-CONQUER Sort points by x
coordinate Divide points into 2 sets A and B A
contains left n/2 points B contains right n/2
points Compute ConvexHull(A) and ConvexHull(B)
recursively Merge ConvexHull(A) and ConvexHull(B)
O(nlgn)
11
Algorithms 3D Divide and Conquer
O(n log n) time !
CxHull Animations http//www.cse.unsw.edu.au/lam
bert/java/3d/hull.html
12
Algorithms 2D QuickHull
  • Concentrate on points close to hull boundary
  • Named for similarity to Quicksort

13
Algorithms 3D QuickHull
CxHull Animations http//www.cse.unsw.edu.au/lam
bert/java/3d/hull.html
14
Algorithms Qhull (gt 2D )
http//www.geom.umn.edu/software/qhull/
15
Algorithms 2D Incremental
  • Add points, one at a time
  • update hull for each new point
  • Key step becomes adding a single point to an
    existing hull.
  • Idea is extended to 3D in Chapter 4.

Algorithm 2D INCREMENTAL ALGORITHM Let H2
ConvexHullp0 , p1 , p2 for k 3 to n - 1
do Hk ConvexHull Hk-1 U pk
O(n2)
can be improved to O(nlgn)
16
Algorithms 3D Incremental
  • Add points, one at a time
  • Update hull Q for each new point p
  • Case 1 p is in existing hull Q
  • Discard p
  • Case 2 p is not in existing hull Q
  • Compute cone tangent to Q whose apex is p
  • Cone consists of triangular tangent faces
  • Base of each is an edge of Q
  • Construct new hull using cone

17
Algorithms 3D Incremental
Algorithm 3D INCREMENTAL ALGORITHM Let H3
ConvexHull p0 , p1 , p2, p3
tetrahedron for i 4 to n - 1 do for each
face f of Hi-1 do compute volume of tetrahedron
determined by f and pi mark f visible iff
volume lt 0 if no faces are visible then
Discard pi (it is inside Hi-1) else
for each border edge e of Hi-1 do Construct
cone face determined by e and pi for
each visible face f do Delete f
Update Hi
O(n2)
Randomized incremental has expected O(nlgn) time.
18
Algorithms 3D Incremental
O(n2) time
CxHull Animations http//www.cse.unsw.edu.au/lam
bert/java/3d/hull.html
19
3D Visibility
  • To build our 3D visibility intuition
  • T planar triangle in 3D
  • C closed region bounded by a 3D cube
  • frequent problem in graphics

C
T
HW Problem What is the largest number of
vertices P can have for any triangle?
20
Polyhedral Boundary Representations
v7
v2
v1
e1-
v1
es twin
e1
f1
f1
v3
e
v6
e
f0
e0,1
f0
e0
e4,0
v0
v5
v0
e0-
v4
twin edge DCEL doubly connected edge list
winged edge
  • represent edge as 2 halves
  • lists vertex, face, edge/twin
  • more storage space
  • facilitates face traversal
  • can represent holes with face inner/outer edge
    pointer
  • focus is on edge
  • edge orientation is arbitrary

21
Polyhedral Boundary Representations Quad-Edge
e1,1
e0,0
  • general subdivision of oriented 2D manifold
  • edge record is part of
  • endpoint 1 list
  • endpoint 2 list
  • face A list
  • face B list
Write a Comment
User Comments (0)
About PowerShow.com