Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of...

118
Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense David L. Millman University of North Carolina at Chapel Hill October 10, 2012 David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 1 / 53

Transcript of Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of...

Page 1: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Degree-Driven Design of Geometric Algorithms forPoint Location, Proximity, and Volume Calculation

PhD Defense

David L. Millman

University of North Carolina at Chapel Hill

October 10, 2012

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 1 / 53

Page 2: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometric Algorithms

a

b

cd e

f

Point location data structure

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 2 / 53

Page 3: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometric Algorithms

q

a

b

cd e

f

Point location data structure

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 2 / 53

Page 4: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometric Algorithms

q

a

b

cd e

f

q

a

b

cd e

f

Point location data structure

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 2 / 53

Page 5: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 3 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 6: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 3 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 7: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

A Motivational Problem

DoSegsIntersect:Given two segments,defined by their 2D endpoints,with no three endpoints collinear,do the segments intersect?

How much arithmetic precision isneeded to determine this?

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 4 / 53

Page 8: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

A Motivational Problem

DoSegsIntersect:Given two segments,defined by their 2D endpoints,with no three endpoints collinear,do the segments intersect?

How much arithmetic precision isneeded to determine this?

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 4 / 53

Page 9: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Input Representation

Input: Geometric configuration specified bysingle precision numerical coordinates andrelationships between coordinates.

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4) E.g. DoSegsIntersect problem:Numerical coordinates:

(0,4,0,3,1,0,1,2)Relationships between coordinates:

a = (ax ,ay ) = (0,4)b = (bx ,by ) = (0,3)c = (cx , cy ) = (1,0)d = (dx ,dy ) = (1,2)ac = (a, c)bd = (b,d)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 5 / 53

Page 10: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Solving DoSegsIntersect with Construction

InterByConstruction(a, c,b,d):Determine if ac and bd intersect;if so return INTERSECT, if not return NOINTERSECT

Require: no three points are collinear1: if←→ac ‖

←→bd then

2: return NOINTERSECT3: end if4: Point q =

←→ac ∩←→bd

5: Real t1 = (qx − ax )/(cx − ax )6: Real t2 = (qx − bx )/(dx − bx )7: if t1 ∈ (0,1) and t2 ∈ (0,1) then8: return INTERSECT9: else

10: return NOINTERSECT11: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 6 / 53

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

Page 11: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Solving DoSegsIntersect with Construction

InterByConstruction(a, c,b,d):Determine if ac and bd intersect;if so return INTERSECT, if not return NOINTERSECT

Require: no three points are collinear1: if←→ac ‖

←→bd then

2: return NOINTERSECT3: end if4: Point q =

←→ac ∩←→bd

5: Real t1 = (qx − ax )/(cx − ax )6: Real t2 = (qx − bx )/(dx − bx )7: if t1 ∈ (0,1) and t2 ∈ (0,1) then8: return INTERSECT9: else

10: return NOINTERSECT11: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 6 / 53

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

Page 12: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometry→ Algebra→ R arithmetic→ IEEE-754

Line 4: Point q =←→ac ∩

←→bd

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 7 / 53

Page 13: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometry→ Algebra→ R arithmetic→ IEEE-754

The Intersect(a, c,b,d) construction:

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

Input: single precision coordinatesof a, c,b and d definingnon-parallel lines←→ac and

←→bd .

Construct: the intersection qof←→ac and

←→bd .

qx =

∣∣∣∣axcy − cxay ax − cxbxdy − dxby bx − dx

∣∣∣∣∣∣∣∣ax − cx ay − cybx − dx by − dy

∣∣∣∣ ,qy =

∣∣∣∣axcy − cxay ay − cybxdy − dxby by − dy

∣∣∣∣∣∣∣∣ax − cx ay − cybx − dx by − dy

∣∣∣∣David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 8 / 53

Page 14: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometry→ Algebra→ R arithmetic→ IEEE-754

The Intersect(a, c,b,d) construction:

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4) Input: single precision coordinatesof a, c,b and d definingnon-parallel lines←→ac and

←→bd .

Construct: the intersection qof←→ac and

←→bd .

qx = 0.3qy = 2.6

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 9 / 53

Page 15: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Geometry→ Algebra→ R arithmetic→ IEEE-754

The Intersect(a, c,b,d) construction:

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

Input: single precision coordinatesof a, c,b and d definingnon-parallel lines←→ac and

←→bd .

Construct: the intersection qof←→ac and

←→bd .

In Python with numpy.float32 typea:

fl(qx ) ≈ 0.33333334fl(qy ) ≈ 2.66666675fl(q) 6∈ fl(ac) & fl(q) 6∈ acfl(q) 6∈ fl(bd) & fl(q) 6∈ bd

aValues are the shortest decimal fraction that rounds

correctly back to the true binary value.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 10 / 53

Page 16: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Thesis Statement

Real-RAM has 3 unbounded quantities.The number of:

1 steps an algorithm may take2 memory cells an algorithm may use3 bits for representing numbers in cells

Thesis Statement:Degree-driven design supports the development ofnew and robust geometric algorithms.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 11 / 53Image from: http://en.wikipedia.org/wiki/File:Maquina.png

Page 17: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Thesis Statement

Real-RAM has 3 unbounded quantities.The number of:

1 steps an algorithm may take2 memory cells an algorithm may use3 bits for representing numbers in cells

Thesis Statement:Degree-driven design supports the development ofnew and robust geometric algorithms.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 11 / 53Image from: http://en.wikipedia.org/wiki/File:Maquina.png

Page 18: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Thesis Statement

Real-RAM has 3 unbounded quantities.The number of:

1 steps an algorithm may take2 memory cells an algorithm may use3 bits for representing numbers in cells

