1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Hulls triangulations Convexity Convex hull ...

55
1 SIC / CoC / Georgia Tech MAGIC MAGIC Lab Lab http:// www.gvu.gatech.edu/ Jarek Rossignac Hulls & triangulations Convexity Convex hull Delaunay triangulation Voronoi diagram

description

3 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Polyloop, boundary, interior, exterior When A is a simply connected polygon. Its boundary, denoted  A, is a polyloop P. VALIDITY ASSUMPTION: We assume that the vertices and edge-interiors of P are pair-wise disjoint P divides space into 3 sets: the boundary: P the interior: iP, the exterior: eP P iP eP

Transcript of 1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Hulls triangulations Convexity Convex hull ...

Page 1: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

1SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Hulls & triangulations

Convexity Convex hull Delaunay triangulation Voronoi diagram

Page 2: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

2SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Attributes of subset of the plane

In what follows, A and B are subsets of the plane:

Simply connectedSimply connected polygon (non-convex)polygon (non-convex)

DisconnectedDisconnected (multiple (multiple components)components)

ConnectedConnected but but with one or more with one or more holesholes

Lower-Lower-dimensionaldimensional

ConvexConvex polygonpolygon

Not a Not a polygonpolygon

Non-manifoldNon-manifold polygon polygon

Page 3: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

3SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Polyloop, boundary, interior, exterior

When A is a simply connected polygon.Its boundary, denoted A, is a polyloop P.

VALIDITY ASSUMPTION: We assume that the vertices and edge-interiors of P are pair-wise disjoint

P divides space into 3 sets:the boundary: Pthe interior: iP, the exterior: eP

PP

iP eP

Page 4: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

4SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

When is a planar set A convex?

seg(p,q) is the line segment from p to qA is convex ( pA qA seg(p,q)A )

pp qq

ppqq

pp

qq

Page 5: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

5SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the Stringing of A?

The “Stringing” S(A) of A is the union of all segments seg(p,q) with pA and qA

Page 6: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

6SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Prove that AS(bA)

pp

Page 7: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

7SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Prove that AS(bA)pA, pseg(p,p)S(A)In fact, AS(A), since opposite rays from each point p of the

interior of ∂ A must each exit A at a point of bA

pp

Page 8: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

8SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the convex hull of a set A?

The convex hull H(A) is the intersection of all convex sets that contain A.

(It is the smallest convex set containing A)

Page 9: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

9SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Conjecture: S(A)=H(A)

Prove, disprove…

Page 10: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

10SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Counter example where S(A)≠H(A)

SS segment(p,q) for all pS and qS

H(S)H(S)

Page 11: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

11SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Other properties/conjectures?

Prove/disprove: S(A) H(A) A convex S(A) = H(A) H(A) = union of all triangles with their 3 vertices in A

Page 12: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

12SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

H(A) is a Tightening?

H(A) is the tightening of a polyloop P that contains A in its interiorTightening shrinks P without penetrating in A

Page 13: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

13SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the orientation of a polyloop

P is oriented clockwise (CW) or counterclockwise (CCW)

Often orientation is implicitly encoded in the order in which the vertices are stored.

CWCCW

Page 14: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

14SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How to compute the orientation?

Compute the signed area aP of iP as the sum of signed areas of trapezes between each oriented edge and its orthogonal projection (shadow) on the x-axis.

If aP>0, the P is CW. Else, reveres the orientation (vertex order).

CW

x

y

a

b

ax bx

ay

by

area(a,b):=(ay+by)(bx–ax)/2

Page 15: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

15SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

When is a vertex concave/convex?

Vertex q a CW polyloop is concave when P makes a left turn at q. If is convex otherwise.

CW

Page 16: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

16SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

When is a vertex a left turn?

Consider a sequence of 3 vertices (p, q, r) in a polyloop P. Vertex q is a left turn, written leftTurn(p,q,r), when

ppqq

rr

Page 17: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

17SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the decimation of a vertex?

Delete the vertex from P

Page 18: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

18SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Concave Vertex Decimation: CVD(P)

The CVD algorithm keeps finding and decimating the left-turn vertices of a CW polyloop P until none are left

Page 19: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

19SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Conjecture: CVD(P) computes H(P)

Prove/disprove….

Page 20: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

20SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Counterexample

CVD may lead to self-intersecting polyloops

Now, all vertices are right Now, all vertices are right turns, but we do not have turns, but we do not have H(P). In fact the polyloop H(P). In fact the polyloop is invalid (self-intersects). is invalid (self-intersects).

Page 21: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

21SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Can you fix the CVD algorithm?

Page 22: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

22SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Preserve validity!

