TU/e computational geometry introduction Mark de Berg.

Slides:



Advertisements
Similar presentations
Order-k Voronoi Diagram in the Plane
Advertisements

Computational Geometry
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Brute-Force Triangulation
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
The Divide-and-Conquer Strategy
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Convex Hulls in 3-space Jason C. Yang.
The Voronoi diagram of convex objects in the plane Menelaos Karavelas & Mariette Yvinec Dagsthul Workshop, march 2003.
3/5/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Delaunay Triangulations II Carola Wenk Based on: Computational.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
Computational Geometry and Spatial Data Mining
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
CPSC 335 Geometric Data Structures in Computer Modeling and GIS Dr. Marina L. Gavrilova Assistant Professor Dept of Comp. Science, University of Calgary,
Lecture 12 : Special Case of Hidden-Line-Elimination Computational Geometry Prof. Dr. Th. Ottmann 1 Special Cases of the Hidden Line Elimination Problem.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 4 Chapter 6: Arrangements Monday,
Special Cases of the Hidden Line Elimination Problem Computational Geometry, WS 2007/08 Lecture 16 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen,
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Delaunay Triangulation.
Hidden-Line Elimination Computational Geometry, WS 2006/07 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
1 Geometric Intersection Determining if there are intersections between graphical objects Finding all intersecting pairs Brute Force Algorithm Plane Sweep.
ADA: 14. Intro to CG1 Objective o give a non-technical overview of Computational geometry, concentrating on its main application areas Algorithm.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically.
Algorithms for Triangulations of a 3D Point Set Géza Kós Computer and Automation Research Institute Hungarian Academy of Sciences Budapest, Kende u
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
C o m p u t i n g C O N V E X H U L L S. Presentation Outline 2D Convex Hulls –Definitions and Properties –Approaches: Brute Force Gift Wrapping QuickHull.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Computational Geometry Piyush Kumar (Lecture 10: Point Location) Welcome to CIS5930.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
CMPS 3130/6130 Computational Geometry Spring 2015
1 / 41 Convex Hulls in 3-space Jason C. Yang. 2 / 41 Problem Statement Given P: set of n points in 3-space Return: –Convex hull of P: CH (P) –Smallest.
L8 - Delaunay triangulation L8 – Delaunay triangulation NGEN06(TEK230) – Algorithms in Geographical Information Systems.
Arrangements Efi Fogel Tel Aviv University. Outline Arrangements Algorithms based on Arrangements Boolean Set Operations Minkowski Sums and Polygon Offset.
UNC Chapel Hill M. C. Lin Computing Voronoi Diagram For each site p i, compute the common inter- section of the half-planes h(p i, p j ) for i  j, using.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
Lecture 15 Computational Geometry Geometry sweeping Geometric preliminaries Some basics geometry algorithms.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material.
3/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Delaunay Triangulations I Carola Wenk Based on: Computational.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
TU/e Algorithms (2IL15) – Lecture 13 1 Wrap-up lecture.
An Introduction to Computational Geometry: Arrangements and Duality Joseph S. B. Mitchell Stony Brook University Some images from [O’Rourke, Computational.
Polygon Triangulation
Computational Geometry
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry
CMPS 3130/6130 Computational Geometry Spring 2017
Orthogonal Range Searching and Kd-Trees
Chapter 7 Voronoi Diagrams
Computational Geometry
Presentation transcript:

TU/e computational geometry introduction Mark de Berg

TU/e IPA Basic Course—Algorithms introduction what is CG applications randomized incremental construction easy example: sorting a general framework applications to geometric problems and more …

TU/e Computational Geometry Computational Geometry: Area within algorithms research dealing with spatial data (points, lines, polygons, circles, spheres, curves, … )  design of efficient algorithms and data structures for spatial data  elementary operations are assumed to take O(1) time and be available focus on asymptotic running times of algorithms computing intersection point of two lines, distance between two points, etc

TU/e Map overlay land usage annual rainfall overlay

TU/e Computational Geometry example: compute all intersections in a set of line segments naïve algorithm for i = 1 to n for j =i+1 to n do if s i intersects s j then report intersection Running time: O(n 2 ) Can we do better ?

TU/e Computational geometry: applications (1) geographic information systems (GIS) Mississippi delta Memphis Arlington 30 cities: 4 30 = possibilities

TU/e Computational geometry: applications (2) computer-aided design and manufacturing (CAD/CAM) 3D model of power plant ( triangles)  motion planning  virtual walkthroughs

TU/e Computational geometry: applications (3) 3D copier surface reconstruction 3D scanner 3D printer

TU/e Computational geometry: applications (4) Other applications of surface reconstruction  digitizing cultural heritage  custom-fit products  reverse engineering

TU/e Computational geometry: applications (5)  geographic information systems  computer-aided design and manufacturing  robotics and motion planning  computer graphics and virtual reality  databases  structural computational biology  and more … age salary

TU/e Computational Geometry: algorithmic paradigms Deterministic algorithms  plane sweep  geometric divide-and-conquer Randomized algorithms  randomized incremental construction  random sampling today’s focus

TU/e EXERCISES  Let S be a set of n line segments in the plane.  Design an algorithm that decides in O (n log n) time if there are any intersections in S. Hint: Sort the endpoints on y-coordinates, and handle them in that order in a suitable manner.  Extend the algorithm so that it reports all intersections in time O ((n+k) log n), where k is the number of intersections. For the experts:  Let u (n ) be the maximum number of pairs of points at distance 1 in a set of n points in the plane. Prove that u(n) = Ω (n log n).  Let D be a set of n discs in the plane. Prove that the union complexity of D is O (n ).

TU/e Plane-sweep algorithm for line-segment intersection sweep line insert segment 1 insert segment 2 insert segment 3 insert segment 4 insert segment 5 delete segment 1 When two segments intersect, then there is a horizontal line L such that  the two segments both intersect L  they are neighbors along L Ordering along L: 1,23,1,23,1,4,23,5,1,4,213,5,4,2

TU/e Plane sweep SegmentIntersect 1.Sort the endpoints by y-coordinate. Let p 1,…,p 2n be the sorted set of endpoints. 2.Initialize empty search tree T. 3. for i = 1 to 2n 4. do { if p i is the left endpoint of a segment s 5. then Insert s into the tree T 6. else Delete s from the tree T 7. Check all pairs of segments that become neighbors along the sweep line for intersection, report if there is an intersection. } Running time ? Extension to reporting all intersections ?

TU/e COFFEE

TU/e Lecture II: Randomized incremental construction ParanoidMax (A) (* A [1..n ] is an array of n numbers *)  Randomly permute the elements in A  max := A[1]  for i := 2 to n  do if A [i ] > max  then { max := A[i ]  for j = 1 to i -1  do if A[i ] > max then error }  return max Warm-up exercise: Analyze the worst-case and expected running time of the following algorithm.

TU/e Worst-case running time Worst-case = O(1) + time for lines 2—7 = O(1) + ∑ 2≤i≤n (time for i-th iteration) = O(1) + ∑ 2≤i≤n ∑ 1≤j≤i-1 O(1) = O(1) + ∑ 2≤i≤n O(i) = O(n 2 )

TU/e Expected running time E [ looptijd ] = O(1) + E [ time for lines 2—7 ] = O(1) + E [ ∑ 2≤i≤n (time for i-th iteration) ] = O(1) + ∑ 2≤i≤n E [ time for i-th iteration ] = O(1) + ∑ 2≤i≤n { Pr [ A[i] ≤ max { A[1..i-1 ] } ] ∙ O(1) + Pr [ A[i] > max { A[1..i-1 ] } ] ∙ O(i) } = O(1) + ∑ 2≤i≤n { 1 ∙ O(1) + (1/i ) ∙ O(i) } = O(n )

TU/e EXERCISE 1.Give an algorithm that puts the elements of a given array A[1..n] into random order. Your algorithm should be such that every possible permutation is equally likely to be the result.

TU/e Sorting using Incremental Construction Input: numbers x 1,…,x n Output: partitioning of x-axis into a collection T of empty intervals defined by the input points x 3 x 1 x 5 x 4 x 2 A geometric view of sorting Incremental Construction: “Add” input points one by one, and maintain partitioning into intervals x 3 x 1 x 5 x 4 x 2

TU/e Sorting using Incremental Construction x 3 x 1 x 5 x 4 x 2 IC-Sort (S) 1.T := { [ -infty : +infty] } 2. for i := 1 to n 3. do { Find interval J in T that contains x i and remove it. 4. Determine new intervals and insert them into T. }  for each point, maintain pointer to interval that contains it  for each interval in T, maintain conflict list of all points inside list is empty list: x 4, x 5 How?

TU/e Sorting using Incremental Construction IC-Sort (S) 1.T := { [ -infty : +infty] } 2. for i := 1 to n 3. do { Find interval J in T that contains x i and remove it. 4. Determine new empty intervals and insert them into T. 5. Split conflict list of J to get the two new conflict lists. }  for each point, maintain pointer to interval that contains it  for each interval in T, maintain conflict list of all points inside TOTAL TIME: O ( total size of conflict lists of all intervals that ever appear) WORST-CASE: Time analysis: O(n 2 )

TU/e Sorting using Incremental Construction RIC-Sort (S) 1.Randomly permute input points 2.T := { [ -infty : +infty] } 3. for i := 1 to n 4. do { Find interval J in T that contains x i and remove it. 5. Determine new empty intervals and insert them into T. 6. Split conflict list of J to get the two new conflict lists. }  for each point, maintain pointer to interval that contains it  for each interval in T, maintain conflict list of all points inside TOTAL TIME: O ( total size of conflict lists of all intervals that are created) EXPECTED TIME: ?? Time analysis:

TU/e An abstract framework for RIC S = set of n (geometric) objects; the input C = set of configurations D: assigns a defining set D(Δ) S to every configuration Δ є C K: assigns a killing set K(Δ) S to every configuration Δ є C 4-tuple (S, C, D, K) is called a configuration space configuration Δ є C is active over a subset S’ S if: D(Δ) S’ and K(Δ) S’ = o T(S) = active configurations over S; the output ∩ ∩ ∩ ∩ ∩ /

TU/e Sorting using Incremental Construction RIC(S) 1.Compute random permutation x 1,…x n of input elements 2.T := { active configurations over empty set } 3. for i := 1 to n 4. do { Remove all configurations Δ with x i є K(Δ) from T. 5. Determine new active configurations; insert them into T. 6. Construct conflict lists of new active configurations. }  for each x i, maintain pointers to all configurations Δ such that x i є K(Δ)  for each configuration Δ in T, maintain conflict list of all x i є K(Δ) Theorem: Expected total size of conflict lists of all created configs: O( ∑ 1≤i≤n (n / i 2 ) ∙ E [ # active configurations in step i ] )

TU/e EXERCISE 1.Use the theorem to prove that the running time of the RIC algorithm for sorting runs in O( n log n ) time.

TU/e LUNCH

TU/e Lecture III RIC: more applications Voronoi diagrams and Delaunay triangulations

TU/e Principia Philosophiae (R. Descartes, 1644). Voronoi diagram The universe according to Descartes

TU/e Construction of 3D height models (1)

TU/e height? Construction of 3D height models (2)

TU/e Construction of 3D height models (3) Better: use interpolation to determine the height triangulation 983

TU/e Construction of 3D height models (4) long and thin triangles are bad  try to avoid small angles What is a good triangulation?

TU/e Construction of 3D height models (5) Voronoi diagram Delaunay triangulation: triangulation that maximizes the minimum angle !

TU/e Voronoi diagrams and Delaunay triangulations P : n points (sites) in the plane V(p i ) = Voronoi cell of site p i = { q є R 2 : dist(q,p i ) < dist(q,p j ) for all j ≠i } Vor(P ) = Voronoi diagram of P = subdivision induced by Voronoi cells DT(P) = Delaunay triangulation of P = dual graph of Vor(P)

TU/e EXERCISES  Prove: a triangle p i p j p k is a triangle in DT(P) if and only if its circumcircle C (p i p j p k ) does not contain any other site  Prove: number of triangles in DT(P) is at most 2n-5 Hint: Euler’s formula for connected planar graphs: #vertices — #edges + #faces = 2  Design and analyze a randomized incremental algorithm to construct DT(P).

TU/e COFFEE

TU/e RIC – Limitations of the framework Robot motion planning What is the region that is reachable for the robot? Lecture IV: wrap-up

TU/e RIC – Limitations of the framework (cont’d) The single-cell problem: Compute cell containing the origin Idea: compute vertical decomposition for the cell using RIC ?!

TU/e Spatial data structures  store geometric data in 2-, 3- or higher dimensional space such that certain queries can be answered efficiently  applications: GIS, graphics and virtual reality, … Examples:  range searching  nearest-neighbor searching  point location more computational geometry

TU/e  plane sweep  parametric search  arrangements  geometric duality, inversion, Plücker coordinates, …  kinetic data structures  core sets  Davenport-Schinzel sequences  … and more …