Lecture 13: More on Voronoi diagrams

92
Voronoi diagrams of line segments Farthest-point Voronoi diagrams More on Voronoi diagrams Computational Geometry Lecture 13: More on Voronoi diagrams Computational Geometry Lecture 13: More on Voronoi diagrams 1

Transcript of Lecture 13: More on Voronoi diagrams

Page 1: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

More on Voronoi diagrams

Computational Geometry

Lecture 13: More on Voronoi diagrams

Computational Geometry Lecture 13: More on Voronoi diagrams1

Page 2: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Motion planning for a disc

Can we move a disc from onelocation to another amidstobstacles?

Computational Geometry Lecture 13: More on Voronoi diagrams2

Page 3: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Motion planning for a disc

Since the Voronoi diagram ofpoint sites is locally “furthestaway” from those sites, we canmove the disc if and only if wecan do so on the Voronoidiagram

Computational Geometry Lecture 13: More on Voronoi diagrams3

Page 4: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Retraction

Global idea for motion planing for a disc:

1. Get center from start to Voronoi diagram

2. Move center along Voronoi diagram

3. Move center from Voronoi diagram to end

This is called retraction

Computational Geometry Lecture 13: More on Voronoi diagrams4

Page 5: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi diagram of points

Computational Geometry Lecture 13: More on Voronoi diagrams5

Page 6: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi diagram of line segments

For a Voronoi diagram of otherobjects than point sites, wemust decide to which point oneach site we measure thedistance

This will be the closest pointon the site

Computational Geometry Lecture 13: More on Voronoi diagrams6

Page 7: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi diagram of line segments

Computational Geometry Lecture 13: More on Voronoi diagrams7

Page 8: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi diagram of line segments

Computational Geometry Lecture 13: More on Voronoi diagrams8

Page 9: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi diagram of line segments

The points of equal distanceto two points lie on a line

The points of equal distanceto two lines lie on a line (twolines)

The points of equal distanceto a point and a line lie on aparabola

Computational Geometry Lecture 13: More on Voronoi diagrams9

Page 10: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Bisector of two line segments

Two line segment sites have abisector with up to 7 arcs

Computational Geometry Lecture 13: More on Voronoi diagrams10

Page 11: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Bisector of two line segments

If two line segment sites sharean endpoint, their bisector canhave an area too

Computational Geometry Lecture 13: More on Voronoi diagrams11

Page 12: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Bisector of two line segments

We assume that the line segmentsites are fully disjoint, to avidcomplications

We could shorten each line segmentfrom a set of non-crossing linesegments a tiny amount

Computational Geometry Lecture 13: More on Voronoi diagrams12

Page 13: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Empty circles

Computational Geometry Lecture 13: More on Voronoi diagrams13

Page 14: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Voronoi vertices

The Voronoi diagram has vertices at the centers of emptycircles

touching three different line segment sites (degree 3vertex)

touching two line segment sites, one of which it touchesin an endpoint of the line segment, and the segment isalso part of the tangent line of the circle at that point(degree 2 vertex)

At a degree 2 Voronoi vertex, one incident arc is a straightedge and the other one is a parabolic arc

Computational Geometry Lecture 13: More on Voronoi diagrams14

Page 15: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Constructing the Voronoi diagram of line segments

The Voronoi diagram of a set of line segments can beconstructed using a plane sweep algorithm

`

s1

s2

s3s4

s5

Question: What site defines the leftmost arc on the beachline?

Computational Geometry Lecture 13: More on Voronoi diagrams15

Page 16: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Breakpoints

Breakpoints trace arcs of equal distance to two different sites,or they trace segments perpendicular to a line segmentstarting at one of its endpoints, or they trace site interiors

`

s1

s2

s3s4

s5

Computational Geometry Lecture 13: More on Voronoi diagrams16

Page 17: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Breakpoints

The algorithm uses 5 types of breakpoint:

1. If a point p is closest to two site endpoints while beingequidistant from them and `, then p is a breakpoint thattraces a line segment (as in the point site case)

2. If a point p is closest to two site interiors while beingequidistant from them and `, then p is a breakpoint thattraces a line segment

