Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1...

66
Introduction Duality Arrangements Arrangements and Duality Computational Geometry Lecture 11: Arrangements and Duality Computational Geometry Lecture 11: Arrangements and Duality 1

Transcript of Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1...

Page 1: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Arrangements and Duality

Computational Geometry

Lecture 11: Arrangements and Duality

Computational Geometry Lecture 11: Arrangements and Duality1

Page 2: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Three Points on a Line

Question: In a set of n points, are there 3 points on a line?

Naive algorithm: tests all triples in O(n3) timeFaster algorithm: uses duality and arrangements

Note: other motivation in chapter 8 of the book

Computational Geometry Lecture 11: Arrangements and Duality2

Page 3: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Three Points on a Line

Question: In a set of n points, are there 3 points on a line?

Naive algorithm: tests all triples in O(n3) time

Faster algorithm: uses duality and arrangements

Note: other motivation in chapter 8 of the book

Computational Geometry Lecture 11: Arrangements and Duality3

Page 4: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Three Points on a Line

Question: In a set of n points, are there 3 points on a line?

Naive algorithm: tests all triples in O(n3) timeFaster algorithm: uses duality and arrangements

Note: other motivation in chapter 8 of the book

Computational Geometry Lecture 11: Arrangements and Duality4

Page 5: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Three Points on a Line

Question: In a set of n points, are there 3 points on a line?

Naive algorithm: tests all triples in O(n3) timeFaster algorithm: uses duality and arrangements

Note: other motivation in chapter 8 of the book

Computational Geometry Lecture 11: Arrangements and Duality5

Page 6: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

` : y = mx+ b

p = (px, py)

point p = (px,py) 7→ line p∗ : y = pxx−py

line ` : y = mx+b 7→ point `∗ = (m,−b)

Note:

Computational Geometry Lecture 11: Arrangements and Duality6

Page 7: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

` : y = mx+ b

p = (px, py)

primal plane dual plane

p∗ : y = pxx− py

`∗ = (m,−b)

point p = (px,py) 7→ line p∗ : y = pxx−py

line ` : y = mx+b 7→ point `∗ = (m,−b)

Note:

Computational Geometry Lecture 11: Arrangements and Duality7

Page 8: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

` : y = mx+ b

p = (px, py)

primal plane dual plane

p∗ : y = pxx− py

`∗ = (m,−b)

point p = (px,py) 7→ line p∗ : y = pxx−py

line ` : y = mx+b 7→ point `∗ = (m,−b)

Note: self inverse (p∗)∗ = p, (`∗)∗ = `

Computational Geometry Lecture 11: Arrangements and Duality8

Page 9: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

` : y = mx+ b

p = (px, py)

primal plane dual plane

p∗ : y = pxx− py

`∗ = (m,−b)

point p = (px,py) 7→ line p∗ : y = pxx−py

line ` : y = mx+b 7→ point `∗ = (m,−b)

Note: does not handle vertical lines

Computational Geometry Lecture 11: Arrangements and Duality9

Page 10: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

primal plane dual plane

` : y = mx+ b

p = (px, py)

mpx + b− py

p∗ : y = pxx− py

`∗ = (m,−b)

pxm− py + b

Duality preserves vertical distances

⇒ incidence preserving: p ∈ ` if and only if `∗ ∈ p∗

⇒ order preserving: p lies above ` if and only if `∗ lies above p∗

Computational Geometry Lecture 11: Arrangements and Duality10

Page 11: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

primal plane dual plane

` : y = mx+ b

p = (px, py)

mpx + b− py

p∗ : y = pxx− py

`∗ = (m,−b)

pxm− py + b

Duality preserves vertical distances⇒ incidence preserving: p ∈ ` if and only if `∗ ∈ p∗

⇒ order preserving: p lies above ` if and only if `∗ lies above p∗

Computational Geometry Lecture 11: Arrangements and Duality11

Page 12: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

primal plane dual plane

` : y = mx+ b

p = (px, py)

mpx + b− py

p∗ : y = pxx− py

`∗ = (m,−b)

pxm− py + b

Duality preserves vertical distances⇒ incidence preserving: p ∈ ` if and only if `∗ ∈ p∗

⇒ order preserving: p lies above ` if and only if `∗ lies above p∗

Computational Geometry Lecture 11: Arrangements and Duality12

Page 13: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

It can be applied to other objects, like segments

primal plane

sp

q`

The dual of a segment is a double wedge

Question: What line would dualize to a point in the rightpart of the double wedge?

Computational Geometry Lecture 11: Arrangements and Duality13

Page 14: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

It can be applied to other objects, like segments

primal plane

sp

