2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi...

53
SIGGRAPH 2010 On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and Chenglei Yang

Transcript of 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi...

Page 1: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

SIGGRAPH 2010

“On Centroidal Voronoi Tesselation…”

Yang Liu, Wenping Wang, Bruno Lévy,

Feng Sun, Dong-Ming Yan, Lin Lu and Chenglei Yang

Page 2: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

Overview

• 1. Motivations

• 2. Centroidal Voronoi Tesselation (CVT)

• 3. Newton’s method for CVT

• 4. Applications - Evaluation

• 5. Conclusions

Page 3: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

1. Motivations

(Re)-meshing [Du et.al], [Alliez et.al - SIGGRAPH], [Yan et.al - SGP]

Page 4: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

1. Motivations

Deformations – Elastons sampling

[Martin et.al, SIGGRAPH2010]

Page 5: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

1. Motivations

Deformations – Elastons sampling

[Martin et.al, SIGGRAPH2010]

Fluids – Free surface sampling

[Bridson et.al, SIGGRAPH2010]

[Wotjan et.al, SIGGRAPH2010]

Page 6: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

1. Motivations

Color quantization

[Leung et.al, GPU Pro, AK Peters, 2010]

Page 7: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

R

G

BWhat is the optimal colormap ?

Centroidal Voronoi Tesselation from the information theory perspective…

Page 8: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

R

G

BWhat is the optimal colormap ?

xi = (ri,gi,bi) Colormap entry

Page 9: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

R

G

BWhat is the optimal colormap ?

xi = (ri,gi,bi) Colormap entry

Vor(i) = { x / d(x,xi) < d(x,xj) } i j

xi

Page 10: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

A « bad » colormap entry / Voronoi cell

Page 11: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

A « bad » colormap entry / Voronoi cell

: a color poorly approximated

by the colormap entry xi

Why bad ? Because Vor(xi) contains

xi

Page 12: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

Page 13: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

∫2

dx

Vor(i)

xi - xF=

Page 14: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

∫2

dx

Vor(i)

xi - xF=

Quantization noise power

Page 15: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

∫2

dx

Vor(i)

xi - xF=

Quantization noise power

Page 16: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi TesselationWhat is the optimal colormap ?

F= ∫Vor(i)

2

dxxi - x

i

Minimize

Page 17: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

The classical method:

Lloyd’s algorithm = gradient descent

F= ∫Vor(i)

2

dxxi - x

i

Page 18: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

The classical method:

Lloyd’s algorithm = gradient descent

F= ∫Vor(i)

2

dxxi - x

i

F|xi = 2 mi (xi - gi) [Iri et.al], [Du et.al]

Volume of Vor(i) Centroid of Vor(i)

Page 19: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

The classical method:

Lloyd’s algorithm = gradient descent

F= ∫Vor(i)

2

dxxi - x

i

F|xi = 2 mi (xi - gi) [Iri et.al], [Du et.al]

Volume of Vor(i) Centroid of Vor(i)

If xi coincides with the centroid of Vor(i), we got a stationary point of F

(therefore a « good sampling »)

Page 20: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

2. Centroidal Voronoi Tesselation

The classical method:

Lloyd’s algorithm = gradient descent

F= ∫Vor(i)

2

dxxi - x

i

F|xi = 2 mi (xi - gi) [Iri et.al], [Du et.al]

Volume of Vor(i) Centroid of Vor(i)

If xi coincides with the centroid of Vor(i), we got a stationary point of F

(therefore a « good sampling ») Vor(X): Centroidal Voronoi Tesselation

Page 21: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Disclaimer:

This presentations contains live demos.Crashes may occur.

The presenter assumes no liability.

Page 22: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Lloyd’s Relaxation: (Geometric point of view)

Loop

Move the xi's to the gi's

Re-triangulate

End loop

Page 23: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Lloyd’s Relaxation: (Geometric point of view)

Loop

Move the xi's to the gi's

Re-triangulate

End loop

+ Provably decreases F [Du et.al]

+ Reasonably easy to implement

- Slow (linear) convergence

Page 24: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

[Emelianenko and Du]: (Geometric point of view)