3. If a point p is closest to a site endpoint and a siteinterior of different sites while being equidistant fromthem and `, then p is a breakpoint that traces aparabolic arc

Computational Geometry Lecture 13: More on Voronoi diagrams17

Page 18: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Breakpoints

The algorithm uses 5 types of breakpoint (continued):

4. If a point p is closest to a site endpoint, the shortestdistance is realized by a segment that is perpendicular tothe line segment site, and p has the same distance from`, then p is a breakpoint that traces a line segment

5. If a site interior intersects the sweep line, then theintersection is a breakpoint that traces a line segment(the site interior)

These two types of breakpoint do not trace Voronoi diagramedges but they do trace breaks in the beach line

Computational Geometry Lecture 13: More on Voronoi diagrams18

Page 19: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Events

`

s1

s2

s3s4

s5

type 1

type 2

type 3type 5

type 4 type 4 type 4type 3 type 4

Computational Geometry Lecture 13: More on Voronoi diagrams19

Page 20: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Events

There are site events and circle events, but circle events comein different types

`

s1

s2

s3s4

s5

Computational Geometry Lecture 13: More on Voronoi diagrams20

Page 21: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Events

The types of circle events essentially correspond to the typesof breakpoints that meet

Not all types of breakpoint can meet

Computational Geometry Lecture 13: More on Voronoi diagrams21

Page 22: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

The sweep algorithm

Each event can still be handled in O(logn) time

There are still only O(n) events

Theorem: The Voronoi diagram of a set of disjoint linesegments can be constructed in O(n logn) time

Computational Geometry Lecture 13: More on Voronoi diagrams22

Page 23: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Retraction

Computational Geometry Lecture 13: More on Voronoi diagrams23

Page 24: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Algorithm Retraction(S,qstart,qend,r)1. Compute the Voronoi diagram Vor(S) of S in a bounding box.2. Locate the cells of Vor(P) that contain qstart and qend.3. Determine the point pstart on Vor(S) by moving qstart away from

the nearest line segment in S. Similarly, determine the pointpend. Add pstart and pend as vertices to Vor(S), splitting the arcson which they lie into two.

4. Let G be the graph corresponding to the vertices and edges ofthe Voronoi diagram. Remove all edges from G for which thesmallest distance to the nearest sites is ≤ r.

5. Determine with depth-first search whether a path exists frompstart to pend in G. If so, report the line segment from qstart topstart, the path in G from pstart to pend, and the line segmentfrom pend to qend as the path. Otherwise, report that no pathexists.

Computational Geometry Lecture 13: More on Voronoi diagrams24

Page 25: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Computational Geometry Lecture 13: More on Voronoi diagrams25

Page 26: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Computational Geometry Lecture 13: More on Voronoi diagrams26

Page 27: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

Motion planning for a discGeometryPlane sweep algorithm

Result

Theorem: Given n disjoint line segment obstacles and adisc-shaped robot, the existence of a collision-free pathbetween two positions of the robot can be determined inO(n logn) time using O(n) storage.

Computational Geometry Lecture 13: More on Voronoi diagrams27

Page 28: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Testing the roundness

Suppose we construct a perfectly round object, and now wishto test how round it really is

Measuring an object is done with coordinate measuringmachines, it is a scanner that determines many points on thesurface of the object

round not so round

Computational Geometry Lecture 13: More on Voronoi diagrams28

Page 29: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Coordinate measuring machine

Computational Geometry Lecture 13: More on Voronoi diagrams29

Page 30: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Roundness

The roundness of a set of points isthe width of the smallest annulusthat contains the points

An annulus is the region betweentwo co-centric circles

Its width is the difference in radius

Computational Geometry Lecture 13: More on Voronoi diagrams30

Page 31: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

The smallest-width annulus must have at least one point onCouter, or else we can decrease its size and decrease the width

The smallest-width annulus must have at least one point onCinner, or else we can increase its size and decrease the width

Computational Geometry Lecture 13: More on Voronoi diagrams31

Page 32: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

Couter contains at least three points of P, andCinner contains at least one point of P

Couter contains at least one point of P, andCinner contains at least three points of P

Couter and Cinner both contain two points of P

Computational Geometry Lecture 13: More on Voronoi diagrams32

Page 33: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

The smallest-width annulus can not be determined withrandomized incremental construction

Computational Geometry Lecture 13: More on Voronoi diagrams33

Page 34: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