Thesis Statement:Degree-driven design supports the development ofnew and robust geometric algorithms.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 11 / 53Image from: http://en.wikipedia.org/wiki/File:Maquina.png

Page 19: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

Input: single precision coordinatesof a, b and q.Return: whether the straight linepath from a to b to q forms a rightturn.

A predicate is a test of the sign of a multivariate polynomial withvariables from the input coordinates.

Orientation(a, b, q) = sign(bx qy − bx ay − ax qy − qx by + qx ay + ax by )

= sign( 2©)

Orientation < 0 Right turnOrientation > 0 Left turnOrientation = 0 Collinear

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 20: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2isRightTurn is degree 2

A predicate is a test of the sign of a multivariate polynomial withvariables from the input coordinates.

Orientation(a, b, q) = sign(bx qy − bx ay − ax qy − qx by + qx ay + ax by )

= sign( 2©)

Orientation < 0 Right turnOrientation > 0 Left turnOrientation = 0 Collinear

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 21: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2isRightTurn is degree 2

A predicate is a test of the sign of a multivariate polynomial withvariables from the input coordinates.

Orientation(a, b, q) = sign(bx qy − bx ay − ax qy − qx by + qx ay + ax by )

= sign( 2©)

Orientation < 0 Right turnOrientation > 0 Left turnOrientation = 0 Collinear

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 22: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2isRightTurn is degree 2

A predicate is a test of the sign of a multivariate polynomial withvariables from the input coordinates.

Orientation(a, b, q) = sign(bx qy − bx ay − ax qy − qx by + qx ay + ax by )

= sign( 2©)

Orientation < 0 Right turnOrientation > 0 Left turnOrientation = 0 Collinear

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 23: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

A predicate is a test of the sign of a multivariate polynomial withvariables from the input coordinates.

Orientation(a, b, q) = sign(bx qy − bx ay − ax qy − qx by + qx ay + ax by )

= sign( 2©)

Orientation < 0 Right turnOrientation > 0 Left turnOrientation = 0 Collinear

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 24: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .Each monomial is in {−2`k , . . . ,2`k}.The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 25: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .

Each monomial is in {−2`k , . . . ,2`k}.The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 26: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .Each monomial is in {−2`k , . . . ,2`k}.

The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 27: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .Each monomial is in {−2`k , . . . ,2`k}.The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.

=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 28: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .Each monomial is in {−2`k , . . . ,2`k}.The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 29: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

How the degree relates to precision:

Consider multivariate poly Q(x1, . . . , xn) of deg k and s monomials(for simplicity, assume that coefficient of each monomial is 1).

Let each xi be an `-bit integer =⇒ xi ∈ {−2`, . . . ,2`} .Each monomial is in {−2`k , . . . ,2`k}.The value of Q(x1, . . . , xn) is in {−s2`k , . . . , s2`k}.=⇒ `k + log(s) + O(1) bits are enough to evaluate Q.

Note that `k bits is enough to evaluate the sign.

Page 30: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

isRightTurn(a, b, q):1: if Orientation(a, b, q) < 0 then2: return TRUE3: else4: return FALSE5: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 31: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2

isRightTurn is degree 2

isRightTurn(a, b, q):1: if Orientation(a, b, q) < 0 then2: return TRUE3: else4: return FALSE5: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 32: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Analyzing Precision [LPT99]

Precision used by the isRightTurn:

q

ab

U = {1, . . . ,U}2a,b,q ∈ Ua = (ax ,ay )b = (bx ,by )q = (qx ,qy )

Orientation is degree 2isRightTurn is degree 2

isRightTurn(a, b, q):1: if Orientation(a, b, q) < 0 then2: return TRUE3: else4: return FALSE5: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 12 / 53

Page 33: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Solving DoSegsIntersect without ConstructionInterByOrientation(a, c,b,d):Determine if ac and bd intersect;if so return INTERSECT, if not return NOINTERSECT

Require: no three points are collinear1: if Orientation(a, c,b) 6= Orientation(a, c,d) andOrientation(b,d ,a) 6= Orientation(b,d , c) then

2: return INTERSECT

3: else4: return NOINTERSECT

5: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 13 / 53

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

Page 34: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Solving DoSegsIntersect without ConstructionInterByOrientation(a, c,b,d):Determine if ac and bd intersect;if so return INTERSECT, if not return NOINTERSECT

Require: no three points are collinear1: if Orientation(a, c,b) 6= Orientation(a, c,d) andOrientation(b,d ,a) 6= Orientation(b,d , c) then

2: return INTERSECT

3: else4: return NOINTERSECT

5: end if

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 13 / 53

c = (1, 0)

d = (1, 2)

b = (0, 3)

q = ( 13 ,83 )

a = (0, 4)

In summary:Orientation predicate is degree 2InterByOrientation algorithm is degree 2InterByConstruction algorithm is degree 3

Page 35: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

More Predicates

Some other well known predicates:

q

ab

Orientation(a, b, q)degree 2

q

a

bBab

SideOfBisector(Bab, q)degree 2

q

a

b

c

InCircle(a, b, c, q)degree 4

a

bBab

d c

Bcd

`

