Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique...

44
Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg

Transcript of Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique...

Page 1: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-k Voronoi Diagram in the Plane

Computational Geometry, WS 2006/07Lecture 16

Dr. Dominique SchmittLaboratoire MAGE - FST

Université de Haute-Alsace

Algorithmen & Datenstrukturen, Institut für InformatikFakultät für Angewandte WissenschaftenAlbert-Ludwigs-Universität Freiburg

Page 2: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

(Very) Basic properties on circles

Page 3: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Voronoi diagram (reminder)

V(s) : the set of points of the plane closer to s than to any other site

= the Voronoi region of s

Vor(S) : the partition of the plane formed by the Voronoi regions, their edges, and vertices

S : a set of n sites in the plane

V(3)

Page 4: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Voronoi regions, edges, and vertices

V(s) : the set of centers of all the empty circles passing through s

c(s,t) : the set of centers of all the empty circles passing through s and t

u(Q) : the center of the empty circle passing through a set Q of at least 3 co-circular sites

Page 5: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Generalizations of the Voronoi diagram

- d-dimensional space,

- non-Euclidean space,

- non-Euclidean distance,

- weighted sites,

- sites are not points,

- k nearest neighbors

- ...

Page 6: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Voronoi diagram

V-1(s) : the set of points

of the plane farther from s than from any other site

Vor-1(S) : the partition of the plane

formed by the farthest point Voronoi regions, their edges, and vertices

Page 7: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Voronoi regions

Construction of V-1(7)

Property The farthest point Voronoi regions are convex

Page 8: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Voronoi regions

Property If the farthest point Voronoi region of s is non empty then s is a vertex of conv(S)

Page 9: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Voronoi regions

Property If s is a vertex of conv(S) then the farthest point Voronoi region of s is non empty

Property The farthest point Voronoi regions are unbounded

Page 10: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Voronoi regions

Property If s is a vertex of conv(S) then the farthest point Voronoi region of s is non empty

Property The farthest point Voronoi regions are unbounded

Corollary The farthest point Voronoi edges and vertices form a tree

Page 11: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

V-1(1)

V-1(4)

Farthest point Voronoi edges and vertices

edge : set of points equidistant from 2 sites and closer to all the others

=> c-1(s,t) x

Page 12: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

V-1(2)

V-1(4)

Farthest point Voronoi edges and vertices

edge : set of points equidistant from 2 sites and closer to all the others

=> c-1(s,t)

V-1(7)

vertex : point equidistant from at least 3 sites and closer to all the others

=> u-1(Q)

Page 13: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Duality in planar partitions (reminder)

Delaunay diagram : a partition dual to the Voronoi diagram

=> denoted by Del(S)

Page 14: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Delaunay diagram

Property The farthest point Delaunay edges do not intersect

c-1(2,4)

Page 15: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Farthest point Delaunay regions

Property The farthest point Delaunay diagram of S is a partition of conv(S) in polygons inscribable in “full” circles

u-1(2,4,7)

=> Construction in O(n log n)

Page 16: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Voronoi diagram

V(s,t) : the set of points of the plane closer to each of s and t than to any other site

Property The order-2 Voronoi regions are convex

Page 17: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Voronoi regions

V(s,t) : the set of points of the plane closer to each of s and t than to any other site

Construction of V(3,5)

Property The order-2 Voronoi regions are convex

Page 18: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Question Which are the regions

on both sides of cp(s,t) ?

=> V(p,s) and V(p,t)

c3(1,2)

V(2,3)

V(1,3)

Order-2 Voronoi edges

edge : set of centers of circles passing through 2 sites s and t and containing 1 site p

=> cp(s,t)

Page 19: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Voronoi vertices

vertex : center of a circle passing through at least 3 sites and containing 1 site

=> up(Q)

u5(2,3,7)

or u(Q) u(3,6,7,5)

vertex : center of a circle passing through at least 3 sites and containing either 1 or 0 site

Page 20: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

vertex : center of a circle passing through at least 3 sites and containing either 1 or 0 site

Order-2 Voronoi vertices

=> up(Q)

u5(2,3,7)

or u(Q)

Question Which are the regions

incident to up(Q) ?

=> V(p,q) with q Q

V(5,2)

V(5,7)

V(5,3)

Page 21: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

vertex : center of a circle passing through at least 3 sites and containing either 1 or 0 site

Order-2 Voronoi vertices

=> up(Q) or u(Q) u(3,6,7,5)

Question Which are the regions

incident to up(Q) ?

=> V(p,q) with q Q

Question Which are the regions

incident to u(Q) ?

=> V(q,q’) with q and q’ consecutive on the circle circumscribed to Q

V(6,7)

V(5,7)

V(3,5)

V(3,6)

Page 22: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

Page 23: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

V(3) in Vor(S) The set of points of the plane closer to 3 than to any other site of S

V(5) in Vor(S\{3}) The set of points of the plane closer to 5 than to any other site of S\{3}

V(3,5)

=> The intersection of V(3) and

