Formal Definition P → A set of n distinct points (Geometric Objects) in the plane. Preprocess P such that closest point x ∈ P of any query point q can be found efficiently How to solve this efficiently? Voronoi diagram of P: V(P): Subdivision of the plane into n cells such that • each cell contains exactly one site, • if a point q lies in a cell containing p i then q d( q , p i ) < d( q , p j ) for all p i ∈ P, j ≠ i . This is Planar Subdivision so what can we do?
Formal Definition P → A set of n distinct points (Geometric Objects) in the plane. Preprocess P such that closest point x ∈ P of any query point q can be found efficiently How to solve this efficiently? Voronoi diagram of P: V(P): Subdivision of the plane into n cells such that • each cell contains exactly one site, • if a point q lies in a cell containing p i then q d( q , p i ) < d( q , p j ) for all p i ∈ P, j ≠ i . This is Planar Subdivision so what can we do? Planar point location
Computing the Voronoi Diagram Input: A set of points on a line (special case) p 1 p 2
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p 2
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p 2
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors half plane half plane p 1 p 2 containing containing p 2 = V( p 2 ) p 1 = V( p 1 )
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors half plane half plane p 1 p 2 containing x containing p 2 = V( p 2 ) p 1 = V( p 1 ) Closest point of x ∈ V( p 2 ) =
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors half plane half plane p 1 p 2 containing x containing p 2 = V( p 2 ) p 1 = V( p 1 ) Closest point of x ∈ V( p 2 ) = p 2
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p 2 p 3
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p n-1 p 2 p 3 p n
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p n-1 p 2 p 3 p n What are these lines?
Computing the Voronoi Diagram Input: A set of points on a line (special case) Output: A partitioning of the plane into regions of nearest neighbors p 1 p n-1 p 2 p 3 p n What are these lines? Perpendicular bisector of line segment [ p i p i+1 ]
Computing the Voronoi Diagram
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors p 1 p n-1 p 2 p 3 p n
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ]
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ]
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ] Let a i be the intersection point of l i and [ p i p i+1 ]
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ] Let a i be the intersection point of l i and [ p i p i+1 ]
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ] Let a i be the intersection point of l i and [ p i p i+1 ] Sort a i in increasing x-coordinate
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n Find Perpendicular bisector l i of line segment [ p i p i+1 ] Let a i be the intersection point of l i and [ p i p i+1 ] Sort a i in increasing x-coordinate This gives us Voronoi Diagram V(P)
Computing the Voronoi Diagram , p P s e ) ( p , p e c i a l c a i n e ( s p ) o n a l . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 ) Find Perpendicular bisector l i of line segment [ p i p i+1 ] Let a i be the intersection point of l i and [ p i p i+1 ] Sort a i in increasing x-coordinate This gives us Voronoi Diagram V(P)
Query Answering l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 )
Query Answering We have a i ‘s sorted in increasing x-coordinate l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 )
Query Answering We have a i ‘s sorted in increasing x-coordinate Given a query point p[x,y] l n-1 l 1 l 2 a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 )
Query Answering We have a i ‘s sorted in increasing x-coordinate Given a query point p[x,y] l n-1 l 1 l 2 p[x,y] a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 )
Query Answering We have a i ‘s sorted in increasing x-coordinate Given a query point p[x,y] l n-1 l 1 l 2 p[x,y] a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 ) What we have to do?
Query Answering We have a i ‘s sorted in increasing x-coordinate Given a query point p[x,y] l n-1 l 1 l 2 p[x,y] a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 ) Locate x correctly between a i and a i+1 What we have to do?
Query Answering We have a i ‘s sorted in increasing x-coordinate Given a query point p[x,y] l n-1 l 1 l 2 p[x,y] a n-1 a 1 a 2 p 1 p n-1 p 2 p 3 p n V(p 3 ) V(p n ) V(p 1 ) V(p n-1 ) V(p 2 ) Locate x correctly between a i and a i+1 What we have to do? We can forget about y coordinate
Time Complexity analysis
Time Complexity analysis Preprocessing Time =O(n log n)
Time Complexity analysis Preprocessing Time =O(n log n) Query Time =O(log n)
Computing the Voronoi Diagram
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 p 2 p 3 p 1 p 4
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors p 2 p 3 p 1 p 4
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors Find cell for each point one by one? p 2 p 3 p 1 p 4
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? p 2 p 3 p 1 p 4
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? Find region for p 1 p 2 p 3 p 1 p 4
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? Find region for p 1 p 2 p 3 V(p 1 ) p 1 c u l a r e r p e n d i P [ p 1 p ] o r o f b i s e c t p 4 2
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? Find region for p 1 p 2 p 3 V(p 1 ) p 1 any point x here p 1 is closer than p 2 c u l a r e r p e n d i P [ p 1 p ] o r o f b i s e c t p 4 2
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? Find region for p 1 a r e n d i c u l P e r p p 2 1 p [ p p 3 ] V(p 1 ) o f s e c t o r b i 4 p 1 c u l a r e r p e n d i P [ p 1 p ] o r o f b i s e c t p 4 2
Computing the Voronoi Diagram , p P ( p , p D ) o n 2 . . . , t s = o f p o i n : A s e t I n p u t n 1 2 Output: A partitioning of the plane into regions of nearest neighbors use perpendicular bisector argument Find cell for each point one by one? Find region for p 1 a r e n d i c u l P e r p p 2 1 p [ p p 3 ] V(p 1 ) o f s e c t o r b i 4 p 1 c u l a r e r p e n d i P [ p 1 p ] o r o f a r b i s e c t e n d i c u l P e r p p 4 2 1 p [ p ] o f s e c t o r b i 3
Recommend
More recommend