OrderOnLine(Bab,Bcd , `)

degree 3

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 14 / 53

Page 36: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision/Robust Techniques

Techniques for implementing geometric algorithmsusing finite precision computer arithmetic:

Rely on machine precision (+ε) [NAT90,LTH86,KMP*08]Topological Consistency [S99, S01, SI90, SI92, SII*00]Exact Geometric Computation [Y97]

Software based arithmetic [ CORE, LEDA, GMP, MPFR ]Predicate eval schemes [ ABO*97, FW93, BBP01, S97 ]Degree-driven algorithm design [LPT99]

and [BP00,BS00,C00,MS01,MS09,MS10,MV11,MLC*12]

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 15 / 53

Page 37: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision/Robust Techniques

Techniques for implementing geometric algorithmsusing finite precision computer arithmetic:

Rely on machine precision (+ε) [NAT90,LTH86,KMP*08]Topological Consistency [S99, S01, SI90, SI92, SII*00]Exact Geometric Computation [Y97]

Software based arithmetic [ CORE, LEDA, GMP, MPFR ]Predicate eval schemes [ ABO*97, FW93, BBP01, S97 ]Degree-driven algorithm design [LPT99]

and [BP00,BS00,C00,MS01,MS09,MS10,MV11,MLC*12]

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 15 / 53

Page 38: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 16 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 39: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Point Location Data Structure

a

b

cd e

f

GivenA grid of size U andsites S = {s1, . . . , sn} ⊂ U

ComputeA data structure capable ofreturning the closest si ∈ S to aquery point q ∈ U in O(log n) time

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 17 / 53

Page 40: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

a

b

cd e

f

Voronoi diagramregion

edgevertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degreey -node() – degree

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 41: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

a

b

cd e

f

Voronoi diagramregionedge

vertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degreey -node() – degree

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 42: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

a

b

cd e

f

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degreey -node() – degree

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 43: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

q

a

b

cd e

f

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries

[LPT99]x-node() – degree 3y -node() – degree

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 44: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

q

a

b

cd e

f

v1

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degree 3

y -node() – degree 6

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 45: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

q

v2

a

b

cd e

f

v1

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degree 3y -node() – degree 6

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 46: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

a

b

cd e

f

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries

[LPT99]

x-node() – degree 3y -node() – degree 6

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 47: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Voronoi Diagram/Trapezoid Graph

a

b

cd e

f

Voronoi diagramregionedgevertex

Trapezoid graph forproximity queries [LPT99]

x-node() – degree 1y -node() – degree 2

The Implicit Voronoi diagramis a degree 2 trapezoid graph.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 18 / 53

Page 48: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Constructing the Voronoi Diagram

Three well-known Voronoi diagram constructions.

Sweepline[F87]– degree 6

General Subdivisions and Voronoi Diagrams l 105

Fig. 15. The Voronoi diagram (solid) and the Delaunay diagram (dashed).

these facts see Lee’s thesis [13]. The following obvious lemma will be important in the sequel.

LEMMA 7.1. Let L and R be two sets of points. Any edge of the Delaunay diagram of L U R whose endpoints are both in L is in the Delaunay diagram of L.

In other words, the addition of new points does not introduce new edges between the old points.

7.1 Delaunay Triangulations

A triangulation of n 1 2 sites is a straight-line subdivision of the extended plane whose vertices are the given sites and whose faces are all triangular except for one, which is the complement of the convex hull of the sites. It is easily shown that any triangulation of n sites, of which k lie on the convex hull, has 2(n - 1) - k triangles and 3(n - 1) - k edges.

If no four of the sites happen to be cocircular, then their Delaunay diagram is a triangulation; in any case, it can be made into one by introducing zero or more additional edges. The subdivisions obtained in this way are called Delaunay triangulations of the given sites. They are characterized by either of the following properties.

LEMMA 7.2. A triangulation of n 2 2 sites is Delaunay if and only if every edge has a point-free circle passing through its endpoints.

LEMMA 7.3. A triangulation of n 2 2 sites is Delaunay if and only if the circumcircle of every interior face (triangle) is point -free.

We will say that an edge or triangle is Delaunay when there is a point-free circle passing through its vertices. We speak of that circle as being witness to the

ACM Transactions on Graphics, Vol. 4, No. 2, April 1985.

Divide and Conquer[GS86]– degree 4

111. DESIGN OF A ROBUST ALGORITHM

Fig. 2. in the incremental construction of the Voronoi diagram.

Topological inconsistency arising from numerical errors

p i ; in (b) the bisector is represented by a broken line. The bisector crosses the boundary of R ( p i ) at two points. Let one of them be q. At q the bisector enters the neighboring region R ( p j ) . Next, we draw the bisector of p and p j to find the point of intersection (other than q ) of the bisector with the boundary of R ( p j ) . In this way, we construct a sequence of the bisectors between p and the neighboring generators until we return to the boundary of the starting region R ( p i ) . Removing the points and edges enclosed by the closed sequence of part of the bisectors, we finally obtain the Voronoi region of the new generator p .

A sophisticated data structure with a quarternary tree and with buckets enables us to find the starting generator pi in constant expected time, and to keep the average number of edges on the boundary of the new Voronoi region constant [ 151. Hence, the incremental method carries out the addition of one generator in constant expected time, so that it constructs the Voronoi diagram for n generators in O(n) expected time. This expected time complexity is theoretically ensured for randomly distributed generators, and empirically shown for a wide class of distributions [ 151.

The incremental method is simple in principle, and it is usually said that this method is also robust against numerical errors; indeed, a computer program based on the incremental method has been used for a number of applications [8], [ l l ] , [15].

However, the incremental-type algorithm as well as other algorithms is unstable when degeneracy takes place. An ex- ample of a situation in which the conventional incremental- type algorithm fails is shown in Fig. 2, where the perpen- dicular bisectors between the new generator and the nearest old generator pass near a Voronoi point, and the boundary of the Voronoi region of the new generator does not form a closed cycle because of numerical error.

Hence, the avoidance of inconsistency arising from nu- merical errors is an important problem for practical imple- mentation of the algorithm.

A. Placing the Highest Priority on Topological Consistency A Voronoi diagram can be regarded as a planar graph

embedded in a plane. Let Gi be the embedded graph associated with the Voronoi diagram for i generators p l , p2, . . . , p,. From a topological point of view, the addition of a new generator pl to the Voronoi diagram for 1 - 1 generators P I , p2, . . ' , p l - l can be considered the task for changing G1-1 to GI. This task is done by the next procedure.

Procedure A Al. A2.

A3.

A4.

Select a subset, say T , of the vertex set of G1-1. For every edge connecting a vertex in T with a vertex not in T , generate a new vertex on it and thus divide the edge into two edges. Generate new edges connecting the vertices gener- ated in A2 in such a way that the new edges form a cycle that encloses the vertices in T and them only. Remove the vertices in T and the edges incident to them (and regard the interior of the cycle as the Voronoi region of p l ) , and let the resulting embedded graph be G1.

An example of the behavior of this procedure is illus- trated in Fig. 3(a). Suppose that the solid lines represent a portion of the embedded graph Gl-1 and that the four solid circles represent the vertices in T chosen in step Al . Then, the six vertices represented by hollow circles are generated in step A2, the cycle represented by the broken lines is generated in step A3, and the substructure enclosed by this cycle is removed in step A4.

Note that Procedure A is described in purely combi- natorial terms, so that this procedure is not affected by numerical errors. However, there is an ambiguity in the choice of T in step Al . Next, we consider what conditions should be satisfied by T in order for Procedure A to be the correct procedure for constructing the Voronoi diagram.

Let us consider a triangle that is large enough to include all the generators and regard the three vertices of this triangle as the additional generators. We renumber the gen- erators in such a way that p l , p2, and p3 are the additional generators and p4, p 5 , . . . , p , the original generators (now, n is the number of the original generators plus 3), and try to construct the Voronoi diagram for P = {PI, p2, . . . , p,}.

The Voronoi diagram for the three generators p l , p2, and p3 consists of three infinite edges, as shown in Fig. 4(a). To represent the topological structure of this Voronoi diagram we consider the embedded graph G3 shown in Fig. 4(b), where we introduce a sufficiently large closed curve and consider that the infinite Voronoi edges have their terminal points on this closed curve, as represented by the small solid triangles. With this convention, any Voronoi region is explicitly represented by a cycle of the embedded graph. We start with G3, and add the other generators p4, p 5 , 9 . . , p , one by one.

SUGIHARA AND IRI: CONSTRUCTION OF THE VORONOI DIAGRAM 1473

Tracing[SI92]– degree 4

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 19 / 53

Page 49: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Precision of Constructing the Voronoi Diagram

Three well-known Voronoi diagram constructions.

Sweepline[F87]– degree 6

General Subdivisions and Voronoi Diagrams l 105

Fig. 15. The Voronoi diagram (solid) and the Delaunay diagram (dashed).

these facts see Lee’s thesis [13]. The following obvious lemma will be important in the sequel.

LEMMA 7.1. Let L and R be two sets of points. Any edge of the Delaunay diagram of L U R whose endpoints are both in L is in the Delaunay diagram of L.

In other words, the addition of new points does not introduce new edges between the old points.

7.1 Delaunay Triangulations

A triangulation of n 1 2 sites is a straight-line subdivision of the extended plane whose vertices are the given sites and whose faces are all triangular except for one, which is the complement of the convex hull of the sites. It is easily shown that any triangulation of n sites, of which k lie on the convex hull, has 2(n - 1) - k triangles and 3(n - 1) - k edges.

If no four of the sites happen to be cocircular, then their Delaunay diagram is a triangulation; in any case, it can be made into one by introducing zero or more additional edges. The subdivisions obtained in this way are called Delaunay triangulations of the given sites. They are characterized by either of the following properties.

LEMMA 7.2. A triangulation of n 2 2 sites is Delaunay if and only if every edge has a point-free circle passing through its endpoints.

LEMMA 7.3. A triangulation of n 2 2 sites is Delaunay if and only if the circumcircle of every interior face (triangle) is point -free.

We will say that an edge or triangle is Delaunay when there is a point-free circle passing through its vertices. We speak of that circle as being witness to the

ACM Transactions on Graphics, Vol. 4, No. 2, April 1985.

Divide and Conquer[GS86]– degree 4

111. DESIGN OF A ROBUST ALGORITHM

Fig. 2. in the incremental construction of the Voronoi diagram.

Topological inconsistency arising from numerical errors

p i ; in (b) the bisector is represented by a broken line. The bisector crosses the boundary of R ( p i ) at two points. Let one of them be q. At q the bisector enters the neighboring region R ( p j ) . Next, we draw the bisector of p and p j to find the point of intersection (other than q ) of the bisector with the boundary of R ( p j ) . In this way, we construct a sequence of the bisectors between p and the neighboring generators until we return to the boundary of the starting region R ( p i ) . Removing the points and edges enclosed by the closed sequence of part of the bisectors, we finally obtain the Voronoi region of the new generator p .

A sophisticated data structure with a quarternary tree and with buckets enables us to find the starting generator pi in constant expected time, and to keep the average number of edges on the boundary of the new Voronoi region constant [ 151. Hence, the incremental method carries out the addition of one generator in constant expected time, so that it constructs the Voronoi diagram for n generators in O(n) expected time. This expected time complexity is theoretically ensured for randomly distributed generators, and empirically shown for a wide class of distributions [ 151.

The incremental method is simple in principle, and it is usually said that this method is also robust against numerical errors; indeed, a computer program based on the incremental method has been used for a number of applications [8], [ l l ] , [15].

However, the incremental-type algorithm as well as other algorithms is unstable when degeneracy takes place. An ex- ample of a situation in which the conventional incremental- type algorithm fails is shown in Fig. 2, where the perpen- dicular bisectors between the new generator and the nearest old generator pass near a Voronoi point, and the boundary of the Voronoi region of the new generator does not form a closed cycle because of numerical error.

Hence, the avoidance of inconsistency arising from nu- merical errors is an important problem for practical imple- mentation of the algorithm.

A. Placing the Highest Priority on Topological Consistency A Voronoi diagram can be regarded as a planar graph

embedded in a plane. Let Gi be the embedded graph associated with the Voronoi diagram for i generators p l , p2, . . . , p,. From a topological point of view, the addition of a new generator pl to the Voronoi diagram for 1 - 1 generators P I , p2, . . ' , p l - l can be considered the task for changing G1-1 to GI. This task is done by the next procedure.

Procedure A Al. A2.

A3.

A4.

Select a subset, say T , of the vertex set of G1-1. For every edge connecting a vertex in T with a vertex not in T , generate a new vertex on it and thus divide the edge into two edges. Generate new edges connecting the vertices gener- ated in A2 in such a way that the new edges form a cycle that encloses the vertices in T and them only. Remove the vertices in T and the edges incident to them (and regard the interior of the cycle as the Voronoi region of p l ) , and let the resulting embedded graph be G1.

An example of the behavior of this procedure is illus- trated in Fig. 3(a). Suppose that the solid lines represent a portion of the embedded graph Gl-1 and that the four solid circles represent the vertices in T chosen in step Al . Then, the six vertices represented by hollow circles are generated in step A2, the cycle represented by the broken lines is generated in step A3, and the substructure enclosed by this cycle is removed in step A4.

Note that Procedure A is described in purely combi- natorial terms, so that this procedure is not affected by numerical errors. However, there is an ambiguity in the choice of T in step Al . Next, we consider what conditions should be satisfied by T in order for Procedure A to be the correct procedure for constructing the Voronoi diagram.

Let us consider a triangle that is large enough to include all the generators and regard the three vertices of this triangle as the additional generators. We renumber the gen- erators in such a way that p l , p2, and p3 are the additional generators and p4, p 5 , . . . , p , the original generators (now, n is the number of the original generators plus 3), and try to construct the Voronoi diagram for P = {PI, p2, . . . , p,}.

The Voronoi diagram for the three generators p l , p2, and p3 consists of three infinite edges, as shown in Fig. 4(a). To represent the topological structure of this Voronoi diagram we consider the embedded graph G3 shown in Fig. 4(b), where we introduce a sufficiently large closed curve and consider that the infinite Voronoi edges have their terminal points on this closed curve, as represented by the small solid triangles. With this convention, any Voronoi region is explicitly represented by a cycle of the embedded graph. We start with G3, and add the other generators p4, p 5 , 9 . . , p , one by one.

SUGIHARA AND IRI: CONSTRUCTION OF THE VORONOI DIAGRAM 1473

Tracing[SI92]– degree 4

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 19 / 53

How do we builda degree 2 trapezoid graphfor proximity querieswhen we can’t even constructa Voronoi vertex?

Page 50: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Implicit Voronoi Diagram [LPT99]

a

b

cd e

f

Implicit Voronoi diagramis disconnected.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 20 / 53

Page 51: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Reduced Precision Voronoi [MS09]

Given n sites in U

RP-Voronoi randomized incremental constructionTime: O(n log(Un)) expectedSpace: O(n) expectedPrecision: degree 3

LPT’s Implicit Voronoi constructed from RP-Voronoi

Time: O(n)

Space: O(n)

Precision: degree 3

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 21 / 53

Page 52: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Reduced Precision Voronoi [MS09]

Given n sites in U

RP-Voronoi randomized incremental constructionTime: O(n log(Un)) expectedSpace: O(n) expectedPrecision: degree 3

LPT’s Implicit Voronoi constructed from RP-Voronoi

Time: O(n)

Space: O(n)

Precision: degree 3

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 21 / 53

Contract trees of Voronoi verticesthat occur in the same grid cellinto an rp-vertex.

Page 53: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Voronoi Polygon Set

a

b

cd e

f

Voronoi polygon isthe convex hullof the grid pointsin a Voronoi cell.

GapsVoronoi polygon set isthe collection of the nVoronoi polygons.Total size of theVoronoi polygon setis Θ(n log U).

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 22 / 53

Page 54: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Voronoi Polygon Set

a

b

cd e

f

Voronoi polygon isthe convex hullof the grid pointsin a Voronoi cell.Gaps

Voronoi polygon set isthe collection of the nVoronoi polygons.Total size of theVoronoi polygon setis Θ(n log U).

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 22 / 53

Page 55: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Voronoi Polygon Set

a

b

cd e

f

Voronoi polygon isthe convex hullof the grid pointsin a Voronoi cell.GapsVoronoi polygon set isthe collection of the nVoronoi polygons.

Total size of theVoronoi polygon setis Θ(n log U).

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 22 / 53

Page 56: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Voronoi Polygon Set

a

b

cd e

f

Voronoi polygon isthe convex hullof the grid pointsin a Voronoi cell.GapsVoronoi polygon set isthe collection of the nVoronoi polygons.Total size of theVoronoi polygon setis Θ(n log U).

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 22 / 53

Page 57: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Proxy Segments

a

b

cd e

f

Proxy segment -represent Voronoi polygons

Proxy trapezoidation -trapezoidation of the proxies

Voronoi trapezoidation -split the trapezoidsof the proxy trapezoidationwith bisectors

Proxy trapezoidationis a degree 2 trapezoid graphsupporting O(log n) time anddegree 2 queries.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 23 / 53

Page 58: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Proxy Segments

a

b

cd e

f

Proxy segment -represent Voronoi polygons

Proxy trapezoidation -trapezoidation of the proxies

Voronoi trapezoidation -split the trapezoidsof the proxy trapezoidationwith bisectors

Proxy trapezoidationis a degree 2 trapezoid graphsupporting O(log n) time anddegree 2 queries.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 23 / 53

Page 59: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Proxy Segments

a

b

cd e

f

Proxy segment -represent Voronoi polygons

Proxy trapezoidation -trapezoidation of the proxies

Voronoi trapezoidation -split the trapezoidsof the proxy trapezoidationwith bisectors

Proxy trapezoidationis a degree 2 trapezoid graphsupporting O(log n) time anddegree 2 queries.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 23 / 53

Page 60: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Proxy Segments

a

b

cd e

f

Proxy segment -represent Voronoi polygons

Proxy trapezoidation -trapezoidation of the proxies

Voronoi trapezoidation -split the trapezoidsof the proxy trapezoidationwith bisectors

Proxy trapezoidationis a degree 2 trapezoid graphsupporting O(log n) time anddegree 2 queries.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 23 / 53

Page 61: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Proxy Segments

a

b

cd e

f

Proxy segment -represent Voronoi polygons

Proxy trapezoidation -trapezoidation of the proxies

Voronoi trapezoidation -split the trapezoidsof the proxy trapezoidationwith bisectors

Proxy trapezoidationis a degree 2 trapezoid graphsupporting O(log n) time anddegree 2 queries.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 23 / 53

Page 62: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Point Location[MS09,MS10]

Given n sites in U

RP-Voronoi randomized incremental constructionTime: O(n log(Un)) expectedSpace: O(n) expectedPrecision: degree 3

LPT’s Implicit Voronoi constructed from RP-Voronoi

Time: O(n)

Space: O(n)

Precision: degree 3

Queries on Proxy Trapezoidation

Time: O(log n)

Precision: degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 24 / 53

Page 63: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 25 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 64: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Nearest Neighbor Transform

s3

s4

s7s2

s1

s6

s5

GivenA grid of size U andSites S = {s1, . . . , sn} ⊂ U

LabelEach grid point of U with theclosest site of S

Algorithm Precision TimeBrute Force degree 2 O(nU2)Nearest Neighbor Trans. [B90] degree 5 O(U2)Discrete Voronoi diagram [C06, MQR03] degree 3 O(U2)GPU Hardware [H99] - Θ(nU2)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 26 / 53

Page 65: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Nearest Neighbor Transform

s3

s4

s7s2

s1

s6

s5

GivenA grid of size U andSites S = {s1, . . . , sn} ⊂ U

LabelEach grid point of U with theclosest site of S

Algorithm Precision TimeBrute Force degree 2 O(nU2)Nearest Neighbor Trans. [B90] degree 5 O(U2)Discrete Voronoi diagram [C06, MQR03] degree 3 O(U2)GPU Hardware [H99] - Θ(nU2)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 26 / 53

Page 66: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 1

Problem (NNTrans-min)

For each pixel q ∈ U2, find the site with lowest index si ∈ Sminimizing ‖q − si‖.

‖q − si‖2 < ‖q − sj‖2

q · q − 2q · si + si · si < q · q − 2q · sj + sj · sj

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j .

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 27 / 53

Page 67: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 1

Problem (NNTrans-min)

For each pixel q ∈ U2, find the site with lowest index si ∈ Sminimizing ‖q − si‖.

‖q − si‖2 < ‖q − sj‖2

q · q − 2q · si + si · si < q · q − 2q · sj + sj · sj

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j .

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 27 / 53

Page 68: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 1

Problem (NNTrans-min)

For each pixel q ∈ U2, find the site with lowest index si ∈ Sminimizing ‖q − si‖.

‖q − si‖2 < ‖q − sj‖2

q · q − 2q · si + si · si < q · q − 2q · sj + sj · sj

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j .

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 27 / 53

Page 69: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 2

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

For a fixed, yq = Y

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j

2xixq + (2yiY − x2i − y2

i ) > 2xjxq + (2yjY − x2j − y2

j )

1©xq + 2© > 1©xq + 2©

Problem (DUE-Y)For a fixed 1 ≤ Y ≤ U, and for each 1 ≤ X ≤ U,find the smallest index of a line of LY withmaximum y coordinate at x = X.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 28 / 53

Page 70: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 2

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

For a fixed, yq = Y

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j

2xixq + (2yiY − x2i − y2

i ) > 2xjxq + (2yjY − x2j − y2

j )

1©xq + 2© > 1©xq + 2©

Problem (DUE-Y)For a fixed 1 ≤ Y ≤ U, and for each 1 ≤ X ≤ U,find the smallest index of a line of LY withmaximum y coordinate at x = X.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 28 / 53

Page 71: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 2

Problem (NNTrans-max)For each pixel q, find the site with lowest index si ∈ Smaximizing 2xixq + 2yiyq − x2

i − y2i .

For a fixed, yq = Y

2xixq + 2yiyq − x2i − y2

i > 2xjxq + 2yjyq − x2j − y2

j

2xixq + (2yiY − x2i − y2

i ) > 2xjxq + (2yjY − x2j − y2

j )

1©xq + 2© > 1©xq + 2©

Problem (DUE-Y)For a fixed 1 ≤ Y ≤ U, and for each 1 ≤ X ≤ U,find the smallest index of a line of LY withmaximum y coordinate at x = X.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 28 / 53

Page 72: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Problem Transformations: Part 2

Problem (DUE-Y)For a fixed 1 ≤ Y ≤ U, and for each 1 ≤ X ≤ U,find the smallest index of a line of LY withmaximum y coordinate at x = X.

s1

s2

s3

s4

`71

`73

`72

`74Y = 7

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 29 / 53

Page 73: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Sketch of NNTransform Algorithm

s3

s4

s6

s7

Y = 7

`73

`76

`74

`77s3

s4

s7s2

s1

Y = 7s6

s5

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 30 / 53

Page 74: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Three Algorithms for Computing the DUE [MLCS12]

Given m lines of the form y = 1©x + 2©

Discrete Upper Envelope construction

DUE-DEG3: O(m + U) time and degree 3DUE-ULgU: O(m + U log U) time and degree 2DUE-U:O(m + U) expected time and degree 2

For each algorithm:1 Reduce to at most O(U) lines.2 Compute DUE of lines.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 31 / 53

Page 75: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Three Algorithms for Computing the DUE [MLCS12]

Given m lines of the form y = 1©x + 2©

Discrete Upper Envelope construction

DUE-DEG3: O(m + U) time and degree 3DUE-ULgU: O(m + U log U) time and degree 2DUE-U:O(m + U) expected time and degree 2

For each algorithm:1 Reduce to at most O(U) lines.2 Compute DUE of lines.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 31 / 53

Page 76: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Three Algs for Computing the NNTransform [MLCS12]

Given n sites from U

Nearest Neighbor Transform construction

Deg3: O(U2) time and degree 3UsqLgU: O(U2 log U) time and degree 2Usq: O(U2) expected time and degree 2

s3

s4

s6

s7

Y = 7

`73

`76

`74

`77s3

s4

s7s2

s1

Y = 7s6

s5

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 32 / 53

Page 77: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Three Algs for Computing the NNTransform [MLCS12]

Given n sites from U

Nearest Neighbor Transform construction

Deg3: O(U2) time and degree 3UsqLgU: O(U2 log U) time and degree 2Usq: O(U2) expected time and degree 2

s3

s4

s6

s7

Y = 7

`73

`76

`74

`77s3

s4

s7s2

s1

Y = 7s6

s5

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 32 / 53

Page 78: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Part 1

Maurer

Usq

UsqLgU

Deg3

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 33 / 53

Page 79: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Part 2

Boundaries extractedfrom 120 images of theMPEG 7 CE Shape-1Part B data set.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 34 / 53

Page 80: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Part 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 34 / 53

Page 81: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Part 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 34 / 53

Page 82: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

NNTransform [MLCS12]

Given m lines of the form y = 1©x + 2©

Discrete Upper Envelope construction

DUE-DEG3: O(m + U) time and degree 3DUE-ULgU: O(m + U log U) time and degree 2DUE-U:O(m + U) expected time and degree 2

Given n sites from U

Nearest Neighbor Transform construction

Deg3: O(U2) time and degree 3UsqLgU: O(U2 log U) time and degree 2Usq: O(U2) expected time and degree 2

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 35 / 53

Page 83: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 36 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 84: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Motivation and Background

Image from Idaho National Lab, Flickr Image from: T.M. Sutton, et al.,The MC21 Monte Carlo Transport Code,Proceedings of M&C + SNA 2007

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 37 / 53

Page 85: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Primitives: Signed Quadratic Surfaces

f (x , y , z) < A1x2 + A2y2 + A3z2

+ A4xy + A5xz + A6yz+ A7x + A8y + A9z + A10

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 38 / 53

Page 86: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Model RepresentationBasic Component: Boolean Formula

A basic component defined byintersections and unions of signed surfaces.

(−sblue ∩ sgrey ∩ sgreen ∩ −sorange) ∪ −syellow

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 39 / 53

Page 87: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Model RepresentationComponent Hierarchy: Boolean Formulae

Basic comp: B(N), ∪ and ∩ of signed surfaces

Restricted comp: R(N) = B(N) ∩ R(Np)Hierarchical comp: H(N) = R(N) \ (

⋃i R(Nci))

Np

Nc4Nc3Nc2Nc1

N

N

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 40 / 53

Page 88: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Model RepresentationComponent Hierarchy: Boolean Formulae

Basic comp: B(N), ∪ and ∩ of signed surfacesRestricted comp: R(N) = B(N) ∩ R(Np)

Hierarchical comp: H(N) = R(N) \ (⋃

i R(Nci))

Np

Np

Nc4Nc3Nc2Nc1

N

N

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 40 / 53

Page 89: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Model RepresentationComponent Hierarchy: Boolean Formulae

Basic comp: B(N), ∪ and ∩ of signed surfacesRestricted comp: R(N) = B(N) ∩ R(Np)Hierarchical comp: H(N) = R(N) \ (

⋃i R(Nci))

Np

Np

Nc4Nc3Nc2Nc1

NNci

N

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 40 / 53

Page 90: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Model RepresentationComponent Hierarchy: Boolean Formulae

Basic comp: B(N), ∪ and ∩ of signed surfacesRestricted comp: R(N) = B(N) ∩ R(Np)Hierarchical comp: H(N) = R(N) \ (

⋃i R(Nci))

Np

Nci

N

H(N)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 40 / 53

Page 91: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Volume Calculation

Np

Np

Nc4Nc3Nc2Nc1

NNci

NGivenA component hierarchyand an accuracy

ComputeThe volume of eachhierarchical componentto accuracy

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 41 / 53

Page 92: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Operations on Surfaces

Operations on signed surfaces s with aquery point q or an axis-aligned box b:

Inside(s,q) – return if q is inside s.

Classify(s,b) – return if the points in b areinside, outside or both with respect to s.

Integrate(s,b) – return the volume of s ∩ b..

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 42 / 53

Page 93: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Inside Test

Inside(s,q) – return if query point q is inside signed surface s.

s qq = (q1,q2,q3)s = (s1, s2, . . . , s10)pi , si ∈ {−U, . . . ,U}

PointInside(s,q) = s1q21 + s2q2

2 + s3q23

+ s4q1q2 + s5q1q3 + s6q2q3

+ s7q1 + s8q2 + s9q3 + s10

= sign( 3©)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 43 / 53

Page 94: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Classify Test

Classify(s,q) – return if the points in axis-aligned box b areinside, outside or both with respect to signed surface s.

s qs

b

b = (b1,b2, . . . ,b6)s = (s1, s2, . . . , s10)bi , si ∈ {−U, . . . ,U}

Classify(s,b), check if:1 any Vertices of b are on different sides of s. – Degree 32 any Edge of b intersects s. – Degree 43 any Face b intersects s. – Degree 5

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 44 / 53

Page 95: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Classify Test

Classify(s,q) – return if the points in axis-aligned box b areinside, outside or both with respect to signed surface s.

s qb

b = (b1,b2, . . . ,b6)s = (s1, s2, . . . , s10)bi , si ∈ {−U, . . . ,U}

Classify(s,b), check if:1 any Vertices of b are on different sides of s. – Degree 32 any Edge of b intersects s. – Degree 43 any Face b intersects s. – Degree 5

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 44 / 53

Page 96: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Face Test

Test if a face f intersects s.

Let c be the intersection curve ofthe plane P containing f and s.

c(x , y) =(x y 1

) 1© 1© 2©1© 1© 2©2© 2© 3©

xy1

To determine if s intersects f , test properties of the matrix.

Test if c is an ellipse: sign(∣∣∣∣ 1© 1©

1© 1©

∣∣∣∣) = sign( 2©)

Test if c is real or img: sign

∣∣∣∣∣∣1© 1© 2©1© 1© 2©2© 2© 3©

∣∣∣∣∣∣ = sign( 5©)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 45 / 53

Page 97: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Face Test

Test if a face f intersects s.

Let c be the intersection curve ofthe plane P containing f and s.

c(x , y) =(x y 1

) 1© 1© 2©1© 1© 2©2© 2© 3©

xy1

To determine if s intersects f , test properties of the matrix.

Test if c is an ellipse: sign(∣∣∣∣ 1© 1©

1© 1©

∣∣∣∣) = sign( 2©)

Test if c is real or img: sign

∣∣∣∣∣∣1© 1© 2©1© 1© 2©2© 2© 3©

∣∣∣∣∣∣ = sign( 5©)

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 45 / 53

Page 98: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 99: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 100: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 101: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

BoxBox

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 102: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 103: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

MC

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 104: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

MC

2Plane

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 105: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

MC

2Plane

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 106: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

MC

BunCyl

2Plane

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 107: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Algorithm Animation

Box

Cyl

Box

MC

BunCyl

2Plane

MC

2Plane 1Plane

Cyl

Box2Plane

MC

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 46 / 53

Page 108: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Models

Cube

L-Pipe12,L-Pipe100, and L-Pipe10k

DrillCyl

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 47 / 53

Page 109: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Accuracy and Time for L-Pipe100

Algorithm Requested Error TimeAccuracy (sec)

MC 1e-4 <1e-4 790.28New 1e-4 <1e-6 1.41

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 48 / 53

Page 110: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Accuracy and Time for L-Pipe100

Algorithm Requested Error TimeAccuracy (sec)

MC 1e-4 <1e-4 790.28New 1e-4 <1e-6 1.41

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 48 / 53

Page 111: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Experiments: Larger Model for L-Pipe10k

L-Pipe10k is similar to L-Pipe100 butdefined by over 40k surfaces.

Algorithm Requested Error TimeAccuracy

MC 1e-4 - > 12.00h∗

New 1e-4 <1e-6 9.43s

*Halted after 12 hours. Extrapolating from other experiments, 76 hours.

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 49 / 53

Page 112: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Overview

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 50 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 113: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Acknowledgements

Adviser: Jack Snoeyink

Committee: David Griesheimer, Ming Lin, Dinesh Manocha, and Chee Yap

Collaborators and research group

UNC CS tech and admin support

Funding: DOE, Bettis, NSF, and Google

My fiancee: Brittany Fasy

My friends and family

Everyone here today!!

THANK YOU!!!

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 51 / 53

Page 114: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Acknowledgements

Adviser: Jack Snoeyink

Committee: David Griesheimer, Ming Lin, Dinesh Manocha, and Chee Yap

Collaborators and research group

UNC CS tech and admin support

Funding: DOE, Bettis, NSF, and Google

My fiancee: Brittany Fasy

My friends and family

Everyone here today!!

THANK YOU!!!

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 51 / 53

Page 115: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Acknowledgements

Adviser: Jack Snoeyink

Committee: David Griesheimer, Ming Lin, Dinesh Manocha, and Chee Yap

Collaborators and research group

UNC CS tech and admin support

Funding: DOE, Bettis, NSF, and Google

My fiancee: Brittany Fasy

My friends and family

Everyone here today!!

THANK YOU!!!

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 51 / 53

Page 116: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Acknowledgements

Adviser: Jack Snoeyink

Committee: David Griesheimer, Ming Lin, Dinesh Manocha, and Chee Yap

Collaborators and research group

UNC CS tech and admin support

Funding: DOE, Bettis, NSF, and Google

My fiancee: Brittany Fasy

My friends and family

Everyone here today!!

THANK YOU!!!

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 51 / 53

Page 117: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Contributions

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 52 / 53

q

ab

Derive & upper bdd precision of many common predsShow the polys in the common preds are irreducible

a

b

cd e

f

Compute point location data structurewith double & triple precision

s3

s4

s7s2

s6

s5Compute nearest neighbor transformwith double precision

MC

MC2Plane

BunCyl Compute volumes of CSG modelswith five-fold precision

a

b

c

d

e

f

g

Compute Gabriel graphwith double precision

Page 118: Degree-Driven Design of Geometric Algorithms for Point Location ... · Degree-Driven Design of Geometric Algorithms for Point Location, Proximity, and Volume Calculation PhD Defense

Contact

David L. [email protected]

http://cs.unc.edu/˜dave

David L. Millman PhD Defense: Degree-Driven Geometric Algorithms 53 / 53