If we know the center of the smallest-width annulus(the center of the two circles), then we can determinethe smallest-width annulus itself (and its width)in O(n) additional time

Computational Geometry Lecture 13: More on Voronoi diagrams34

Page 35: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

The cases

Consider case 2: Cinner contains(at least) three points of P andCouter only one

Then the three points on Cinnerdefine an empty circle, and thecenter of Cinner is a Voronoivertex!

Computational Geometry Lecture 13: More on Voronoi diagrams35

Page 36: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

The cases

Consider case 1: Couter contains(at least) three points of P andCinner only one

Then the three points on Couterdefine a “full” circle ...

Computational Geometry Lecture 13: More on Voronoi diagrams36

Page 37: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Intermezzo: Higher-order Voronoi diagrams

Computational Geometry Lecture 13: More on Voronoi diagrams37

Page 38: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

More closest points

Suppose we are interested in the two closest points, not onlythe one closest point, and want a diagram that captures that

Computational Geometry Lecture 13: More on Voronoi diagrams38

Page 39: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

First order Voronoi diagram

Computational Geometry Lecture 13: More on Voronoi diagrams39

Page 40: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Second order Voronoi diagram

Computational Geometry Lecture 13: More on Voronoi diagrams40

Page 41: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Third order Voronoi diagram

Computational Geometry Lecture 13: More on Voronoi diagrams41

Page 42: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

First and second order Voronoi diagram

Computational Geometry Lecture 13: More on Voronoi diagrams42

Page 43: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Tenth order, or farthest-point Voronoi diagram

Computational Geometry Lecture 13: More on Voronoi diagrams43

Page 44: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

The farthest-point Voronoi diagram is the partition of theplane into regions where the same point is farthest

It is also the (n−1)-th order Voronoi diagram

The region of a site pi is the common intersection of n−1half-planes, so regions are convex, and boundaries are parts ofbisectors

Computational Geometry Lecture 13: More on Voronoi diagrams44

Page 45: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Computational Geometry Lecture 13: More on Voronoi diagrams45

Page 46: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Observe: Only points of the convexhull of P can have cells in thefarthest-point Voronoi diagram

Suppose otherwise ...

q

pi

pj

pk

Computational Geometry Lecture 13: More on Voronoi diagrams46

Page 47: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Observe: Only points of the convexhull of P can have cells in thefarthest-point Voronoi diagram

Suppose otherwise ...

q

pi

pj

pk

≥ π/2

Computational Geometry Lecture 13: More on Voronoi diagrams47

Page 48: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Also observe: All points of theconvex hull have a cell in thefarthest-point Voronoi diagram

All cells of the farthest-pointVoronoi diagram are unbounded

pi

pj

pk

Computational Geometry Lecture 13: More on Voronoi diagrams48

Page 49: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Also observe: All points of theconvex hull have a cell in thefarthest-point Voronoi diagram

All cells of the farthest-pointVoronoi diagram are unbounded

pi

pj

pk

Computational Geometry Lecture 13: More on Voronoi diagrams49

Page 50: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

If all cells are unbounded, then the edges of the farthest-pointVoronoi diagram form a tree of which some edges areunbounded

Question: For the normal Voronoi diagram, there was onecase where its edges are not connected. Does such a caseoccur for the farthest-point Voronoi diagram?

Computational Geometry Lecture 13: More on Voronoi diagrams50

Page 51: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Computational Geometry Lecture 13: More on Voronoi diagrams51

Page 52: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Farthest-point Voronoi diagrams

Computational Geometry Lecture 13: More on Voronoi diagrams52

Page 53: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Lower bound

Ω(n logn) time is a lower bound forcomputing the farthest-point Voronoidiagram

We could use it for sorting bytransforming a set of reals x1,x2, . . . toa set of points (x1,x2

1),(x2,x22), . . .

Computational Geometry Lecture 13: More on Voronoi diagrams53

Page 54: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction

So we may as well start by computingthe convex hull of P in O(n logn) time

Let p1, . . . ,pm be the points on theconvex hull, forget the rest

Computational Geometry Lecture 13: More on Voronoi diagrams54

Page 55: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction

So we may as well start by computingthe convex hull of P in O(n logn) time

Let p1, . . . ,pm be the points on theconvex hull, forget the rest

Computational Geometry Lecture 13: More on Voronoi diagrams55

