4. Computational geometry

Brock University
COSC 3P98 Computer Graphics
Instructor: Brian J. Ross



B. Convex Hull: divide and conquer ("Quick Hull")

Quick_Hull_Top (P; P1, P2): { set of points P, points P1, P2}

   Find point with maximum d value >= 0 from line (P1, P2) 
     - if no point exists with d > 0,  
     then find one with d=0 that lays between P1 and P2 
    (use distance between points to determine if between)
   --> call it Pmax

   if no such point 
      then add edge (P1, P2) to convex hull

      else recurse: { 
         Quick_Hull_Top(P; P1, Pmax)
         Quick_Hull_Top(P; Pmax, P2)
}
P1 = (a point with minimum X coord),
P2 = (a point with maximum X coord)
Quick_Hull_Top(P; P1, P2)
Quick_Hull_Bottom(P; P1, P2)


B. Trisection Triangulation Algorithm (divide & conquer)

  1. Compute convex hull for points P
  2. Take a random interior point Q, and divide the hull polygon into triangles
  3. For each triangle Ti created:


B. Trisection (cont)


C. Triangulation cleanup algorithm


Example screendumps


Trisection algorithm complexity


Triangulating a simple polygon


Application to 3D geometry


Voronoi diagrams


References:



Back to COSC 3P98 index

COSC 3P98 Computer Graphics
Brock University
Dept of Computer Science
Copyright © 2007 Brian J. Ross (Except noted figures).
http://www.cosc.brocku.ca/Offerings/3P98/course/lectures/comp_geom/
Last updated: March 1, 2010