geometric algorithms
DESCRIPTION
Geometric Algorithms. Suman Sourav Paramasiven Appavoo Anuja Meetoo Appavoo Li Jing Lu Bingxin Suhendry Effendy Dumitrel Loghin. Introduction & Motivation. Suman Sourav. Introduction. - PowerPoint PPT PresentationTRANSCRIPT
Geometric AlgorithmsSuman Sourav
Paramasiven AppavooAnuja Meetoo Appavoo
Li JingLu Bingxin
Suhendry EffendyDumitrel Loghin
Introduction amp Motivation
Suman Sourav
Introduction
bull Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry
bull Deep connections with classical mathematics and theoretical computer science on the one hand and many ties with applications on the other
bull Focus is on discrete nature of geometric problems as opposed to continuous issues
Introduction
bull Any problem that is to be solved using a digital computer has to be discrete in form
bull For CG techniques to be applied to areas that involves continuous issues discrete approximations to continuous curves or surfaces are needed
bull People deal more with straight or flat objects or simple curved objects than with high degree algebraic curves
Introduction
bull Programming in CG is a little difficult Libraries like LEDA and CGAL implement various data structures and geometric algorithms
bull 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
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Introduction amp Motivation
Suman Sourav
Introduction
bull Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry
bull Deep connections with classical mathematics and theoretical computer science on the one hand and many ties with applications on the other
bull Focus is on discrete nature of geometric problems as opposed to continuous issues
Introduction
bull Any problem that is to be solved using a digital computer has to be discrete in form
bull For CG techniques to be applied to areas that involves continuous issues discrete approximations to continuous curves or surfaces are needed
bull People deal more with straight or flat objects or simple curved objects than with high degree algebraic curves
Introduction
bull Programming in CG is a little difficult Libraries like LEDA and CGAL implement various data structures and geometric algorithms
bull 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
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Introduction
bull Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry
bull Deep connections with classical mathematics and theoretical computer science on the one hand and many ties with applications on the other
bull Focus is on discrete nature of geometric problems as opposed to continuous issues
Introduction
bull Any problem that is to be solved using a digital computer has to be discrete in form
bull For CG techniques to be applied to areas that involves continuous issues discrete approximations to continuous curves or surfaces are needed
bull People deal more with straight or flat objects or simple curved objects than with high degree algebraic curves
Introduction
bull Programming in CG is a little difficult Libraries like LEDA and CGAL implement various data structures and geometric algorithms
bull 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
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Introduction
bull Any problem that is to be solved using a digital computer has to be discrete in form
bull For CG techniques to be applied to areas that involves continuous issues discrete approximations to continuous curves or surfaces are needed
bull People deal more with straight or flat objects or simple curved objects than with high degree algebraic curves
Introduction
bull Programming in CG is a little difficult Libraries like LEDA and CGAL implement various data structures and geometric algorithms
bull 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
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Introduction
bull Programming in CG is a little difficult Libraries like LEDA and CGAL implement various data structures and geometric algorithms
bull 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
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Motivation amp ApplicationThere are many areas that give rise to geometric problems
bull Computer graphics
bull Computer vision and image processing
bull Robotics
bull Computer-aided designing (CAD)
bull Geographic information systems (GIS)
bull Telecommunication
bull VLSI design (chip layout)
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Example To find the nearest phone booth on campus
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Example The motion planning problem
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
ExampleTo build a model of the terrainsurface we can start with a numberof sample points where we know theheight
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
How do we interpolate the height atother points
bull Nearest neighbor interpolation
bull Piecewise linear interpolation by a triangulation
bull Moving windows interpolation
bull Natural neighbor interpolation
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
For interpolation it is good if triangles are not long and skinny
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Example
bull 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
bull Given the high frequency of such a query a fast algorithm must be used
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Facility locationbull Given a set of houses and farms
in an isolated area Can we placea helicopter ambulance post sothat each house and farm can bereached within 15 minutes
bull Where should we place anantenna so that a number oflocations have maximumReception
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Art gallery problemHow many cameras are needed to guard a given art gallery so that every point is seen
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
A Real Life Application
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Voronoi
Voronoi diagram- Properties- Construction methods
Fortunersquos Algorithm- How does it work- Implementation aspects
- Data structures- Pseudocode
- Complexity (time amp space)
Paramasiven Appavoo amp Anuja Meetoo Appavoo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
bull Voronoi edges Each point on an edge of the Voronoi diagram is equidistant from its two nearest neighbors pi and pj
bull Voronoi vertices It is the center of the circle passing through these sites and this circle contains no other sites in its interior
bull Degree If we assume that no four points are cocircular then the vertices of the Voronoi diagram all have degree three
Voronoi diagram Properties
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
bull Convex hull A cell of the Voronoi diagram is unbounded if and only if the corresponding site lies on the convex hull
bull 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
Voronoi diagram Properties
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
VoronoiConstruction methods
bull Perpendicular bisector
bull Divide and conquer
bull Fortunersquos algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
VoronoiFortunersquos algo
bull Time complexity of ldquoperpendicular bisectorrdquo
bull Extra computation at the merge of ldquodivide and conquerrdquo
bull Steven Fortune developed a plane sweep algorithm called the ldquofortunersquos algorithmrdquo that useso a sweep line o a beach line o site event ando circle eventto generate the diagrams
Steven FortuneBell Laboratories
Fortunersquos Algo
Fortunersquos Algo
Fortunersquos algo - ConceptsSweep line
bull The idea behind algorithms of this type is to imagine that a line is swept or moved across the plane stopping at some points
bull A sweep line splits the problem domain into two regions an explored region and an unexplored region
bull Operations are restricted to objects that are either intersecting or are in the immediate vicinity of the sweep line whenever it stops
bull The complete solution is available once the line has passed over all objects
bull It also applies an ordering
bull to the problem
Fortunersquos algo - ConceptsSite events
bull A site event happens when the sweep line hits a site
bull Property of the line perpendicular to the sweep line at the site evento All points are equidistant to
bull The sitebull The closest point on the sweep line (the site
itself at this stage) site event
What happens when the sweep line moves further away
Fortunersquos algo - ConceptsWhat happenshellip
bull 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 sitersquos 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
Fortunersquos algo - Concepts2 sites - Crossing parabolashellip
bull p1 and p2 are two siteshellip
bull At the site event of p2 point q is equidistant from p1 and p2
bull As the sweep line goes down the intersection of the parabolas breakpoints are the endpoints for a partial edge
P1
P2
P1
P2 site event
q
P1
breakpoints
part of voronoi diagramrsquos edge
Fortunersquos algo - ConceptsMore siteshellip amp beach line
bull This dividing line is termed the beach line
bull 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
bull The beach linersquos topology changes when a new arc is added or another is absorbed
breakpoints
parts of the edges of the voronoi diagrams
What is the stopping condition for an edgersquos growth
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo - ConceptsSite events
bull A site event happens when the sweep line hits a site
bull Property of the line perpendicular to the sweep line at the site evento All points are equidistant to
bull The sitebull The closest point on the sweep line (the site
itself at this stage) site event
What happens when the sweep line moves further away
Fortunersquos algo - ConceptsWhat happenshellip
bull 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 sitersquos 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
Fortunersquos algo - Concepts2 sites - Crossing parabolashellip
bull p1 and p2 are two siteshellip
bull At the site event of p2 point q is equidistant from p1 and p2
bull As the sweep line goes down the intersection of the parabolas breakpoints are the endpoints for a partial edge
P1
P2
P1
P2 site event
q
P1
breakpoints
part of voronoi diagramrsquos edge
Fortunersquos algo - ConceptsMore siteshellip amp beach line
bull This dividing line is termed the beach line
bull 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
bull The beach linersquos topology changes when a new arc is added or another is absorbed
breakpoints
parts of the edges of the voronoi diagrams
What is the stopping condition for an edgersquos growth
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo - ConceptsWhat happenshellip
bull 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 sitersquos 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
Fortunersquos algo - Concepts2 sites - Crossing parabolashellip
bull p1 and p2 are two siteshellip
bull At the site event of p2 point q is equidistant from p1 and p2
bull As the sweep line goes down the intersection of the parabolas breakpoints are the endpoints for a partial edge
P1
P2
P1
P2 site event
q
P1
breakpoints
part of voronoi diagramrsquos edge
Fortunersquos algo - ConceptsMore siteshellip amp beach line
bull This dividing line is termed the beach line
bull 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
bull The beach linersquos topology changes when a new arc is added or another is absorbed
breakpoints
parts of the edges of the voronoi diagrams
What is the stopping condition for an edgersquos growth
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo - Concepts2 sites - Crossing parabolashellip
bull p1 and p2 are two siteshellip
bull At the site event of p2 point q is equidistant from p1 and p2
bull As the sweep line goes down the intersection of the parabolas breakpoints are the endpoints for a partial edge
P1
P2
P1
P2 site event
q
P1
breakpoints
part of voronoi diagramrsquos edge
Fortunersquos algo - ConceptsMore siteshellip amp beach line
bull This dividing line is termed the beach line
bull 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
bull The beach linersquos topology changes when a new arc is added or another is absorbed
breakpoints
parts of the edges of the voronoi diagrams
What is the stopping condition for an edgersquos growth
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo - ConceptsMore siteshellip amp beach line
bull This dividing line is termed the beach line
bull 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
bull The beach linersquos topology changes when a new arc is added or another is absorbed
breakpoints
parts of the edges of the voronoi diagrams
What is the stopping condition for an edgersquos growth
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
bull One endpoint is formed with a circle evento a vertex in the voronoi diagram
bull Each relating site is equidistant from the vertexbull Vertex is the centre of a circle on which the three
points lieEither by cross sections of parabolas or simply by using the intersection of each or the perpendicular bisector of the inner triangle
Fortunersquos algo - ConceptsCircle event
vertex
circle event
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo - ConceptsFrom the vertex
vertex q If a circumcircle is empty in its interior then in a Voronoi diagrambull a b c would be Voronoi sitesbull q would be a Voronoi vertexbull The perpendicular bisectors of abc would be Voronoi edges
a
bc
Nowhellip from the vertex
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo Implementation Aspectsbull Parabolas defining beach line not computed as sweep
line moves through the problem spaceo Computationally expensive and unnecessaryo Calculations required only when the beach line
changes topology Site events Circle events
bull Sweep line makes discrete steps rather than a continuous sweep
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoData Structures
bull Priority queueo State of sweep lineo Indicates when topology of beach line can change
Site events Circle events
bull Doubly connected edge list (DCEL)o State of Voronoi diagramo Stores
Vertex records Edge records Face records
bull Balanced binary search tree ( AVL or red-black tree)o State of beach line
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoPriority Queue of Events
bull Priority based on their y-coordinates
bull Site events are represented by their coordinates
bull Circle events o Computed on the fly o Represented by coordinates of
lowest point of empty circle touching 3 sites
o ldquoAnticipatedrdquo 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
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoDCEL
Vertex Coordinates Incident edge
v1 (x1 y1) e12
v2 (x2 y2) e23
v8 (x8 y8) e87
Vertex records
Half edge
Source vertex
Twin Incident face
Prev edge
Next edge
e23 v2 e32 s3 e52 e37
Edge recordsFace Incident edge
s1 e32
s2 e56
Face records
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo Balanced Binary Search Tree
bullInternal nodes o Represent breakpoints between two arcs (tuple)o Contains pointer to record of edge being traced
bullLeaf nodeso Stores site defining arc on beach lineo Contains a pointer to a potential circle event
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoPseudocode
1 Initialise data structures Event queue Q larr all site events
Binary search tree TlarremptyDCEL D larrempty
2 while(queue not empty)3 event = pop first event from queue4 process(event T D)5 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
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Site Event
bull Locate existing arc (if any) that is above the new siteo x-coordinate of new site is used for binary searcho x-coordinate of each breakpoint along root to leaf
path is computed on the fly
s5 s4 Q
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Site Event
bull Break the arco Replace the leaf node with a sub tree representing
the new arc and its breakpoints
Different arcs can be identified by the same sites4 Q
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Site Event
bull Add new edge record in DCEL
bull Create new face record with pointer to new edge
New half-edge record
s4 Q
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Site Event
bull Check for potential circle eventso Scan for triple of consecutive arcs and determine if
breakpoints converge
Potential circle event
Add potential circle event to to priority queue
Store a pointer to circle event in leaf
node for s1
c1 s4 Q
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Site Event
bull Converging breakpoints may not always yield a circle evento Appearance of a new site before the circle event
makes the potential circle non-empty
Original circle event becomes a false alarm
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Circle Event
bull Create new vertex record
bull Add vertex to corresponding edge record
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Circle Event
bull Delete disappearing arc
s4 Q
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Circle Event
s4 Q
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoProcessing Circle Event
New edge being traced by new breakpointlts5 s3gt
New half-edge record
Create new edge record
Check new triple edges for potential circle events
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoAlgorithm Termination
bull When Q is empty beach line and its breakpoints continue to trace edgeso Terminate ldquohalf-infiniterdquo edges via a bounding box
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algo Complexity
bull Locate leaf representing existing arc above new siteo Delete potential circle event from queue
bull Break arc by replacing leaf node with a sub tree representing new arc and break points
bull Add new edge and face records to DCEL
bull Check for potential circle event(s) o Add event to queue if they existo Store pointer to event in proper leaf
Running Time
O(log n)
O(1)
Steps in handling site events
O(1)
O(log n)
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoComplexity
bull Delete disappearing BST leaf node and its associated circle events from event queue
bull Add vertex record in DCEL
bull Create new edge record in DCEL
bull Check for potential circle event(s)
Running TimeSteps in handling circle events
O(log n)
O(1)
O(1)
O(1)
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Fortunersquos algoComplexity
bull Time complexity for each event O(log n)bull How many events are there
o Number of site events + Number of circle eventso How many site events
no How many circle events
Each circle event corresponds to a vertex bull 2n - 5 (Eulerrsquos formula)
False alarms deleted before they are processed Total number of events = 3n - 5
bull Overall running time O(n log n)
bull Storage complexity O(n)
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Delaunay Triangulation
Li Jing amp Lu Bingxin
bullDelaunay and Voronoi
bullDelaunay properties
bullRandomized Algorithm
- Idea
- Implementation aspects- Pseudocode- Data structure
- Complexity (time amp space)
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Delaunay and VoronoiAn intuitive conception
General position assumption no 4 points are co-circular
(a) Voronoi diagram
(b) Delaunay triangulation
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Delaunay and VoronoiDelaunay and Voronoi complexes are dual to each other
Dual correspondence
Voronoi complexes Delaunay triangulation
cells (regions) vertices
edges edges
vertices faces
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Delaunay Triangulation (DT) Whatrsquos the difference
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
PropertiesCircumcircle propertyThe circumcircle of any triangle in DTS) is empty (It contains no points of S in its interior)
Proof
By general position assumption the degree of all Voronoi vertex is 3 edge vu exists
Consider S4 S1S4 is perpendicular to l and divided half by l S4 is outside the circle
In fact one definition of Delaunay Triangulation isDelaunay Triangulation is a triangulation that circumcircle of each triangle is empty
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
PropertiesEmpty circle propertyTwo points are connected by an edge in the Delanuay triangulation There is an empty circle passing through these two points
Proof Trivial from the circumcircle property
There are a series of circumcircles that pass through Si and Sj
Note down the centres of these circumcircles until they pass through another point
The track is the bound for both cell(Si) and cell(Sj)
Si Sj is an edge in the DT(S)
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Locally Delaunay edge An edge ab is locally Delaunay if
it belongs to only one triangle or it belongs to two triangles abc and abd and d lies
outside the circumcircle of abc
If an edge is locally Delaunaywe also call it legal otherwise illegal
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Delaunay LemmaIf every edge in Ts is locally Delaunay then Ts is the Delaunay triangulation of S
Proof Let x be an arbitrary point in abc
Let abc=Α0 A1 A2 hellip Ak be the sequence of triangles that intersect xp
Let di(p) = |p ndash ai|2 ndash ri2
Because the edges along xp are locally delaunay d0(p)gt d1(p)gt hellip gt dk(p)
dk(p) = 0 so d0(p)gt0
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Edge Flipping Flip all edges in a triangulation until they are all locally Delaunay edges
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Randomized Incremental Algorithm
Randomized the points as p1 p2hellip pn
Find a sufficiently large triangle that contains P
Insert p1 then p2 and finally pn
suppose we have computed DT(Pi-1)
insert pi which splits a triangle into three
perform edge flips until no illegal edge remains we have just computed DT(Pi)
Repeat the process until i = n
Discard the initial large triangle
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
First stepFind a sufficiently large triangle that contains P
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
First step
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
First step
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
insert p
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
split abc into abp bcp and acp
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
check edges ab bc and ac
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge ab is illegal flip it
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge ab is flipped into pd edge ad and bd are to be checked edge ad is legal keep it
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge bd is illegal flip it
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge bd is flipped into pe edge ed and be are legal keep them
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge bc is illegal flip it
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge bc is flipped into fp edge bf and cf are legal keep them
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge ac is illegal flip it
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
edge ac is flipped into pg no more edge to flip we are done
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
PseudocodeAlgorithm DelaunayTriangulation(P)Input a suitably shuffled (permuted uniformly at random) set of points P = (p1
p2 p3⋯ pn)Output DT(P) ( use a global DCEL to store DT(P) )1 Find a sufficiently large triangle T(p-3p-2p-1) containing P2 for i = 1 to n do3 Insert(pi)4 Endfor5 Discard the triangle T(p-3p-2p-1)
Algorithm Insert(p)Input a point p a set of point P and T = DT(P)Output DT(P u p)1 Find the triangle T(abc) of DT(P) containing p
( use conflict lists )2 Insert edges papb and pc( update conflict lists )3 SwapTest(ab)4 SwapTest(bc)5 SwapTest(ca)
Algorithm SwapTest(ab)1 if ab is an edge of the exterior face of DT(P)2 do return3 d lt- the vertex (other than ab) of the triangle adjacent to triangle T(pab) along edge ab4 if inCircle(p a b d) lt 05 do Flip edge ab for pd
( update conflict lists )6 SwapTest(ad)7 SwapTest(db)
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Conflict list Conflict --- a non-inserted point is inside a triangle in the
current triangulation
non-inserted points
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Current triangle Non-inserted points
T(p1p2p3) p7 p8
T(p4p5p6) p9
Triangles in the current Delaunay Triangulation
bi-directional pointer
Each triangle of the current triangulation --- Bucket
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time complexity
Major steps in the algorithm
Find a sufficiently large triangle
Find the triangle containing a non-inserted point
Update the triangulation
Update conflict lists
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Find a sufficiently large triangle M maximum absolute value of either x or y coordinate
of all the points in P
Time costO(1)
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Query the conflict list
Find the triangle containing a non-inserted point
Time cost for one iterationO(1)
Time cost for all the n iterationsO(n)
Non-inserted point
Current triangle
p7 T(p1p2p3)
p8 T(p1p2p3)
p9 T(p4p5p6)
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Backward analysis Imagine that the algorithm is run backwards starting
from the delaunay triangulation we have at the end
In analyzing the ith step imagine that we are deleting one of the i points in the current triangulation and then update the triangulation The work done in this case is the same as running
the algorithm forward Assume that each of the i points is equally likely to
be deleted at the ith step since the points were added randomly in the original algorithm
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time to update triangulation Consider the ith step of the algorithm
Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the whole point set P i gt3 or the set of points in DT(Pi)
Run the ith step backward (deleting a random point p in Pi ) Note that each new edge added in DT(Pi) due to the
insertion of p is incident to p
The total number of edge changes made in the triangulation for the insertion of p is proportional to the degree of p after the insertion is complete
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time to update triangulation
The total degree of the vertices in Pi is less than 6i There are at most 3i edges in DT(Pi) (planar graph)
The sum of vertex degrees is twice the number of edges in a graph
The expected degree of a random point in Pi is at most 6
The expected number of edge changes for inserting a random point p is O(1)
Summing over all the n steps the time for updating the triangulation is O(n)
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Update conflict lists Each non-inserted point is assigned to a trianglebucket
For a non-inserted point if the triangle which it lies within is destroyed we have to find another new triangle containing this non-inserted point
The expected time to update conflict lists is the expected time to rebucket non-inserted points
is proportional to the expected number of non-
inserted points required to be rebucketed
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Consider the ith step of the algorithm Pi the set of the first i points (p1 p2 p3 ⋯ pi) in the
whole point set P i gt3 or the set of points in DT(Pi) PPi the set of non-inserted points (pi+1 pi+2 pi+3 ⋯
pn)
Run the ith step backward (deleting a random point in Pi) some triangles in DT(Pi) are destroyed some points in PPi are required to be rebucketed
Rebucket points
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time to rebucket points Assume a random point p in Pi is deleted
For a random point q in PPi suppose that q is bucketed in the triangle T(abc) of DT(Pi)
If p is one of the three vertices of T(abc) T(abc) will be destroyed and q will be rebucketed
Pr (p is deleted) = 1iPr (T(abc) is destroyed) = 3iPr (q needs to be rebucketed) = 3i
The expected number of points in PPi required to be rebucketed is 3(n-i)i
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time to rebucket points Summing over all the n steps
The total expected number of non-inserted points required to be rebucketed is O(nlogn)
The expected time to update conflict lists is O(nlogn)
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Time complexitybull Major steps in the algorithm Running
time
o Find a sufficiently large triangle O(1)
o Find the triangle containing a point O(n)
o Update the triangulation O(n)
o Update conflict lists O(nlogn)
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Expected time complexity O(nlogn)
Expected space complexity O(n) DCEL Conflict list
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Trapezoidal Decomposition
Dumitrel Loghin amp Suhendry Effendy
ConceptsRandomized AlgorithmMotivation - Point LocationComplexity Analysis
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Defining the problem
bull Given a set S of n segments in the plane with no two distinct end-points having the same x coordinate (general position)
bull These segments intersect in k pointsbull There is a bounding rectangle R containing all n
segmentsbull If we draw vertical lines through each end-point or
intersection point till they intersect a segment or R we obtain a set of trapezoids T(S) which is the trapezoidal decomposition of S
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Example
p1
p2
p3 q1
q2
q3
R
k1k2
k3
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Details
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Construction Example
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Randomized Algorithm
bull Start with a random permutation S = s1 hellip sn with a bounding rectangle R and with T(S)=Oslash
bull FOR i = 1 TO n DO add segment si and update T(S)ndash Get the trapezoid which contains left end-point of si and
draw a vertical linendash Move to the right on the planar graph and get all the
intersected trapezoidsbull If the segment intersect the bottom or top segment of
the trapezoid the point is one of the k intersection points hence draw a vertical line
bull Draw a vertical line at the right end-pointndash Rescan the intersected vertical lines and trim them based
on their starting point merge the trapezoids which share the deleted line
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Point Locationbull Given a query point q find in which trapezoid it lies
bull Data structurendash DAG
internal nodes are end-points intersection points or segments leaves are trapezoids and they may be shared (in-degree of a leaf
may be more than one)ndash Can be constructed simultaneously with trapezoidal
decompositionbull Algorithm ndash key idea
ndash At step i some of the leaves (trapezoids) become internal nodes (end-points of the segment si or intersection points) and new trapezoids are added
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Point Location Example
s1
s2
p1
q2
q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7
Δ8
Δ9
Δ10
k1
q
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Point Search in DAGp1
q1
p2
Δ1
Δ4s1
q2
Δ10k1k1Δ3
s2 Δ9 Δ3 s2
Δ6 Δ5 Δ8 Δ7
s1
s2p1
q2q1
p2
Δ1 Δ4
Δ3
Δ2
Δ5
Δ6
Δ7Δ8
Δ9
Δ10
k1
q
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
Assumption
points (end of segment) are in ldquogeneral positionrdquo= no two points lies in a same vertical line= all x-coordinate are different
Later we will see how to lift this assumption
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
What is the complexity of adding one segment s
bull find the left end point of segment s
bull trace (and update) all trapezoids intersected by s
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Adding 1 Segment
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Adding 1 Segment
How to find this trapezoid
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Finding Trapezoid
How to find trapezoid which contain the left end-pointof segment s
Trapezoid Segment
T1 s5 s7
T2 s8
T3 s6 s9 s10
Segment Trapezoid
s5 T1
s6 T3
s7 T1
s8 T2
s9 T3
s10 T3
bi-directional pointercouple of ways
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Bi-directional pointer
bi-directional pointer
bull query find in O(1)
bull need to update the pointer for each changed trapezoid (only update trapezoids which are intersected by new segment s)
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Adding 1 Segment
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Adding 1 Segment
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Adding 1 Segment
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
For each segment s we need to1 find the left end-point of s2 trace intersected trapezoids3 update the trapezoids4 update the bi-directional pointers
For each trapezoid Overall
t(f) the ldquocomplexityrdquo of trapezoid fp(f) update the bi-directional pointer for trapezoid f
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Backward Analysis
Imagine the algorithm run backwards deleting segment one at a time
When we delete a segment s from Hi only trapezoids in Hi which adjacent to s will be affected
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
Since we insert (or delete in backward analysis) segment s in random order then every remaining segment is equally likely to be chosen
E(i) the expected complexity of deleting the ith segment(in backward analysis)
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Observation
Each trapezoid is adjacent to at most 4 segments(using general position assumption)
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Observation
Trapezoid can have an arbitrary number ofadjacent segments in non general position
We will dealwith this caselater
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
Each trapezoid is adjacent to at most 4 segments=
Each trapezoid appears in at most 4 segmentsrsquo adjacency list
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
= all the left endpoints of segment that have yet to be added (or have been deleted in backward analysis)
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
= proportional to the number of vertices in all decomposition
k = the number of intersection
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Complexity Analysis
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Randomized vs Deterministic
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Non General Position
How to handle non general position
bull Rotationor
bull Transformation
Shear Transformationxrsquo = x + ε y
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
SummaryVoronoi Diagrams -- Use Fortune Algorithm
Delaunay Triangulation -- Randomized Incremental Construction ndash Dual of Voronoi
Trapezoidal Decomposition -- Randomized Incremental Construction
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Conclusion
bull Widely used in various other areas
bull We use it sometimes without even realising it
bull Lot of potential of further development
bull Numerous interesting open problemshttpcompgeomcsuiucedu~jeffeopen
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
Thank You
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-
ReferencesVoronoibull Derek Johns An Optimal Algorithm for Computing 2D Voronoi Diagrams Fortunes Sweep Algorithm
Available at httpcgmcsmcgillca~mcleish644ProjectsDerekJohnsSweephtm [Accessed February 2014]
bull Dheeraj Kumar Singh Lecture 20 Voronoi Diagrams and Fortunes Algorithm Available at httpintinnoiitkgpernetincourses91wfiles37906 [Accessed February 2014]
bull Voronoi Diagrams Available at httpimaudgedu~sellaresComGeoVor2D_1ppt [Accessed February 2014]
Delaunay Triangulationbull httpwwwcsumdedu~mount754Lects754lectspdfbull httpwwwcsuunlgeobookinterpolationpdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes04pdfbull httpwwwcompnusedusg~hchengacademiccoursescs5237notes05pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl9cs4235pdfbull httpwwwcompnusedusg~tantcioi_trainingCGl10cs4235pdfbull httpgroupscsailmitedugraphicsclasses6838F01lecturesDelaunayDelaunay2Dppt
Trapezoidal Decompositionbull Rajeev Motwani Prabhakar Raghavan ldquoRandomized Algorithmsrdquo 1995bull Subhash Suri ldquoPoint Locationrdquo Available at httpwwwcsucsbedu~surics235Locationpdf
- Geometric Algorithms
- Introduction amp Motivation
- Introduction
- Introduction (2)
- Introduction (3)
- Motivation amp Application
- Example
- Example (2)
- Example
- Slide 10
- Slide 11
- Example (2)
- Facility location
- Art gallery problem
- A Real Life Application
- Voronoi Voronoi diagram - Properties - Construction methods
- Voronoi diagram Properties
- Voronoi diagram Properties (2)
- Voronoi Construction methods
- Voronoi Fortunersquos algo
- Fortunersquos Algo
- Fortunersquos algo - Concepts Sweep line
- Fortunersquos algo - Concepts Site events
- Fortunersquos algo - Concepts What happenshellip
- Fortunersquos algo - Concepts 2 sites - Crossing parabolashellip
- Fortunersquos algo - Concepts More siteshellip amp beach line
- Fortunersquos algo - Concepts Circle event
- Fortunersquos algo - Concepts From the vertex
- Fortunersquos algo Implementation Aspects
- Fortunersquos algo Data Structures
- Fortunersquos algo Priority Queue of Events
- Fortunersquos algo DCEL
- Fortunersquos algo Balanced Binary Search Tree
- Fortunersquos algo Pseudocode
- Fortunersquos algo Processing Site Event
- Fortunersquos algo Processing Site Event (2)
- Fortunersquos algo Processing Site Event (3)
- Fortunersquos algo Processing Site Event (4)
- Fortunersquos algo Processing Site Event (5)
- Fortunersquos algo Processing Circle Event
- Fortunersquos algo Processing Circle Event (2)
- Fortunersquos algo Processing Circle Event (3)
- Fortunersquos algo Processing Circle Event (4)
- Fortunersquos algo Algorithm Termination
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity
- Fortunersquos algo Complexity (2)
- Delaunay Triangulation
- Delaunay and Voronoi
- Delaunay and Voronoi (2)
- Delaunay Triangulation (DT)
- Properties
- Properties (2)
- Locally Delaunay edge
- Delaunay Lemma
- Edge Flipping
- Randomized Incremental Algorithm
- First step
- First step (2)
- First step (3)
- Example (3)
- Example (4)
- Example (5)
- Example (6)
- Example (7)
- Example (8)
- Example (9)
- Example (10)
- Example (11)
- Example (12)
- Example (13)
- Pseudocode
- Conflict list
- Time complexity
- Find a sufficiently large triangle
- Find the triangle containing a non-inserted point
- Backward analysis
- Time to update triangulation
- Time to update triangulation (2)
- Update conflict lists
- Rebucket points
- Time to rebucket points
- Time to rebucket points (2)
- Time complexity (2)
- Complexity
- Trapezoidal Decomposition
- Defining the problem
- Example (14)
- Details
- Construction Example
- Randomized Algorithm
- Point Location
- Point Location Example
- Point Search in DAG
- Complexity Analysis
- Complexity Analysis (2)
- Adding 1 Segment
- Adding 1 Segment (2)
- Finding Trapezoid
- Bi-directional pointer
- Adding 1 Segment (3)
- Adding 1 Segment (4)
- Adding 1 Segment (5)
- Complexity Analysis (3)
- Backward Analysis
- Complexity Analysis (4)
- Observation
- Observation (2)
- Complexity Analysis (5)
- Complexity Analysis (6)
- Complexity Analysis (7)
- Complexity Analysis (8)
- Complexity Analysis (9)
- Randomized vs Deterministic
- Non General Position
- Summary
- Conclusion
- Slide 118
- References
-