q`

dual plane

s∗

p∗ q∗

`∗

The dual of a segment is a double wedge

Question: What line would dualize to a point in the rightpart of the double wedge?

Computational Geometry Lecture 11: Arrangements and Duality14

Page 15: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

A geometric interpretation:

parabola U : y = x2/2

point p = (px,py) on U

derivative of U at p is px, i.e., p∗

has same slope as the tangentline

the tangent line intersects y-axisat (0,−p2

x/2)

⇒ p∗ is the tangent line at p

p

q

q′

p∗

q∗U

Computational Geometry Lecture 11: Arrangements and Duality15

Page 16: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

A geometric interpretation:

parabola U : y = x2/2

point p = (px,py) on U

derivative of U at p is px, i.e., p∗

has same slope as the tangentline

the tangent line intersects y-axisat (0,−p2

x/2)

⇒ p∗ is the tangent line at p

p

q

q′

p∗

q∗U

Computational Geometry Lecture 11: Arrangements and Duality16

Page 17: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

A geometric interpretation:

parabola U : y = x2/2

point p = (px,py) on U

derivative of U at p is px, i.e., p∗

has same slope as the tangentline

the tangent line intersects y-axisat (0,−p2

x/2)

⇒ p∗ is the tangent line at p

p

q

q′

p∗

q∗U

Computational Geometry Lecture 11: Arrangements and Duality17

Page 18: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

A geometric interpretation:

parabola U : y = x2/2

point p = (px,py) on U

derivative of U at p is px, i.e., p∗

has same slope as the tangentline

the tangent line intersects y-axisat (0,−p2

x/2)

⇒ p∗ is the tangent line at p

p

q

q′

p∗

q∗U

Computational Geometry Lecture 11: Arrangements and Duality18

Page 19: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Duality

A geometric interpretation:

parabola U : y = x2/2

point p = (px,py) on U

derivative of U at p is px, i.e., p∗

has same slope as the tangentline

the tangent line intersects y-axisat (0,−p2

x/2)

⇒ p∗ is the tangent line at p

p

q

q′

p∗

q∗U

Computational Geometry Lecture 11: Arrangements and Duality19

Page 20: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Usefulness of Duality

Why use duality? It gives a new perspective!

Detecting three points on a line dualizes to detectingthree lines intersecting in a point

x

y

x

y

primal plane dual plane

`

`∗p1

p2

p3p4 p2

p4∗

p1∗ p3

Next we use arrangements

Computational Geometry Lecture 11: Arrangements and Duality20

Page 21: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Usefulness of Duality

Why use duality? It gives a new perspective!

Detecting three points on a line dualizes to detectingthree lines intersecting in a point

x

y

x

y

primal plane dual plane

`

`∗p1

p2

p3p4 p2

p4∗

p1∗ p3

Next we use arrangements

Computational Geometry Lecture 11: Arrangements and Duality21

Page 22: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Arrangement A(L): subdivision induced by a set of lines L

consists of faces, edges andvertices (some unbounded)

arrangements can be madefor other geometric objectstoo, like line segments,circles, higher-dimensionalobjects

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality22

Page 23: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Arrangement A(L): subdivision induced by a set of lines L

consists of faces, edges andvertices (some unbounded)

arrangements can be madefor other geometric objectstoo, like line segments,circles, higher-dimensionalobjects

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality23

Page 24: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Combinatorial Complexity:

≤ n(n−1)/2 vertices

≤ n2 edges

≤ n2/2+n/2+1 faces:add lines incrementally

1+n

∑i=1

i = n(n+1)/2+1

equality holds in simplearrangements

Overall O(n2) complexity

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality24

Page 25: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Combinatorial Complexity:

≤ n(n−1)/2 vertices

≤ n2 edges

≤ n2/2+n/2+1 faces:add lines incrementally

1+n

∑i=1

i = n(n+1)/2+1

equality holds in simplearrangements

Overall O(n2) complexity

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality25

Page 26: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Combinatorial Complexity:

≤ n(n−1)/2 vertices

≤ n2 edges

≤ n2/2+n/2+1 faces:add lines incrementally

1+n

∑i=1

i = n(n+1)/2+1

equality holds in simplearrangements

Overall O(n2) complexity

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality26

Page 27: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Combinatorial Complexity:

≤ n(n−1)/2 vertices

≤ n2 edges

≤ n2/2+n/2+1 faces:add lines incrementally

1+n

∑i=1

i = n(n+1)/2+1

equality holds in simplearrangements

Overall O(n2) complexity

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality27

Page 28: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Arrangements of Lines

Combinatorial Complexity:

