320 likes | 332 Views
Learn the algorithmic study of efficient geometric problem-solving methods. Topics include point-in-polygon tests, segment intersections, Voronoi diagrams, triangulation, sensor placements, guarding problems, shortest paths, convex hulls, collision detection, and more.
E N D
AMS 345/CSE 355 Computational Geometry Lecture 1: Introduction Joe Mitchell
Course Info • Joe Mitchell (Math 1-109) jsbm@ams.sunysb.edu (2-8366) • http://www.ams.sunysb.edu/~jsbm/courses/345/ams345.html • Texts: • Discrete and Computational Geometry by Devadoss and O’Rourke • Computational Geometry in C, by Joe O’Rourke (2nd Edition) • Grades: 40% midterm+40% final+20% hw Midterm: in class, tentatively Oct 17 Final: 5:30-6:45pm, Mon, Dec 11 Second-chance (optional): 6:45-8:00pm, Dec 11 Optional second-chance midterm: Replaces midterm score with 0.8xhigh + 0.2xlow
Homeworks • Approx 8 assignments • Tentatively due: 9/19, 9/26, 10/3, 10/10, 10/31, 11/7, 11/14, 11/21 • Submit HW on time • I drop the lowest hw score • Each student is allowed ONE slightly late HW, as long as it is submitted before solutions posted(inform me by email) • HW will be called in, near the beginning of class; you will pass it forward; do not bring it to the front of the class (unless you arrive late and then bring it at the END of class, to minimize disruption)
HW Policy You may discuss problems with other students in this class, but you must write up your hw completely on your own; if you do work with other student(s), you must declare this on the cover of your own hw, giving names of your collaborators. (Your writings must be independent: Do not look at another writeup, either of classmate or of anything you find on internet when writing your own solution. To do otherwise is a case of Academic Dishonesty and is subject to University policy through CASA
Teaching Assistants • Phil Ammirato (philammirato@gmail.com) • Office hours (in Harriman 010): Tues, 4:00-5:00; Thurs, 10:00-11:00 • Sixin Li (sixin210@hotmail.com) • Office hours (in Harriman 010): Mon, 1:30-3:30
Background • Geometry: vectors, dot/cross product • AMS301: Counting, graphs, recursion • Permutations, combinations • Planar graphs, DFS, Euler • F(n) ≤ 2F(n/2) + CnSolve: F(n)=O(n log n) • Algorithms: read/parse a C program, big-Oh notation (O(n), O(n log n),O(n2), O(n log n))
What is CG? • The algorithmic and mathematical study of efficient methods to solve geometric problems
Example 1 • Point-in-polygon test: Is point q inside simple polygon P? Naïve: O(n) per test CG: O(log n) q P n-gon Applet: O’Rourke
Example 2 • Segment intersection: Given n line segments in the plane, determine: • Does some pair intersect? (DETECT) • Compute all points of intersection (REPORT) Naïve: O(n2) Applet: CG: O(n log n) detect, O(k+n log n) report
Example 3 • Post office problem: Voronoi diagrams • http://www.cs.cornell.edu/Info/People/chew/Delaunay.html
Example 4 • Triangulation of polygons http://www.cosy.sbg.ac.at/~held/projects/triang/triang.html
Ear-Clipping Triangulation Ear-clipping applet
Example 5 • Sensor placement, “guarding”
The Problem Determine a small set of guards to see all of a given polygon P 5 guards suffice to cover P (what about 4 guards? 3?)
Vertex Guarding a Simple Polygon • Vertex guarding applet 11 yellow vertices 11 blue vertices 16 white vertices Place guards at yellow (or blue) vertices: at most n/3 vertex guards (here, n=38)
Mobile Robotic Guard Subject to: stay inside polygonal domain P Visit all visibility polygons Watchman Route Problem
Example 6 • Shortest path for a mobile robot
Basic Optimal Paths Visibility Graph Local optimality: taut string Naïve algorithm: O(n3) Better algorithms: O(n2 log n) sweep O(n2 ) duality BEST: Output-sensitive alg: O(|E|+n log n)
Visibility Graphs Shows also the topological sweep of an arrangement, animated.
Shortest Path Map Decomposition of the free space Shortest Paths go through same vertices Construct in time: O(n log n); size O(n)
Convex Hull of Points • Graham scan applet • Jarvis march applet
The 2-Box Cover Problem • Find “smallest” (tightest fitting) pair of bounding boxes • Motivation: • Best outer approximation • Bounding volume hierarchies
Bounding Volume Hierarchy BV-tree: Level 0 k-dops
BV-tree: Level 1 14-dops 6-dops 18-dops 26-dops
Large Convex Inner Approx • “Grow” k-dops from selected seed points: collision detection (QuickCD), response
Weather Avoidance Algorithms for En Route Aircraft Sector 3 Flows
Routing MaxFlow Find maximum number of air lanes through the mincut