1 / 119

Geometric Algorithms

Geometric Algorithms. Suman Sourav Paramasiven Appavoo Anuja Meetoo Appavoo Li Jing Lu Bingxin Suhendry Effendy Dumitrel Loghin. Introduction & Motivation. Suman Sourav. Introduction.

stormy
Download Presentation

Geometric Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Geometric Algorithms Suman Sourav Paramasiven Appavoo Anuja Meetoo Appavoo Li Jing Lu Bingxin Suhendry Effendy Dumitrel Loghin

  2. Introduction & Motivation Suman Sourav

  3. Introduction • Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry. • Deep connections with classical mathematics and theoretical computer science on the one hand, and many ties with applications on the other. • Focus is on discrete nature of geometric problems as opposed to continuous issues.

  4. Introduction • Any problem that is to be solved using a digital computer has to be discrete in form. • For CG techniques to be applied to areas that involves continuous issues, discrete approximations to continuous curves or surfaces are needed. • People deal more with straight or flat objects or simple curved objects, than with high degree algebraic curves.

  5. Introduction • Programming in CG is a little difficult. Libraries like LEDA and CGAL implement various data structures and geometric algorithms. • CG algorithms suffer from the curse of degeneracies. So, certain simplifying assumptions at times like no three points are collinear, no four points are cocircular, etc are needed to be made.

  6. Motivation & Application There are many areas that give rise to geometric problems. • Computer graphics • Computer vision and image processing • Robotics • Computer-aided designing (CAD) • Geographic information systems (GIS) • Telecommunication • VLSI design (chip layout)

  7. Example To find the nearest phone booth on campus

  8. Example The motion planning problem

  9. Example To build a model of the terrain surface, we can start with a number of sample points where we know the height.

  10. How do we interpolate the height at other points? • Nearest neighbor interpolation • Piecewise linear interpolation by a triangulation • Moving windows interpolation • Natural neighbor interpolation

  11. For interpolation, it is good if triangles are not long and skinny.

  12. Example • Each time you click inside • the editing area of a diagram • or inside a web page, • the application must know • inside which object • the mouse pointer is. • Given the high frequency of such a query, a fast algorithm must be used.

  13. Facility location • Given a set of houses and farms • in an isolated area. Can we place • a helicopter ambulance post so • that each house and farm can be • reached within 15 minutes? • Where should we place an • antenna so that a number of • locations have maximum • Reception?

  14. Art gallery problem How many cameras are needed to guard a given art gallery so that every point is seen?

  15. A Real Life Application

  16. Voronoi Voronoi diagram - Properties - Construction methods Fortune’s Algorithm - How does it work? - Implementation aspects - Data structures - Pseudocode - Complexity (time & space) Paramasiven Appavoo & Anuja Meetoo Appavoo

  17. Voronoi diagram Properties • Voronoi edges: Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj. • Voronoi vertices: It is the center of the circle passing through these sites, and this circle contains no other sites in its interior. • Degree: If we assume that no four points are cocircular, then the vertices of the Voronoi diagram all have degree three.

  18. Voronoi diagram Properties • Convex hull: A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull. • Size: If n denotes the number of sites, then the Voronoi diagram is a planar graph (if we imagine all the unbounded edges as going to a common vertex infinity) with exactly n faces.

  19. Voronoi Construction methods • Perpendicular bisector • Divide and conquer • Fortune’s algo

  20. Voronoi Fortune’s algo • Time complexity of “perpendicular bisector” • Extra computation at the merge of “divide and conquer” • Steven Fortune developed a plane sweep algorithm called the “fortune’s algorithm” that uses: • a sweep line, • a beach line, • site event, and • circle event to generate the diagrams Steven Fortune, Bell Laboratories

  21. Fortune’s Algo

  22. Fortune’s algo - Concepts Sweep line • The idea behind algorithms of this type is to imagine that a line is swept or moved across the plane, stopping at some points. • A sweep line splits the problem domain into two regions, an explored region and an unexplored region • Operations are restricted to objects that are either intersecting or are in the immediate vicinity of the sweep line whenever it stops • The complete solution is available once the line has passed over all objects. • It also applies an ordering • to the problem

  23. Fortune’s algo - Concepts Site events • A site event happens when the sweep line hits a site • Property of the line perpendicular to the sweep line at the site event • All points are equidistant to: • The site • The closest point on the sweep line (the site itself, at this stage) site event What happens when the sweep line moves further away?

  24. Fortune’s algo - Concepts What happens… • The set of points that are equidistant to both the site and the closest point on the sweep line degenerate from a line to form a parabola... The parabola defines the set of points... Set of points that belong to this site’s voronoi cell Important property implying that the cross section of such parabolas, from a number of sites will define the edges of a voronoi cell.. Why are we doing this?

  25. Fortune’s algo - Concepts 2 sites - Crossing parabolas… • p1 and p2 are two sites… • At the site event of p2, point q is equidistant from p1 and p2 • As the sweep line goes down, the intersection of the parabolas, breakpoints, are the endpoints for a partial edge... P1 P2 part of voronoi diagram’s edge q P1 P1 breakpoints P2 site event

  26. Fortune’s algo - Concepts More sites… & beach line • This dividing line is termed the beach line • The algorithm for computing the Voronoi diagram of a set of points depends entirely on how this beach line changes as the sweep moves through the space. • The beach line’s topology changes when a new arc is added or another is absorbed. parts of the edges of the voronoi diagrams... breakpoints What is the stopping condition for an edge’s growth?

  27. Fortune’s algo - Concepts Circle event... • One endpoint is formed with a circle event • a vertex in the voronoi diagram. • Each relating site is equidistant from the vertex. • Vertex is the centre of a circle on which the three points lie Either by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle vertex circle event

  28. Fortune’s algo - Concepts From the vertex... If a circumcircle is empty in its interior then, in a Voronoi diagram: • a, b, c would be Voronoi sites • q would be a Voronoi vertex • The perpendicular bisectors of abc would be Voronoi edges. vertex q a c b Now… from the vertex...

  29. Fortune’s algo Implementation Aspects... • Parabolas defining beach line not computed as sweep line moves through the problem space • Computationally expensive and unnecessary • Calculations required only when the beach line changes topology • Site events • Circle events • Sweep line makes discrete steps, rather than a continuous sweep

  30. Fortune’s algo Data Structures • Priority queue • State of sweep line • Indicates when topology of beach line can change • Site events • Circle events • Doubly connected edge list (DCEL) • State of Voronoi diagram • Stores • Vertex records • Edge records • Face records • Balanced binary search tree( AVL or red-black tree) • State of beach line

  31. Fortune’s algo Priority Queue of Events • Priority based on their y-coordinates • Site events are represented by their coordinates • Circle events • Computed on the fly • Represented by coordinates of lowest point of empty circle touching 3 sites • “Anticipated” and may be false s1 (x1, y1) s2 (x2, y2) s3 (x3, y3) s5 (x5, y5) s4 (x4, y4) c1 (x, y) circle event added to queue

  32. Fortune’s algo DCEL Vertex records Edge records Face records

  33. Fortune’s algo Balanced Binary Search Tree • Internal nodes • Represent breakpoints between two arcs (tuple) • Contains pointer to record of edge being traced • Leaf nodes • Stores site defining arc on beach line • Contains a pointer to a potential circle event

  34. Fortune’s algo Pseudocode • Initialise data structures Event queue, Q ← all site events Binary search tree, T←∅ DCEL, D ←∅ • while(queue not empty) • event = pop first event from queue • process(event, T, D) • finish all edges in binary search tree How to process site event? - Add the event and breakpoints to BST - Add new edge in DCEL - Delete false alarms for circle events - Add potential circle event(s) to queue How to process circle event? - Update breakpoints and leaf in BST - Record new vertex - Delete false alarms - Add possible circle event to queue

  35. Fortune’s algo Processing Site Event • Locate existing arc (if any) that is above the new site • x-coordinate of new site is used for binary search • x-coordinate of each breakpoint along root to leaf pathis computed on the fly s5 s4 Q

  36. Fortune’s algo Processing Site Event • Break the arc • Replace the leaf node with a sub tree representing the new arc and its breakpoints Different arcs can be identified by the same site!!! s4 Q

  37. Fortune’s algo Processing Site Event • Add new edge record in DCEL • Create new face record with pointer to new edge New half-edge record s4 Q

  38. Fortune’s algo Processing Site Event • Check for potential circle events • Scan for triple of consecutive arcs and determine if breakpoints converge Add potential circle event to to priority queue!!! Store a pointer to circle event in leaf node for s1!!! Potential circle event c1 s4 Q

  39. Fortune’s algo Processing Site Event • Converging breakpoints may not always yield a circle event • Appearance of a new site before the circle event makes the potential circle non-empty Original circle event becomes a false alarm!

  40. Fortune’s algo Processing Circle Event • Create new vertex record • Add vertex to corresponding edge record • Delete disappearing arc s4 Q

  41. Fortune’s algo Processing Circle Event • Delete disappearing arc s4 Q

  42. Fortune’s algo Processing Circle Event s4 Q

  43. Fortune’s algo Processing Circle Event • Create new edge record New half-edge record • Check new triple edges for potential circle events New edge being traced by new breakpoint<s5, s3>

  44. Fortune’s algo Algorithm Termination • When Q is empty, beach line and its breakpoints continue to trace edges • Terminate “half-infinite” edges via a bounding box

  45. O(log n) O(1) O(1) O(log n) Fortune’s algo Complexity • Locate leaf representing existing arc above new site • Delete potential circle event from queue • Break arc by replacing leaf node with a sub tree representing new arc and break points • Add new edge and face records to DCEL • Check for potential circle event(s) • Add event to queue if they exist • Store pointer to event in proper leaf Steps in handling site events Running Time

  46. O(log n) O(1) O(1) O(1) Fortune’s algo Complexity • Delete disappearing BST leaf node and its associated circle events from event queue • Add vertex record in DCEL • Create new edge record in DCEL • Check for potential circle event(s) Steps in handling circle events Running Time

  47. Fortune’s algo Complexity • Time complexity for each event: O(log n) • How many events are there? • Number of site events + Number of circle events • How many site events? • n • How many circle events? • Each circle event corresponds to a vertex • 2n - 5 (Euler’s formula) • False alarms deleted before they are processed • Total number of events = 3n - 5 • Overall running time: O(n log n) • Storage complexity: O(n)

  48. Delaunay Triangulation •Delaunay and Voronoi •Delaunay properties •Randomized Algorithm - Idea - Implementation aspects - Pseudocode - Data structure - Complexity (time & space) Li Jing & Lu Bingxin

  49. Delaunay and Voronoi An intuitive conception General position assumption: no 4 points are co-circular (a) Voronoi diagram (b) Delaunay triangulation

  50. Delaunay and Voronoi Delaunay and Voronoi complexes are dual to each other Dual correspondence Voronoi complexes Delaunay triangulation cells (regions) vertices edges edges vertices faces

More Related