≤ n(n−1)/2 vertices

≤ n2 edges

≤ n2/2+n/2+1 faces:add lines incrementally

1+n

∑i=1

i = n(n+1)/2+1

equality holds in simplearrangements

Overall O(n2) complexity

edge

vertex

face

Computational Geometry Lecture 11: Arrangements and Duality28

Page 29: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Constructing Arrangements

Goal: Compute A(L) in bounding box in DCEL representation

plane sweep for line segment intersection:O((n+ k) logn) = O(n2 logn)

faster: incremental construction

Computational Geometry Lecture 11: Arrangements and Duality29

Page 30: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Constructing Arrangements

Goal: Compute A(L) in bounding box in DCEL representation

plane sweep for line segment intersection:O((n+ k) logn) = O(n2 logn)

faster: incremental construction

Computational Geometry Lecture 11: Arrangements and Duality30

Page 31: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Constructing Arrangements

Goal: Compute A(L) in bounding box in DCEL representation

plane sweep for line segment intersection:O((n+ k) logn) = O(n2 logn)

faster: incremental construction

Computational Geometry Lecture 11: Arrangements and Duality31

Page 32: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

`i

Algorithm ConstructArrange-ment(L)

Input. Set L of n linesOutput. DCEL for A(L) in B(L)1. Compute bounding box B(L)2. Construct DCEL for subdivision

induced by B(L)3. for i← 1 to n4. do insert `i

Computational Geometry Lecture 11: Arrangements and Duality32

Page 33: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Algorithm ConstructArrangement(L)Input. A set L of n lines in the planeOutput. DCEL for subdivision induced by B(L) and the part

of A(L) inside B(L), where B(L) is a suitable bounding box1. Compute a bounding box B(L) that contains all vertices

of A(L) in its interior2. Construct DCEL for the subdivision induced by B(L)3. for i← 1 to n4. do Find the edge e on B(L) that contains the

leftmost intersection point of `i and Ai

5. f ← the bounded face incident to e6. while f is not the unbounded face, that is, the

face outside B(L)7. do Split f , and set f to be the next face

intersected by `iComputational Geometry Lecture 11: Arrangements and Duality33

Page 34: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Face split:

f

`i

=⇒

`i

Computational Geometry Lecture 11: Arrangements and Duality34

Page 35: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Runtime analysis:

1. O(n2)2. constant

3. & 4. ?

Algorithm ConstructArrange-ment(L)

Input. Set L of n linesOutput. DCEL for A(L) in B(L)1. Compute bounding box B(L)2. Construct DCEL for subdivision

induced by B(L)3. for i← 1 to n4. do insert `i

Computational Geometry Lecture 11: Arrangements and Duality35

Page 36: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Runtime analysis:

1. O(n2)

2. constant

3. & 4. ?

Algorithm ConstructArrange-ment(L)

Input. Set L of n linesOutput. DCEL for A(L) in B(L)1. Compute bounding box B(L)2. Construct DCEL for subdivision

induced by B(L)3. for i← 1 to n4. do insert `i

Computational Geometry Lecture 11: Arrangements and Duality36

Page 37: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Runtime analysis:

1. O(n2)2. constant

3. & 4. ?

Algorithm ConstructArrange-ment(L)

Input. Set L of n linesOutput. DCEL for A(L) in B(L)1. Compute bounding box B(L)2. Construct DCEL for subdivision

induced by B(L)3. for i← 1 to n4. do insert `i

Computational Geometry Lecture 11: Arrangements and Duality37

Page 38: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Runtime analysis:

1. O(n2)2. constant

3. & 4. ?

Algorithm ConstructArrange-ment(L)

Input. Set L of n linesOutput. DCEL for A(L) in B(L)1. Compute bounding box B(L)2. Construct DCEL for subdivision

induced by B(L)3. for i← 1 to n4. do insert `i

Computational Geometry Lecture 11: Arrangements and Duality38

Page 39: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

The zone of a line ` in an arrangement A(L) is the set offaces of A(L) whose closure intersects `

`

Theorem: The complexity of the zone of a line in anarrangement of m lines is O(m)

Computational Geometry Lecture 11: Arrangements and Duality39

Page 40: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

The zone of a line ` in an arrangement A(L) is the set offaces of A(L) whose closure intersects `

`

Theorem: The complexity of the zone of a line in anarrangement of m lines is O(m)

Computational Geometry Lecture 11: Arrangements and Duality40

Page 41: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,

at most 5 if `1 is not unique5(m−1)+5 = 5m

`

Computational Geometry Lecture 11: Arrangements and Duality41

Page 42: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,

at most 5 if `1 is not unique5(m−1)+5 = 5m

`