Vor(S\{3}) is a subset of Vor2(S)

Page 24: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

V(5) in Vor(S) The set of points of the plane closer to 5 than to any other site of S

V(3) in Vor(S\{5}) The set of points of the plane closer to 3 than to any other site of S\{5}

=> The intersection of V(5) and Vor(S\{5}) is a second subset

of Vor2(S)

V(3,5)

Page 25: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

V(3,5)

V(3,5)

Page 26: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

Page 27: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

The algorithm

For every region V(s) of Vor(S) - construct Vor(S\{s}) - compute the intersection of Vor(S\{s}) with V(s)Stick the different pieces together

The time complexity

Construction of one Voronoi diagram of n sites => O(n log n)

Construction of n such diagrams => O(n2 log n)

Page 28: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

Page 29: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Vor(S) and Vor2(S)

V(3,5)c(3,5)

V(6,7)

c(6,7)

c(1,3)

V(1,3)

Page 30: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Vor(S) and Vor2(S)

Property Every order-1 Voronoi edge c(s,t) is included in one and only one order-2 Voronoi region V(s,t). Conversely, every order-2 Voronoi region contains one and only one order-1 Voronoi edge.

=> c(s,t) V(s,t)

Page 31: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Vor(S) and Vor2(S)

Property Every order-1 Voronoi edge c(s,t) is included in one and only one order-2 Voronoi region V(s,t). Conversely, every order-2 Voronoi region contains one and only one order-1 Voronoi edge.

x

x c(s,t)

y

y c(s,t)

Page 32: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Vor(S) and Vor2(S)

Corollary The order-1 and order-2 Voronoi edges do not intersect

Corollary V(s,t) is an order-2 region iff c(s,t) is an order-1 edge

<=>

V(s,t) is a region in Vor2(S) iff

V(s) and V(t) share an edge in Vor(S)

Page 33: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

A better algorithm

For every region V(s) of Vor(S) - let S’ be the set of sites whose regions in Vor(S) share an edge with V(s) - construct Vor(S’) - compute the intersection of Vor(S’) with V(s)Stick the different pieces together

Space complexity

Number of regions of Vor2(S) = number of edges of Vor(S) => O(n)

Page 34: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

Time complexity

ns = number of edges of V(s)

construction of 1 Vor(S’) => O(ns log ns)

construction of all Vor(S’) => O( (ns log ns))

< O(( ns ) log n)

< O(n log n)

Ss

Ss

Page 35: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Construction of Vor2(S) from Vor(S)

Theorem The ordre-2 Voronoi diagram of n sites can be computed from the order-1 Voronoi diagram in O(n) time.

Page 36: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay diagram

Dual vertices The dual of an order-2 Voronoi region V(s,t) is the midpoint of st. => g(s,t)

Page 37: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay vertices

Property The order-2 Delaunay vertices are distinct points

Proof

g(s,t) a vertex of Del2(S)

<=> V(s,t) a region of Vor2(S)

<=> c(s,t) an edge of Vor(S)

<=> st an edge of Del(S)

Page 38: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay edges

V(4,1) V(4,6)

g(4,1) g(4,6)

c4(1,6)

e4(1,6)

Dual edges The dual of an order-2

Voronoi edge cp(s,t) is

the segment connecting g(p,s) and g(p,t).

=> ep(s,t)

ep(s,t) : image of st by an homothety

of center p and ratio 1/2

Page 39: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay edges

Property The ordre-2 Delaunay edges do not intersect.

Proof

Let ep(s,t) and ep’(s’,t’) be 2 distinct order-2 Delaunay edges.

Page 40: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay edges

Property The ordre-2 Delaunay edges do not intersect.

Exercise Deal with the other cases.

Page 41: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-2 Delaunay regions

Region dual of up(Q)

Region dual of u(Q)

The polygon with verticesg(p,q) with q Q.

The polygon with verticesg(q,q’) with {q,q’} consecutiveon the circle circumscribedto Q.

Page 42: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Constructing Del2(S) from Del(S)

For every region of Del(S) compute its inscribed polygon

For every site s of S - determine the polygon of the neighbors of s in Del(S) - construct the order-1 Delaunay diagram of this polygon - compute its image by an homothety with center s and ratio 1/2

Stick the different pieces together

Page 43: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-k Voronoi and Delaunay diagrams

V(T) : the set of points of the plane closer to each site of T than to any other site (with |T| = k)

g(T) : the center of gravity of T

Page 44: Order-k Voronoi Diagram in the Plane Computational Geometry, WS 2006/07 Lecture 16 Dr. Dominique Schmitt Laboratoire MAGE - FST Université de Haute-Alsace.

Order-k Voronoi and Delaunay diagrams

Theorem The size of the order-k diagrams is O(k(n-k))

Theorem The order-k diagrams can be constructed from the order-(k-1) diagrams in O(k(n-k)) time

Corollary The order-k diagrams can be iteratively constructed

in O(n log n + k2(n-k)) time