Only do decimations of concave vertices when they preserve validity of the polyloop

This vertex should not be This vertex should not be decimateddecimated

Page 23: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

23SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Example of the fixed the CVD algorithm

Only decimate concave vertices when the validity of the polyloop is preserved

Skip this vertex Skip this vertex

Page 24: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

24SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How to test the validity of a decimation?

What is different between these two decimations?

badbad

goodgood

Page 25: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

25SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How to test the validity of a decimation?

What is different between these two decimations?

badbad

goodgood

Page 26: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

26SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Other vertex in swept triangle!

What is different between these two decimations?

badbad

goodgood

Page 27: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

27SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How to implement point-in-triangle?

How to test whether point v is in triangle (p,q,r)?

vv

pp

qq rr

Page 28: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

28SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Use the left-turn test!

If leftTurn(p,q,r), leftTurn(p,q,v), leftTurn(q,r,v), leftTurn(r,p,v) are all equal, then v is in the triangle.

vv

pp

qq rrall 4 are trueall 4 are true

vv

qq

pp rrall 4 are falseall 4 are false

vv

pp

qq rrleftTurn(r,p,v) is falseleftTurn(r,p,v) is false

Page 29: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

29SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the complexity of the fixed CVD?

Test this vertex Test this vertex

vv

pp

qq rr

??

Page 30: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

30SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the cost of testing a vertex?

Test this vertex Test this vertex

vv

pp

qq rr

??

Page 31: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

31SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the cost of testing a vertex?

Test this vertex Test this vertex

vv

pp

qq rr

??

Go through all the remaining vertices and perform a constant cost test: O(n)

Page 32: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

32SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How many times is a vertex tested?

?? ??

Page 33: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

33SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

How many times is a vertex tested?

Test each vertex once and put concave vertices in a queue. The h vertices on H(P) never become concave. They will not be

tested again. The initial set of concave vertices will be tested at least once. At least one of them will be decimated. You only need to retest the vertex preceding a decimation. So the number of in-triangle tests is < 2n–h… O(n)

?? ??

Page 34: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

34SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

What is the total complexity?

O(n) tests Each O(n)

Page 35: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

35SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Analysis of point-clouds in 2D Pick a radius r (from statistics of average distance to nearest point) For each ordered pair of points a and b such that ||ab||<2r, find the positions o

of the center of a circle of radius r through a and b such that b is to the right of a as seen from o.

If no other point lies in the circle circ(o,r), then create the oriented edge (a,b)

a

b

a

b

a

bo

a

b

a

bo

o’

Page 36: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

36SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Interpreting the loops in 2D Chains of pairs of edges with opposite orientations (blue) form dangling

polygonal curves that are adjacent to the exterior (empty space) on both sides.

Chains of (red) edges that do not have an opposite edge form loops. They are adjacent to the exterior on their right and to interior on their left.

Each components of the interior is bounded by one or more loops.– It may have holes

Page 37: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

37SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Delaunay & Voronoi How to find furthest place from a set of point sites? How to compute the circumcenter of 3 points? What is a planar triangulation of a set of sites? What is a Delaunay triangulation of a set of sites? How to compute a Delaunay triangulation? What is the asymptotic complexity of computing a

Delaunay triangulation? What is the largest number of edges and triangles

in a Delaunay triangulation of n sites? How does having a Delaunay triangulation reduces

the cost of finding the closest pair? What practical problems may be solved by

computing a Delaunay triangulation?

Page 38: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

38SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Delaunay & Voronoi

What is the Voronoi region of a site? What properties do Voronoi regions have? What are the Voronoi points of a set of sites? What practical problems may be solved by

computing a Voronoi diagram of a set of sites? What is the correspondence (duality) between

Voronoi and Delaunay structures? Explain how to update the Voronoi diagram when a

new site is inserted. What are the natural coordinates of a site?

Page 39: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

39SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Find the place furthest from nuclear plants

Find the point in the disk that is the furthest from all blue dots

Page 40: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

40SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

The best place is …

The green dot. Find an algorithm for computing it.

Teams of 2.Teams of 2.

Page 41: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

41SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Center of largest disk that fits between points

Page 42: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

42SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Algorithm for best place to live