Computational Geometry Lecture 11: Arrangements and Duality42

Page 43: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,

at most 5 if `1 is not unique5(m−1)+5 = 5m

`

Computational Geometry Lecture 11: Arrangements and Duality43

Page 44: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,

at most 5 if `1 is not unique5(m−1)+5 = 5m

`

Computational Geometry Lecture 11: Arrangements and Duality44

Page 45: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,

at most 5 if `1 is not unique5(m−1)+5 = 5m

`w

v

`2`1

Computational Geometry Lecture 11: Arrangements and Duality45

Page 46: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Zone Theorem

Theorem: The complexity of the zone of a line in an arrangementof m lines is O(m)

Proof:

We can assume ` horizontal andno other line is horizontal

We count number ofleft-bounding edges

We show by induction on m thatthis at most 5m:

m = 1 : trivially truem > 1 : only at most 3 newedges if `1 is unique,at most 5 if `1 is not unique5(m−1)+5 = 5m

`w

v

`2`1

Computational Geometry Lecture 11: Arrangements and Duality46

Page 47: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Run time analysis:

1. O(n2)2. constant

3. & 4.

∑ni=1 O(i) = O(n2)

In total O(n2)

Algorithm ConstructArrange-ment(L)

Input. Set L of n lines.Output. DCEL for A(L) in B(L).1. Compute bounding box B(L).2. Construct DCEL for subdivision

induced by B(L).3. for i← 1 to n4. do insert `i.

Computational Geometry Lecture 11: Arrangements and Duality47

Page 48: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Run time analysis:

1. O(n2)

2. constant

3. & 4.

∑ni=1 O(i) = O(n2)

In total O(n2)

Algorithm ConstructArrange-ment(L)

Input. Set L of n lines.Output. DCEL for A(L) in B(L).1. Compute bounding box B(L).2. Construct DCEL for subdivision

induced by B(L).3. for i← 1 to n4. do insert `i.

Computational Geometry Lecture 11: Arrangements and Duality48

Page 49: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Run time analysis:

1. O(n2)2. constant

3. & 4.

∑ni=1 O(i) = O(n2)

In total O(n2)

Algorithm ConstructArrange-ment(L)

Input. Set L of n lines.Output. DCEL for A(L) in B(L).1. Compute bounding box B(L).2. Construct DCEL for subdivision

induced by B(L).3. for i← 1 to n4. do insert `i.

Computational Geometry Lecture 11: Arrangements and Duality49

Page 50: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Run time analysis:

1. O(n2)2. constant

3. & 4.

∑ni=1 O(i) = O(n2)

In total O(n2)

Algorithm ConstructArrange-ment(L)

Input. Set L of n lines.Output. DCEL for A(L) in B(L).1. Compute bounding box B(L).2. Construct DCEL for subdivision

induced by B(L).3. for i← 1 to n4. do insert `i.

Computational Geometry Lecture 11: Arrangements and Duality50

Page 51: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Incremental Construction

Run time analysis:

1. O(n2)2. constant

3. & 4.

∑ni=1 O(i) = O(n2)

In total O(n2)

Algorithm ConstructArrange-ment(L)

Input. Set L of n lines.Output. DCEL for A(L) in B(L).1. Compute bounding box B(L).2. Construct DCEL for subdivision