Page 56: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction

The simplest algorithm to construct the farthest-pointVoronoi diagram is randomized incremental construction onthe convex hull vertices

Let p1, . . . ,pm be the points in random order

From the convex hull, we also know the convex hull order

Computational Geometry Lecture 13: More on Voronoi diagrams56

Page 57: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

Computational Geometry Lecture 13: More on Voronoi diagrams57

Page 58: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

cw(p8)

ccw(p8)

Computational Geometry Lecture 13: More on Voronoi diagrams58

Page 59: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

Computational Geometry Lecture 13: More on Voronoi diagrams59

Page 60: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

p7

cw(p7)

ccw(p7)

Computational Geometry Lecture 13: More on Voronoi diagrams60

Page 61: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

p7

Computational Geometry Lecture 13: More on Voronoi diagrams61

Page 62: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

p7

p6

ccw(p6)

cw(p6)

Computational Geometry Lecture 13: More on Voronoi diagrams62

Page 63: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8

p7

p6

Computational Geometry Lecture 13: More on Voronoi diagrams63

Page 64: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 1

Phase 1: Remove and Remember

For i← m downto 4 do

Remove pi from the convex hull;remember its 2 neighbors cw(pi)and ccw(pi) (at removal!)

p8,cw(p8),ccw(p8)

p7,cw(p7),ccw(p7)

p6,cw(p6),ccw(p6)

p5,cw(p5),ccw(p5)

p4,cw(p4),ccw(p4)

p3, p2, p1

Computational Geometry Lecture 13: More on Voronoi diagrams64

Page 65: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

Phase 2: Put back and Construct

Construct the farthest-point Voronoi diagram F3 of p3, p2, p1

For i← 4 to m do

Add pi to the farthest-point Voronoi diagramFi−1 to make Fi

We simply determine the cell of pi by traversing Fi−1 andupdate Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams65

Page 66: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams66

Page 67: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams67

Page 68: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

bisector ofpi and ccw(pi)

Computational Geometry Lecture 13: More on Voronoi diagrams68

Page 69: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams69

Page 70: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams70

Page 71: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

cw(pi)cell of

Computational Geometry Lecture 13: More on Voronoi diagrams71

Page 72: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

cw(pi)cell of

Computational Geometry Lecture 13: More on Voronoi diagrams72

Page 73: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi

cw(pi)cell of

cell of pi

Computational Geometry Lecture 13: More on Voronoi diagrams73

Page 74: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

The implementation of phase 2 requires a representation ofthe farthest-point Voronoi diagram

We use the doubly-connected edge list (ignoring issues due tohalf-infinite edges)

For any point among p1, . . . ,pi−1, we maintain a pointer tothe most counterclockwise bounding half-edge of its cell

Computational Geometry Lecture 13: More on Voronoi diagrams74

Page 75: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Construction: phase 2

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams75

Page 76: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Analysis of randomized incremental construction

Due remembering ccw(pi), we have ccw(pi) in O(1) time, andget the first bisector that bounds the cell of pi

Due to the pointer to the most counterclockwise half-edge ofthe cell of ccw(pi), we can start the traversal in O(1) time

Computational Geometry Lecture 13: More on Voronoi diagrams76

Page 77: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Analysis of randomized incremental construction

If the cell of pi has ki edges in its boundary, then we visit O(ki)half-edges and vertices of Fi−1 to construct the cell of pi

Also, we remove O(ki) vertices and half-edges, change(shorten) O(ki) half-edges, and create O(ki) half-edges andvertices

⇒ adding pi takes O(ki) time, where ki is the complexity ofthe cell of pi in Fi

Computational Geometry Lecture 13: More on Voronoi diagrams77

Page 78: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Analysis

pi

cw(pi)ccw(pi)

ccw(pi)cell of

Fi−1

Computational Geometry Lecture 13: More on Voronoi diagrams78

Page 79: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Backwards analysis

Backwards analysis:Assume that pi has already been added and we have Fi

Each one of the i points had the same probability of havingbeen added last

The expected time for the addition of pi is linear in theaverage complexity of the cells of Fi

Computational Geometry Lecture 13: More on Voronoi diagrams79

Page 80: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Backwards analysis