Solve i, xi = gi

using Newton’s method for systems of non-linear equations

Page 25: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

+ Faster convergence than Lloyd’s relaxation when X is approaching solution

- Slow convergence when X is far away from optimum

[Emelianenko and Du]: (Geometric point of view)

Solve i, xi = gi

using Newton’s method for systems of non-linear equations

Page 26: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Reason: equivalent to Gauss-Newton (neglects second order terms,

only valid under the small residual assumption), see our paper for more details…

[Emelianenko and Du]: (Geometric point of view)

Solve i, xi = gi

using Newton’s method for systems of non-linear equations

+ Faster convergence than Lloyd’s relaxation when X is approaching solution

- Slow convergence when X is far away from optimum

Page 27: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

[This paper]: Not the same « Newton’s algorithm » as

in [Emelianenko et.al]

Newton’s method for minimizing multivariate non-linear function F

Back to the « information theory » point of view

Page 28: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

While | F | >

2x,x F X x F= -solve

X X + X

End while

[This paper] (information theory point of view)

Newton’s method for minimizing multivariate non-linear function F

Page 29: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

While | F | >

2x,x F X x F= -solve

X X + X

End while

[This paper] (information theory point of view)

Newton’s method for minimizing multivariate non-linear function F

Hessian = 2nd order derivatives

Is F sufficiently continuous ? (C2)

Yes (see paper for a proof)

Page 30: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k)

Page 31: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k)

Build Vor(X(k))

Page 32: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k)

Compute

F(X(k))

F(X(k))

F|xi = 2 mi (xi - gi)

Page 33: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(1) approx. of

2x,x F(X(k))

(2) Solve for p(k)

(3) X(k+1)= X(k)+ p(k)

Page 34: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k+1)

Page 35: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k+1)

Build Vor(X(k+1))

Page 36: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

LBGS solver(quasi-Newton)

X(k+1)

Compute

F(X(k+1))

F(X(k+1))

Page 37: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

Quasi-Newton solver (LBFGS)

•As easy to implement as gradient descent

•(Nearly) as fast as full Newton solver

Page 38: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

CVT in 2D

Page 39: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

CVT in 2D

CVT on surfaces[Yan, L, Liu, Sun and Wang – SGP2009]

Page 40: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

3. Newton’s method for CVT

CVT in 2D

CVT on surfaces

CVT in volumes

Page 41: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - Evaluation

Page 42: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - Evaluation

Page 43: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - Evaluation

Computer

precision

reached

|▼F| == 0.0

Page 44: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - EvaluationRemeshing [Yan, L, Liu, Sun and Wang – SGP2009]

Page 45: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - EvaluationRemeshing [Yan, L, Liu, Sun and Wang – SGP2009]

Page 46: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - EvaluationRemeshing [Yan, L, Liu, Sun and Wang – SGP2009]

Page 47: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - EvaluationRobustness

Page 48: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

4. Applications - EvaluationRobustness

Page 49: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

5. Conclusions

Definition (optimal sampler): Minimize F = ∫Vor(i)

2

dxxi - x

i

Page 50: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

5. Conclusions

Definition (optimal sampler): Minimize F = ∫Vor(i)

2

dxxi - x

i

Property of the minimizer: i, xi = gi Lloyd’s relaxation

Page 51: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

5. Conclusions

Definition (optimal sampler): Minimize F = ∫Vor(i)

2

dxxi - x

i

Newton’s method for CVTSticking to the definition

(rather than the property)

Page 52: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

5. Conclusions

Newton’s method for CVTSticking to the definition

(rather than the property)

Benefits:

Faster convergence (see stats in paper)

More general algorithm (see next presentation)

Page 53: 2010alice.loria.fr/publications/papers/2009/onCVT/...SIGGRAPH 2010 “On Centroidal Voronoi Tesselation…” Yang Liu, Wenping Wang, Bruno Lévy, Feng Sun, Dong-Ming Yan, Lin Lu and

Aknowledgements

• Bytes : CGAL (Delaunay triangulation)

• Triangles: AIM@Shape, Digital Michelangelo

• Euros : European Research Council

GOODSHAPE ERC-StG-205693