induced by B(L).3. for i← 1 to n4. do insert `i.

Computational Geometry Lecture 11: Arrangements and Duality51

Page 52: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

3 Points on a Line

Algorithm:

run incremental construction algorithm for dual problem

stop when 3 lines pass through a point

Run time: O(n2)

Computational Geometry Lecture 11: Arrangements and Duality52

Page 53: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

3 Points on a Line

Algorithm:

run incremental construction algorithm for dual problem

stop when 3 lines pass through a point

Run time: O(n2)

Computational Geometry Lecture 11: Arrangements and Duality53

Page 54: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Example: Motion Planning

Where can the rod move by translation (no rotations) whileavoiding obstacles?

pick a reference point:lower end-point of rod

shrink rod to a point,expand obstacles accordingly:locus of semi-free placements

reachable configurations:cell of initial configuration inarrangement of line segments

Computational Geometry Lecture 11: Arrangements and Duality54

Page 55: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Example: Motion Planning

Where can the rod move by translation (no rotations) whileavoiding obstacles?

pick a reference point:lower end-point of rod

shrink rod to a point,expand obstacles accordingly:locus of semi-free placements

reachable configurations:cell of initial configuration inarrangement of line segments

Computational Geometry Lecture 11: Arrangements and Duality55

Page 56: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Example: Motion Planning

Where can the rod move by translation (no rotations) whileavoiding obstacles?

pick a reference point:lower end-point of rod

shrink rod to a point,expand obstacles accordingly:locus of semi-free placements

reachable configurations:cell of initial configuration inarrangement of line segments

Computational Geometry Lecture 11: Arrangements and Duality56

Page 57: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Example: Motion Planning

Where can the rod move by translation (no rotations) whileavoiding obstacles?

pick a reference point:lower end-point of rod

shrink rod to a point,expand obstacles accordingly:locus of semi-free placements

reachable configurations:cell of initial configuration inarrangement of line segments

Computational Geometry Lecture 11: Arrangements and Duality57

Page 58: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Example: Motion Planning

Where can the rod move by translation (no rotations) whileavoiding obstacles?

pick a reference point:lower end-point of rod

shrink rod to a point,expand obstacles accordingly:locus of semi-free placements

reachable configurations:cell of initial configuration inarrangement of line segments

Computational Geometry Lecture 11: Arrangements and Duality58

Page 59: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

k-levels in Arrangements

The level of a point in an arrangement of lines is the number oflines strictly above it

Open problem: What is thecomplexity of k-levels?

Dual problem: What is the numberof k-sets in a point set?

Known bounds:

Erdos et al. ’73:Ω(n logk) and O(nk1/2)

Dey ’97: O(nk1/3)

3

1

0

22

2

1

3

33 4

Computational Geometry Lecture 11: Arrangements and Duality59

Page 60: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

k-levels in Arrangements

The level of a point in an arrangement of lines is the number oflines strictly above it

Open problem: What is thecomplexity of k-levels?

Dual problem: What is the numberof k-sets in a point set?

Known bounds:

Erdos et al. ’73:Ω(n logk) and O(nk1/2)

Dey ’97: O(nk1/3)

3

1

0

22

2

1

3

33 4

Computational Geometry Lecture 11: Arrangements and Duality60

Page 61: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

k-levels in Arrangements

The level of a point in an arrangement of lines is the number oflines strictly above it

Open problem: What is thecomplexity of k-levels?

Dual problem: What is the numberof k-sets in a point set?

Known bounds:

Erdos et al. ’73:Ω(n logk) and O(nk1/2)

Dey ’97: O(nk1/3)

5-set

`

Computational Geometry Lecture 11: Arrangements and Duality61

Page 62: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

k-levels in Arrangements

The level of a point in an arrangement of lines is the number oflines strictly above it

Open problem: What is thecomplexity of k-levels?

Dual problem: What is the numberof k-sets in a point set?

Known bounds:

Erdos et al. ’73:Ω(n logk) and O(nk1/2)

Dey ’97: O(nk1/3)

5-set

`

Computational Geometry Lecture 11: Arrangements and Duality62

Page 63: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

k-levels in Arrangements

The level of a point in an arrangement of lines is the number oflines strictly above it

Open problem: What is thecomplexity of k-levels?

Dual problem: What is the numberof k-sets in a point set?

Known bounds:

Erdos et al. ’73:Ω(n logk) and O(nk1/2)

Dey ’97: O(nk1/3)

5-set

`

Computational Geometry Lecture 11: Arrangements and Duality63

Page 64: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Three dimensions

In 3D, we have point-plane duality

point p = (px,py,pz) 7→ plane p∗ : z = pxx+pyy−pz

plane Π : z = mx+ ky+b 7→ point Π∗ = (m,k,−b)

Lines dualize to other lines

Note: self inverse (p∗)∗ = p, (`∗)∗ = ` does not handlevertical planes

Computational Geometry Lecture 11: Arrangements and Duality64

Page 65: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Three dimensions

An arrangement induced by n planes in 3D has complexityO(n3)

Deciding whether a set of points in 3D has four or moreco-planar points can be done in O(n3) time (dualize andconstruct the arrangement)

The zone of a plane in an arrangement of n planes hascomplexity O(n2)

Computational Geometry Lecture 11: Arrangements and Duality65

Page 66: Lecture 11: Arrangements and Dualitybgenc/courses/bca... · Lecture 11: Arrangements and Duality 1 Computational Geometry Lecture 11: Arrangements and Duality. Introduction Duality

IntroductionDuality

Arrangements

Incremental ConstructionMotion Planningk-Levels

Summary

Duality is a useful tool to reformulate certain problems onpoints in the plane to lines in the plane, and vice versa

Dualization of line segments is especially useful

Arrangements, zones of lines in arrangements, and levels inarrangements are useful concepts in computational geometry

All of this exists in three and higher dimensional spaces too

Computational Geometry Lecture 11: Arrangements and Duality66