The farthest-point Voronoi diagram of i points has at most2i−3 edges (fewer in degenerate cases), and each edgebounds exactly 2 cells

So the average complexity of a cell in a farthest-point Voronoidiagram of i points is

ki ≤2 · (2i−3)

i=

4i−6i

< 4

The expected time to construct Fi from Fi−1 is O(1)

Computational Geometry Lecture 13: More on Voronoi diagrams80

Page 81: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Result

Due to the initial convex hull computation, the wholealgorithm requires O(n logn) time, plus O(m) expected time

Theorem: The farthest-site Voronoi diagram of n points inthe plane can be constructed in O(n logn) expected time. Ifall points lie on the convex hull and are given in sorted order,it takes O(n) expected time

Computational Geometry Lecture 13: More on Voronoi diagrams81

Page 82: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

End of intermezzo; back to smallest-width annulus

Computational Geometry Lecture 13: More on Voronoi diagrams82

Page 83: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

Couter contains at least three points of P, andCinner contains at least one point of P

Couter contains at least one point of P, andCinner contains at least three points of P

Couter and Cinner both contain two points of P

Computational Geometry Lecture 13: More on Voronoi diagrams83

Page 84: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Smallest-width annulus

If we know the center of the smallest-width annulus(the center of the two circles), then we can determinethe smallest-width annulus itself (and its width)in O(n) additional time

Computational Geometry Lecture 13: More on Voronoi diagrams84

Page 85: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Case 2

Consider case 2: Cinner contains(at least) three points of P andCouter only one

Then the three points on Cinnerdefine an empty circle, and thecenter of Cinner is a Voronoidiagram vertex!

Computational Geometry Lecture 13: More on Voronoi diagrams85

Page 86: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Case 1

Consider case 1: Couter contains(at least) three points of P andCinner only one

Then the three points on Couterdefine a “full” circle, and thecenter of Couter is a farthest-pointVoronoi diagram vertex!

Computational Geometry Lecture 13: More on Voronoi diagrams86

Page 87: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Case 3

Consider case 3: Couter and Cinnereach contain two points of P

Then the two points on Cinner definea set of empty circles and the twopoints of Couter define a set of fullcircles

Computational Geometry Lecture 13: More on Voronoi diagrams87

Page 88: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Case 3

The two points on Cinner define a setof empty circles whose centers lie onthe Voronoi edge defined by thesetwo points

The two points of Couter define a setof full circles whose centers lie on thefarthest-point Voronoi edge definedby these two points

The center lies on an intersection ofan edge of the Voronoi diagram andan edge of the farthest-point Voronoidiagram!

Computational Geometry Lecture 13: More on Voronoi diagrams88

Page 89: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Algorithm

To solve case 3:

1. Compute the Voronoi diagram of P

2. Compute the farthest-point Voronoi diagram of P

3. For each pair of edges, one of each diagram- defined by p,p′ of the Voronoi diagram and

by q,q′ of the farthest-point Voronoi diagram- determine the annulus for p,p′ and q,q′ if the

edges intersect

4. Keep the smallest-width one of these

This takes O(n2) time

Computational Geometry Lecture 13: More on Voronoi diagrams89

Page 90: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Algorithm

To solve case 1:

1. Compute the farthest-point Voronoi diagram of P

2. For each vertex v of the FPVD- determine the point p of P that is closest to v- determine Couter from the points defining v- determine the annulus from p, v, and Couter

3. Keep the smallest-width one of these

This takes O(n2) time

Computational Geometry Lecture 13: More on Voronoi diagrams90

Page 91: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Algorithm

To solve case 2:

1. Compute the Voronoi diagram of P

2. For each vertex v of the Voronoi diagram- determine the point p of P that is farthest from v- determine Cinner from the points defining v- determine the annulus from p, v, and Cinner

3. Keep the smallest-width one of these

This takes O(n2) time

Computational Geometry Lecture 13: More on Voronoi diagrams91

Page 92: Lecture 13: More on Voronoi diagrams

Voronoi diagrams of line segmentsFarthest-point Voronoi diagrams

RoundnessHigher-order Voronoi diagramsComputing the farthest-point Voronoi diagramRoundness

Result

Theorem: The roundness, or the smallest-width annulus of npoints in the plane can be determined in O(n2) time

Computational Geometry Lecture 13: More on Voronoi diagrams92