max=0;foreach triplets of sites A, B, C {

(O,r) = circle circumscribing triangle (A,B,C)found = false;foreach other vertex D {if (||OD||<r) {found=true;};};if (!found) {if (r>max) {bestO=O; max=r;};}

return (O);

Complexity?Complexity?

Page 43: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

43SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

pt centerCC (pt A, pt B, pt C) { // circumcenter to triangle (A,B,C) vec AB = A.vecTo(B); float ab2 = dot(AB,AB); vec AC = A.vecTo(C); AC.left(); float ac2 = dot(AC,AC); float d = 2*dot(AB,AC); AB.left(); AB.back(); AB.mul(ac2); AC.mul(ab2); AB.add(AC); AB.div(d); pt X = A.makeCopy(); X.addVec(AB); return(X); };

Circumcenter

AA BB

CC

ACAC

ABAB

AB.leftAB.left

AC.leftAC.left

XX

2AB2ABAX=ABAX=ABABAB

2AC2ACAX=ACAX=ACACAC

Page 44: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

44SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Delaunay triangles

3 sites (vertices) form a Delaunay triangle if their circumscribing circle does not contain any other site.

Page 45: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

45SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Inserting points one-by-one

Page 46: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

46SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

The best place is a Delaunay circumcenter

Center of the largest Delaunay circle (stay in convex hull of cites)

Page 47: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

47SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Properties of Delaunay triangulations

If you draw a circle through the vertices of ANY Delaunay triangle, no other sites will be inside that circle.

It has at most 3n-6 edges and at most 2n-5 triangles. Its triangles are fatter than those of any other

triangulation.– If you write down the list of all angles in the Delaunay

triangulation, in increasing order, then do the same thing for any other triangulation of the same set of points, the Delaunay list is guaranteed to be lexicographically smaller.

Page 48: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

48SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Closest pair application

Each point is connected to its nearest neighbor by an edge in the triangulation.

It is a planar graph, it has at most 3n-6 edges, where n is the number of sites.

So, once you have the Dealunay triangulation, if you want to find the closest pair of sites, you only have to look at 3n-6 pairs, instead of all n(n-1)/2 possible pairs.

Page 49: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

49SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Applications of Delaunay triangulations

Find the best place to build your home Finite element meshing for analysis: nice meshes Triangulate samples for graphics

Page 50: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

50SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Alpha shapes

How to obtain the point cloud interpretation (red polyloops and blue curves) from the Delaunay triangulation?

Page 51: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

51SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

School districts and Voronoi regions

Each school should serve people for which it is the closest school. Same for the post offices.

Given a set of schools, find the Voronoi region that it should serve.Voronoi region of a site = points closest to it than to other sites

Page 52: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

52SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Properties of Voronoi regions

All of the Voronoi regions are convex polygons. – Infinite regions correspond to sites on the convex hull.

The boundary between adjacent regions is a line segment– It is on the bisector of the two sites.

A Voronoi points is where 3 or more Voronoi regions meet.– It is the circumcenter of these 3 sites – and there are no other sites in the circle.

http://www.cs.cornell.edu/Info/People/chew/Delaunay.html

Voronoi diagram = dual of Delaunay Triangulation

To build the Delaunay triangulation from a Voronoi diagram, draw a line segment between any two sites whose Voronoi regions share an edge.

Page 53: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

53SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Insertion algorithms for Voronoi Diagrams

Inserts the points one at a time into the diagram. Whenever a new point comes in, we need to do three things. First, we need to figure out which of the existing Voronoi

cells contains the new site. Second, we need to "walk around" the boundary of the new

site's Voronoi region, inserting new edges into the diagram.

Finally, we delete all the old edges sticking into the new region.

Page 54: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

54SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Divide and conquer alg

Discovered by Shamos and Hoey. Split the points into two halves, the leftmost n/2 points, which we'll color bLue,

and the rightmost n/2 points, which we'll color Red. Recursively compute the Voronio diagram of the two halves. Finally, merge the two diagrams by finding the edges that separate the bLue

points from the Red points The last step can be done in linear time by the "walking ant" method. An ant starts down at -infinity, walking upward along the path halfway between some blue point and some red point. The ant wants to walk all the way up to +infinity, staying as far away from the points as possible. Whenever the ant gets to a red Voronoi edge, it turns away from the new red point. Whenever it hits a blue edge, it turns away from the new blue point. There are a few surprisingly difficult details left to deal with, like how does the ant know where to start, and how do you know which edge the ant will hit next. (The interested reader is strongly encouraged to consult the standard computational geometry literature for solutions to these details.)

Page 55: 1 SIC / CoC / Georgia Tech MAGIC Lab  Rossignac Hulls  triangulations  Convexity  Convex hull  Delaunay triangulation.

55SIC / CoC / Georgia TechMAGIC MAGIC LabLab

http://www.gvu.gatech.edu/~jarekJarek Rossignac

Assigned Reading

http://www.voronoi.com/applications.htm http://www.ics.uci.edu/~eppstein/gina/scot.drysdale.html http://www.ics.uci.edu/~eppstein/gina/voronoi.html http://www.cs.berkeley.edu/~jrs/mesh/