0% found this document useful (0 votes)
50 views

Diffusion Diagrams: Voronoi Cells and Centroids From Diffusion

We define Voronoi cells and centroids based on heat diffusion. These heat cells and heat centroids coincide with the common definitions in Euclidean spaces

Uploaded by

E
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Diffusion Diagrams: Voronoi Cells and Centroids From Diffusion

We define Voronoi cells and centroids based on heat diffusion. These heat cells and heat centroids coincide with the common definitions in Euclidean spaces

Uploaded by

E
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

EUROGRAPHICS 2017 / L. Barthe and B.

Benes Volume 36 (2017), Number 2


(Guest Editors)

Diffusion Diagrams:
Voronoi Cells and Centroids from Diffusion

Philipp Herholz, Felix Haase, Marc Alexa

TU Berlin

Abstract
We define Voronoi cells and centroids based on heat diffusion. These heat cells and heat centroids coincide with the common
definitions in Euclidean spaces. On curved surfaces they compare favorably with definitions based on geodesics: they are
smooth and can be computed in a stable way with a single linear solve. We analyze the numerics of this approach and can
show that diffusion diagrams converge quadratically against the smooth case under mesh refinement, which is better than other
common discretization of distance measures in curved spaces. By factorizing the system matrix in a preprocess, computing
Voronoi diagrams or centroids amounts to just back-substitution. We show how to localize this operation so that the complexity
is linear in the size of the cells and not the underlying mesh. We provide several example applications that show how to benefit
from this approach.
Categories and Subject Descriptors (according to ACM CCS): I.3.5 [Computer Graphics]: Computational Geometry and Object
Modeling—Geometric algorithms

1. Introduction diagrams that are identical for Euclidean and spherical domains.
An important consequences of defining the bisectors based on heat
The notion of being closer is a fundamental geometric relation,
values, and not a derived measure of distance, is that they converge
which gives rise to Voronoi cells and centroids. It is commonly
quadratically. We demonstrate that generating curved Voronoi cells
defined based on a distance function. In the Euclidean domain, dis-
from heat is asymptotically as accurate as defining them from dis-
tances are continuous and can be easily computed. Consequently,
crete geodesics, while being much faster.
bisectors for Voronoi tessellations or centroids are also stable and
fast computations.
On curved surfaces, the most natural way to define distance is We also use heat to define centroids of cells (see Section 5).
the length of the shortest path between two points. This path is We can show that for large time values the heat centroid con-
a geodesic and the corresponding distance is called geodesic dis- verges against Euclidean centroids. For curved domains we find
tance. Geodesic distances are generally not continuous functions, that heat centroids provide more stable (and more intuitive) results
and their computation is more involved and potentially unstable. than geodesic centroids because of the underlying smooth function.
This has motivated alternative definitions of distance for curved
surfaces [LRF10, PS13, SdGP∗ 15, BF15]. All computations are based on the same linear system, which
Our main observation is that being closer can be computed based is factorized in a preprocessing step. Generating Voronoi tessella-
on a smooth function on the surface that may not satisfy the proper- tions for arbitrary generators or finding centroids of arbitrary cells
ties of distance. The function being smooth could overcome prob- only require back-substitutions. Moreover, we explain in Section 6
lems in stability of computation. And we may choose a function how to localize the solve – this means we can compute heat values
that can be computed quickly. We suggest to use heat diffusion for only where needed for comparison with other heat values. This idea
this purpose. Heat diffusion is smooth. An important property is extends existing methods in numerical linear algebra libraries and
that it is a monotone function of distance in Euclidean domains. should be of interest for other applications in geometry processing.
Computing heat diffusion on a discrete domain is well-understood
and amounts to solving a linear system. We recall basic properties
We demonstrate the relevance of our approach by tessellating
of the continuous and discrete heat equation in Section 2.
large meshes with centroidal Voronoi tessellations (CVT), and
We analyze the definition of bisectors (or Voronoi cells) based computing barycentric coordinates on surfaces (see Sec. 7). Lastly,
on heat values in Section 4. We show that heat values yield Voronoi we discuss more potential applications and future work in Sec. 8.

c 2017 The Author(s)


Computer Graphics Forum c 2017 The Eurographics Association and John
Wiley & Sons Ltd. Published by John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

2. Discrete heat diffusion In the following sections we will also consider the more general
+ boundary conditions. Namely we want to generalize the heat source
Given a domain Ω, the heat kernel k : R × Ω × Ω describes how
to a surface patch C ⊂ M:
much heat diffuses from a point p ∈ Ω to a point q ∈ Ω in time t ∈
R+ . On a Riemannian manifold without boundary the heat kernel k(0, p, q) = χC (p) (9)
is the fundamental solution of the heat equation
 Practically this amounts to setting
 ∂k = ∆p k
R
∂t CRb(p) dp
(1) h= . (10)
k(0, p, q) = δ(p − q), C 1 dp
Here, the denominator is just the area of the set C. Computing this
where ∆p is the Laplace-Beltrami operator in p and δ represents the integral is easy for piecewise linear sets, as they can be triangu-
Dirac delta. For Ω = Rd the heat kernel is explicitly given by the lated. For convenience, assume the mesh has been triangulated such
formula that the interior of each triangle is either completely inside or com-
pletely outside the set C. Each interior triangle f with vertex indices
!
1 kp − qk2
k(t, p, q) = exp − . (2) i, j, k contributes
(4πt)d/2 4t
1 
Inverting this expression one obtains Varadhan’s formula [Var67] h( f ) = ei + e j + ek , i, j, k ∈ f , (11)
3
p
lim −4t log k(t, p, q) = kp − qk, (3) where ei denotes a canonical basis vector. The vector h represent-
t→0
ing the set C can then be built by summing up over the faces, i.e.
revealing the close connection of the heat kernel k(t, p, q) to dis- h = ∑ f ∈C h( f ). We can easily solve Eq. 7 repeatedly for different
tance which also generalizes to manifolds away from the cut lo- initial heat distributions if we have the Cholesky factorization of
cus [Var67]. the system matrix M − tLC . Computing heat diffusion then comes
down to one pass of forward and backsubstiution for the case of a
We are interested in heat diffusion on discrete surfaces embed-
singular heat source as well as for an area heat source.
ded in R3 , represented as triangulated surfaces. The mesh M =
(V, F) is composed of v vertex positions V ∈ R3×v and f triangu-
lar faces F ∈ Z3×f
v , defined as triples of vertex indices. We assume
3. Related work
the triangle mesh to be manifold. We focus on the computation of CVTs and geodesics on meshes
Every point p ∈ M on the mesh can be represented using embedded in R3 .
barycentric coordinates b(p) ∈ Rv with respect to the mesh ver-
tices such that Geodesics on meshes In principle, any algorithm computing
geodesic distances on meshes can be used to generate Voronoi dia-
p = V b(p). (4) grams. One of the earliest approaches generalizes fast marching on
Note that b(p) has at most three non-zero entries for any point p on regular grids to 3d triangle meshes [Set96]. However, this method
the mesh which are defined by the face f containing p. is inaccurate in presence of obtuse triangles. Several strategies to
deal with this problem have been proposed, e.g. [KS98], leading
To solve Eq. 1 numerically on a triangle mesh, following the to approximate solutions. Mitchell et al. [MMP87] describe an al-
same approach as Crane et al. [CWW13], we discretize the Lapla- gorithm to compute exact geodesic distances on triangle meshes
cian using the cotan-operator [PP93]. Using their notation, the which has been implemented by Surazhsky et al. [SSK∗ 05]. Chen
cotan-Laplacian is represented by L = M−1 LC where the diago- et al. [CH90] also propose a method to compute exact geodesic
nal (lumped) mass matrix M ∈ Rv×v and LC ∈ Rv×v are given distances which has been improved by Xin et al. [XW09] outper-
by forming both the latter and Surazhsky et al.’s code.
1
(LC u)i = ∑ (cot αi j + cot βi j )(u j − ui ) (5) Diffusion Solutions to the heat equation have been extensively
2 j,(i, j)∈ fk used in machine learning and geometry processing, for example
1 by Benjamin et al. [BPVR11] in the context of mesh segmentation.
Mii = ∑ a j. (6)
3 i∈ fj The central idea is to compute the fundamental solution to (1)
v
Here a j is the area of triangle j and u ∈ R is the vector of co- on a manifold. Given a discrete Laplacian L this solution can be
efficients with respect to the piecewise linear finite element basis. expressed as
Performing an implicit Euler step of length t for Eq. 1 amounts to k(t, p, q) = ∑ f (λk )φk (p)φk (q) (12)
solving the sparse, symmetric, positive-definite system k

(M − tLC )u = Mh. (7) f (λ) = exp(−tλ) (13)


where λi and φi are eigenvectors and eigenvalues of the Laplacian
In order to model a discrete dirac delta, the right hand side has to
L, respectively. Using a discrete Laplacian based on the Gaussian
represent a point with unit energy which leads to
kernel, Coifman et al. [CLL∗ 05] introduced the term diffusion dis-
h(p) = M−1 b(p). (8) tance for values of k for applications in machine learning. Altering


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

the function f yields different notions of distance, notably commute of two or more cells are called the Voronoi diagram. It consists of
time distance for f (λ) = 1/λ [FPmRS07] and biharmonic distance edges, which are the intersections of exactly two Voronoi cells, and
for f (λ) = 1/λ2 [LRF10]. corners, which are the intersections of three or more Voronoi cells.
Computing these distances up to a specified accuracy is possible We define a Voronoi cell based on heat diffusion. As heat values
using only a subset of eigenvectors rendering these methods feasi- decrease from the source, we use
ble on meshes of moderate size. Patané et al. [PS13] compute fun- 
damental solutions of the heat kernel by approximating the matrix Ci (t) = x ∈ Ω, k(t, x, pi ) ≥ k(t, x, p j ), i 6= j . (15)
exponential using Padé approximation. Our method can be under- A motivation for this definition is that it is equivalent to the above
stood as using a Padé approximation of order [0, 1]. Recently, Crane in Euclidean domains because k(t, p, q) is monotone in the squared
et al. [CWW13] introduced a fast approximate method to compute distance kp − qk2 (see Eq. 2).
geodesic distances based on heat diffusion. The central idea is to
diffuse an initial heat distribution by solving a sparse linear system Discrete approximation For computing a Voronoi cell on a trian-
and integrating the normalized gradients of the solution. Iterating gle mesh we compute a piecewise linear approximation of the heat
the normalization and integration step, Belyaev et al. [BF15] pro- equation as discussed in Section 2. For each generator pi we com-
pose an algorithm tailored to the task of finding the shortest dis- pute the corresponding heat distribution, which can be written as
tance to the boundary of a domain in R2 or R3 .
These methods inspired our use of heat diffusion to measure dis- (M − tL) U = (b(p0 ), b(p1 ), . . .) , (16)
tance. In contrast to Crane et al. we use heat diffusion directly as a
"pseudo" distance similar to Solomon et al. [SdGP∗ 15]. so that the i-th column of U represents the heat values correspond-
ing to generator pi . The rows of U correspond to the different heat
Centroidal Voronoi tessellations on meshes Many methods for values in each vertex. For an arbitrary point q on the mesh we can
the construction of CVTs on triangle meshes reduce the problem find the heat values by computing b(q)T U. This allows us to define
to the Euclidean case. Alliez et al. [ADVDI05] use a planar con- the Voronoi cell Ci as the set of points for which the i-th component
formal parameterization of the mesh to map a CVT with respect in the vector of heat values is larger than any other component:
to a spatially varying distance function on R2 to the mesh. This      
T T
approach requires cutting the mesh into a disk. This is a challeng- Ci = x ∈ Ω, b(x) U ≥ b(x) U , i 6= j . (17)
i j
ing task in itself and might introduce misalignments at the seams.
Another common idea is to restrict CVTs in R3 to a surface mesh This allows us to assign every point on the mesh to one of the cells.
(see for example [YLL∗ 09]). Whenever the cells are large relative
to the variation of the metric this method fails to capture the dis- Tessellation Due to the piecewise linear distance functions the in-
tances on the surface. For example using few generators to define tersection of the Voronoi diagram with a face is piecewise linear as
intrinsic barycentric coordinates (see Sec. 7) really requires an in- well. Consider a triangle f = (i, j, k) containing part of the Voronoi
trinsic method. Moreover, close sheets and self-intersection can not diagram and the heat values at the triangle vertices
be handle by this method.
W f = (ei , e j , ek )T U. (18)
One of the few practical intrinsic methods for the computation
of CVTs was presented by Wang et al. [WYL∗ 15]. They employ a The maximal value in each row of W f represents the ‘closest’ gen-
modified and parallelized version of Xin et al.’s [XW09] implemen- erator of the corresponding vertex. We define the label of each ver-
tation of geodesic distances to rapidly compute intrinsic Voronoi tex as the index of the generator a vertex belongs to. To break ties
diagrams. The computation of cell centroids relies on the repeated (i.e. similar heat values in the vertex) we consider the neighborhood
evaluation of the exponential map at the cell vertices. Approximat- of a vertex inside the face f
ing centroids on planar projections of the cells is problematic in
 
f f f f
li = lim+ arg max W0,m + ε W1,m + W2,m (19)
terms of convergence and quality for large cells with high variation ε→0 m
in curvature. Our method in contrast produces cell centroid that are
and similarly find a label for j based on the second, and k based on
well defined and insensitive to noise and cell size.
the third row. Note that the label of a vertex depends on the face
being considered and the labels may be different if the vertex lies
4. Voronoi cells on a bisector (as indicated by vertices with more than one color in
Figure 1).
The notion of being closer may be used to tessellate a domain based
on a set of points in that domain. Concretely, given a domain Ω If (and only if) all its vertices on face f carry the same label it
as well as a set of points pi ∈ Ω, i ∈ {1, . . . , n}, called generators, can be assigned to one generator (this follows from convexity). If
the Voronoi tessellation is the decomposition of the domain Ω into not, the face needs to be subdivided. In the simplest case the inter-
Voronoi cells Ci ⊂ Ω consisting of the points x ∈ Ω that are not section consists of a single line segment and we can compute it by
further from pi than from any other of the generators p j : intersecting the two corresponding linear heat functions. Assume
f f

Ci = x ∈ Ω, d(x, pi ) ≤ d(x, p j ), i 6= j .

(14) li 6= l j . Then we find the intersection point on the edge between
vertex i and j by solving
Here, d : Ω×Ω 7→ R is a distance measure on Ω. The set of points x
f f f f
that are elements of more than one cell Ci , i.e. lie in the intersection bW0,li + (1 − b)W1,li = bW0,l j + (1 − b)W1,l j (20)

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

Figure 2: Tessellating a triangulated sphere. After inserting one


bisector, all triangles containing cell boundaries need to be revis-
ited (left). Single boundaries are consolidated after one round, sin-
gle Voronoi vertices after two rounds. More complicated situations,
such as the two Voronoi vertices contained in one original trian-
gle, require more than two rounds (white circle). After few rounds
all Voronoi cells are represented exactly by triangles, even if the
Voronoi diagram is locally more complex than the initial triangu-
lation (right).

Figure 1: Triangles containing parts of the Voronoi diagram are


recursively subdivided until they can be assigned to one single gen- However, if the surface mesh discretizes an underlying smooth sur-
erator. Each row represents a different case. The left column indi- face this might not be the result we are interested in. Topological
cates the starting configuration, each of the following column rep- noise, for example, will influence geodesic distances dramatically
resents the situation after handling one of the bisectors intersecting while diffusion methods are potentially more robust to these arti-
the triangle. The bisector is represented as an edge, the resulting facts. Moreover, coarse tessellations will have a strong effect on
quadrilateral is triangulated, and the vertices are re-labeled (see geodesic distances. Consider the tessellated sphere in Figure 3 (in-
main text for details). set right). Exact geodesics will not correspond to distances on the
sphere.
and computing bpi + (1 − b)p j . The other intersection point is can Experimentally we measure the derivation of the Voronoi dia-
be found similarly. grams from the exact result on the unit sphere with the follow-
ing locations as generators: p0 = (1, 0, 0)T , p1 = (−1, 0, 0)T , p2 =
Unfortunately the number of line segments crossing the triangle
(0, 1, 0)T . For this example the ground truth is easily established.
can not be deduced from the labels (see the first column of figure
We measure the errors of the bisectors between p0 and p1,2 . Let x
1). In fact there might be many Voronoi cells and edges crossing the
be a point on the approximated bisector, then we can measure its
triangle. We resolve these cases based on a simple recursive strat-
squared error as
egy: triangles that cannot be assigned to one generator are subdi-
vided along any bisector, which can be identified by taking any pair pi − p j
e2 (x) = xT (21)
of different labels (some of the possible configurations are depicted kpi − p j k
in Figure 1). This splits the triangle into three smaller ones, two of as all bisectors are contained in planes through the origin.
them resulting from triangulating the resulting quad. At each newly
created vertex q we can evaluate the piecewise linear distance func- In this setting, we analyze the approximation error relative to the
tions using b(q)T U. This allows us to compute the labels and then time step t and the maximal or mean edge length in the mesh. Based
either assign a new triangle to a generator if the labels are identical, on prior analysis of diffusion operators on meshes, we expect that
or subdivide again. the approximation is better for larger values of t [CWW13, Ap-
pendix A], and that it converges quadratically as edge lengths de-
The process stops if all vertices of a triangle have the same label.
crease [DE13]. Note that we cannot expect any better convergence,
This has to happen because each subdivision removes a bisector
as all metric properties of the discrete surface are converging at
from the interior of the triangles by explicitly representing it with
most quadratically. In particular, also discrete geodesics are con-
an edge (and the number of bisectors is finite). It is efficient be-
verging quadratically against their smooth counterpart.
cause subdivision is only necessary for the few triangles containing
boundaries of the Voronoi cells. In addition, it can be performed for We have generated a set of triangulations of the unit sphere with
all triangles in parallel. Figure 2 illustrates the iterations required varying characteristics. In all cases the process starts with a regu-
to resolve the Voronoi diagram on a sphere. lar octahedron. Then vertices are randomly sampled from the unit
sphere. For generation of uniform random points we draw the three
Numerical convergence Now that we have a process in place that coordinates independently from normal distributions and then nor-
computes the Voronoi diagram, we ask about the numerical accu- malize the result. This results in triangulations with varying triangle
racy of this procedure. Computing exact geodesics results in ex- quality, including many with obtuse angles (see the insets in Fig-
act intrinsic Voronoi diagrams with respect to the surface mesh. ure 3).


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams
��-���� ������ �������� �-���� ������ ������
� �
◆ ◆ ◆ ◆ ◆ ◆◆◆ ◆
◆ ◆ ◆ ◆ ◆◆ ◆
����� ◆◆ ◆ ◆ ◆ ����� ◆◆ ◆
◆ ◆ ◆◆
◆ ◆◆◆ ◆ ◆ ■ ◆ ◆ ◆◆ ◆
◆◆ ●
■ ●■
■●
◆◆ ◆ ■■ ● ■ ◆◆ ◆ ●
■ ●


■ ●
■ ● ■●■
◆◆ ■ ■ ■■ ■● ◆◆ ◆ ● ● ■●
● ● ● ◆◆ ◆ ● ■
����� ◆◆ ◆◆ ■ ● ■● ● ����� ● ■
◆◆ ■ ■●■ ■ ●● ◆ ◆ ◆
■ ■ ●●■ ● ■
● ■ ● ■
◆ ■ ●● ◆ ◆ ● ●■ ■ ■
◆◆ ■■ ● ◆◆ ◆ ●●

◆◆ ■■ ●
■ ●●
◆ ◆◆
● ■ ● ●● ■■
����

����
■ ■ ■ ●●● ●
����� ◆ ◆◆ ■■ ■ ● ����� ■●●

■ ■
■ ● ●● ■ ■
◆ ◆ ●● ■
◆◆ ◆ ■
■ ■ ■ ●● ● ●●■ ■

■■■ ●● ■●
●● ■ ■
��-� ■ ■■ ●●
��-� ■● ■●■


■ ●● ■
■■ ● ● ���������� ��������� ■ ● ���������� ���������
■■ ●● ●
■ ■ ��������� ���������
●● ■
●● ●
��-� ● ● ◆ ��������� ��-� ◆ ���������
���� ���� ������ ������� ���� ���� ������ �������

��-� ��-�
���� ���� ���� ���� � ���� ���� ���� ���� �
���� ���� ������ ���� ���� ������

Figure 3: Errors of bisectors approximated on triangulations of a sphere relative to mean edge length. The left is based on uniform vertex
distributions with one generator at the pole and another on the equator. The right plot is based on a distribution biased along the one axis
and the generators on opposite points on this axis. Both plots show the errors of exact polyhedral geodesics and heat diffusion using t = 20
and t = 2−7 . Examples of the meshes used in the experiments are shown as insets.

We also bias the distribution so that the average density varies based on diffusion. In this experiment heat diffusion is significantly
along the first coordinate axis. Such spheres with different densi- faster and also scales better with the number of vertices.
ties around the points p0 and p1 allow us to check if the bisectors
still converge to the ground truth, and how much they are affected 5. Centroids on surfaces
by differently sized triangles. Using this set of meshes, we measure
the error of the bisectors as a function of the edge length based on For Euclidean domains the centroid is the center of mass. For more
two values for the time step: t = 1 and t = 2−7 ≈ 0.008. For com- general domains one may employ the notion of Riemannian center
parison, we also compute the bisectors using polyhedral geodesics, of mass [Kar14], which can be defined as the point that minimizes
i.e. the exact distance on the piecewise linear surface, based on Kir- the integrated squared distance values to all points in the cell:
sanov’s implementation [SSK∗ 05]. We also include the biased ver-
Z
ci = arg min d 2 (x, y) dx. (22)
tex distribution and place the generators at p0 , p1 , which are on op- y∈Ω Ci
posite ends of the varying density. The resulting root mean squared
This definition works with arbitrary choices for the distance func-
errors relative to the mean edge lengths are shown in Figure 3. All
tion d(·, ·). For Riemannian surfaces a common choice for d(·, ·) is
plots clearly show the expected quadratic convergence for the diffu-
geodesic distance.
sion bisectors as well as for polyhedral distances. For the uniformly
sampled case the constant is better compared to the biased case. Using heat diffusion, we define the center analogously as the
Diffusion using large values for t seems to be slightly more robust point in a cell that generates the most heat within the cell when
to variations in triangle size, as can be seen in the slightly better re- diffused:
Z
sults for the biased vertex distribution for t = 1. Statistics based on
ci (t) = arg max k(t, x, y) dx. (23)
max-errors and/or max edge lengths show similar characteristics. y∈Ω Ci

Using the linearity of the integral operator we can interpret this


Performance The computation of Voronoi diagrams is definition also in a different way: we diffuse heat for all points in
dominated by the evaluation of heat diffusion. We com- the cell Ci and then look for the point that is hottest after some time
pare this to the time it takes to compute polyhedral t. This interpretation is more appealing because it requires only a
distances using the state of the art method [QHY∗ 16]. single solve for heat values, as described in Section 2, and then
The graph in the t [ms] searching for the vertex with the largest value.
inset figure shows 104
the time needed for 103 polyhedral geodesics
diffusion method
Relation to Euclidean centroids As it turns out, this definition
computing heat val- 102 is not just an approximation to Euclidean centroids, it approaches
ues and polyhedral 10 them for large t. To see this, we plug the heat kernel into equation
distances relative 1 23
to the number of 0.1 !
1 kx − yk2
Z
vertices of a planar 10-2 ci (t) = arg max exp − dx (24)
disk-shaped mesh. #vertices y∈Ω Ci (4πt)d/2 4t
102 103 104 105
For each vertex
!
kx − yk2
Z
count we average over all possible seed vertices. Timings include = arg max exp − dx. (25)
y∈Ω Ci 4t
set up costs, such as the matrix factorization for the computation

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

1 1
rmse

rmse
1
2
0.50 implicit 0.50
3
timesteps
4
5

0.10 0.10

0.05 0.05

closest vertex

0.001 0.005 0.010 0.050 0.100 t 0.001 0.005 0.010 0.050 0.100

Figure 4: The heat center converges to the Euclidean centroid in the plane for large t. The horizontal line represents the distance to the
closes vertex, which is the optimum value for the discrete approximation. The effect is non-linear, so requires several linear time steps. For
large t the boundary of the finite disk distorts the result. While the non-linearity is clearly visible for irregular polygons (left), Euclidean
centroid and heat centroid are very similar for a wide range of parameters for well-behaved polygons (right).

Writing the exponential function as a series leads to limited to vertices, the error cannot be smaller than this value. We
2 4 see that, indeed, the discrete solution converges to this optimum
kx − yk kx − yk
Z
ci (t) = arg max 1− + − . . . dx (26) value as t grows, however, convergence requires several time steps.
y∈Ω Ci 4t 32t 2 This behavior should be expected, as the similarity between cen-
kx − yk4 troid and heat center is non-linear. The solutions tend to get worse
Z
= arg min kx − yk2 − + . . . dx. (27) for larger values of t because of boundary effects: the approxima-
y∈Ω Ci 8t
tion assumes an infinite plane, and once values start to be non-zero
We see that for t → ∞ the first term dominates, i.e. at the boundary the approximation is distorted. The two plots sug-
gest that Euclidean centroids are matched for smaller time values t
Z
lim ci (t) = arg min kx − yk2 (28)
t→∞ y∈Ω Ci if the polygon is well-shaped (i.e. roughly convex and symmetric).

Discrete version and numerics The interpretation of setting the


Smoothness and uniqueness Defining the centroid based on
cell to constant heat and defining the center as the hottest point
geodesic distance leads to problems for larger non-Euclidean cells:
carries over nicely to the discrete setting. We again solve Eq. 7 and
given a point x on the surface, the cut-locus of x is the set of points
set h as described in Sec. 2. Then we just need to iterate over the
that have more than one shortest geodesic. This means the function
elements in the solution vector u to identify the center. As before,
of geodesic distances to x is non-smooth at the cut locus. This has
the system matrix can be factored in a preprocess, so finding the
an important numerical consequence: consider a convex cell around
center amounts to performing back-substitution.
x. Then the geodesic distance function is not convex if the cell con-
With this procedure in place, we are able to show experimentally tains points of the cut locus which means that the centroid is not
that the heat center indeed converges to the centroid in the plane as necessarily unique.
t grows. For this we generate a tessellation of the unit circle similar
to the sphere used before. Then we generate polygons in two dif- Note that the definition of the center (Eq. 22) considers all points
ferent ways: 1) We start a random walk over the vertex graph from in a cell. This means the integrand is non-convex if the cut locus of
the center. Triangles are included if all three vertices have been vis- any of the points in the cell intersects the cell. Computing the mini-
ited. This leads to irregularly shaped, non-convex polygons, which mum of non-convex function is generally difficult. The fact that the
are not necessarily simply connected (i.e. they may contain holes function is not smooth also has consequences: small perturbations
or are disconnected). 2) We select vertices inside differently sized of the cell boundary may lead to large, non-continuous jumps of
and oriented ellipses. These polygons are simply connected, well the centroid of the cell.
shaped but not strictly convex. The triangles comprising the poly-
We illustrate this behavior in Figure 5. Here we define a cell by
gons define h and solving for u yields the center.
cutting an elongated ellipsoid orthogonal to the long axis. The left
In order to properly simulate the behavior of the heat function side of each ellipsoid shows the sum of squared geodesic distances,
for large t it is necessary to use a higher order (e.g. Padé) approx- i.e. the functional defining geodesic centroids. The color coding
imation, amounting to performing several time steps: for this we represents the small values with red, so the geodesic centroid is
solve for u based on the initial value h and then iterate h ← u in located in the red area. The right side shows the heat functional,
Eq. 7. Note, that we only use a higher order approximation for the color coded with red representing large values. So, again, the cen-
sake of this experiment. Figure 4 shows the result. The horizontal ter is in the red area. As the cell gets larger, the geodesic functional
line depicts the error that would result from picking the vertex clos- has a ring of maxima around the center axis and not just fails to
est to the true centroid. As the result of the discretized solution is uniquely identify a center but also provides a rather unintuitive re-


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

tices in the mesh. This makes sense, as the solution of heat diffu-
sion is global, i.e. heat values are non-zero everywhere. However,
in our context, we typically need the solution only in a certain area
close to the heat source to compute bisectors or centroids. By set-
ting small values explicitly to zero we obtain an approximate solu-
tion at a runtime that is proportional to the number of values we are
actually interested in in contrast to a complete solve.

Selective Cholesky Solve Let TTT = M−tLC be the (lower trian-


gular) Cholesky factorization of the system matrix computed using
a modified version of LDL [Dav11]. Solving for the right-hand side
Figure 5: The functional defining the center on an elongated el- b ∈ Rv requires solving Ta = b with an auxiliary vector a ∈ Rv
lipsoid. Cells are defined by cutting the ellipsoid orthogonal to the and subsequently solving TT u = a. As we discuss in the following,
long axis (cell boundaries are marked in red). The left part shows the first solve can be made efficient by exploiting the elimination
the sum of squared geodesic distances, the right part diffusion val- tree [DRSL16], a data structure automatically generated during fac-
ues. Color coding is chosen so that the center is in the red area. torization. We localize the second solve by restricting it to rows of
Already for moderately large cells, geodesic distances become non- interest and show that this incurs a negligible error and significantly
unique and the center(s) moves away from the tip. Diffusion natu- speeds up computation.
rally defines the tip to be the center. The elimination tree succinctly stores the dependencies of ver-
tices. In the context of the triangular matrix and back substitution,
we would like to know which rows are affected by the value in ver-
sult. The heat center functional, perhaps not surprisingly given the
tex i. The elimination tree stores this information: let π(i) be the
setup, identifies the tip of the ellipsoid as the center in all cases.
parent of i in the tree. The tree is constructed such that walking up
The better behavior of heat centers can be expected in much from i, i.e. repeatedly setting i ← π(i), guarantees that all vertices
more general situations: the fundamental solution to the heat func- that are dependent on i are visited. The length of this path is, de-
tion is log-concave in Euclidean domains for all t, and this also pending on the ordering of the vertices, logarithmic in the number
holds for positively curved Riemannian manifolds (see [Ma06] for of vertices.
recent results in this area). It follows from the Précopa-Leindler
Imagine the sparse right hand side b contains only one non-zero
theorem [BL76] that the integral of log-concave functions over a
value (which is in fact the case for computing Voronoi tessella-
convex domain is log-concave. So for convex cells with positive
tions). Then we can compute a by only visiting the rows that ap-
curvature the heat centroid is unique. Smoothness of the function
pear in the path i, π(i), π(π(i)), . . .. The length of this path depends
also implies it is smoothly varying with the cell boundary; this is
on the vertex i and is bounded by the depth of the tree. It is im-
useful for optimization with smoothly varying cells.
portant that for triangulations using the right ordering method (or
It is known that the esti- preconditioner) the elimination tree has logarithmic depth. In other
mates on log-concavity are only words, the solution a also has only very few non-zero elements.
slightly perturbed for negative More generally, if more than one element in b is non-zero, we
Gauss curvature [Ham93]. This need to visit all elements that appear on the paths form the non-zero
means while we may not have a vertices to the root. This is still effective when the non-zero vertices
guarantee for uniqueness of the are close to each other (such as in the centroid computation) and the
centroid, the functional is always ordering method exploits locality. Then subtrees of the elimination
close to be log-concave. Indeed, tree represent connected regions on the mesh and the different paths
we have failed to generate exam- are represented in a subtree. We have found that, indeed, in our
ples (with simple convex bound- scenarios starting with a sparse right hand side b we get a sparse
ary) that would exhibit more than one local maximum. A generic intermediate solution a.
example of the functional on a saddle for two sizes of a cell sym-
metric around the saddle point is shown in the inset image (style is The solution to TT u = a is dense for a connected mesh be-
similar to Figure 5). Note that the extremum is in the saddle point, cause heat diffusion is a global process. This is unfortunate, as dis-
as expected, for geodesic as well as diffusion distances. cussed earlier, because it would mean that computational complex-
ity is at least linear in the number of vertices of the whole mesh,
even though we are only interested in values relatively close to the
6. Localized solving source. To alleviate this problem, we use the fact that values far
away from the heat source will be close to zero. Setting them to
As the mesh in our application is static and the linear system is
zero explicitly results in an approximate solution but allows us to
symmetric, we compute a Cholesky factor of the matrix as a pre-
set the sparsity structure of the solution u.
process. Then the dominating operation for the various solves are
forward and back substitutions. We show that forward substitution More formally, we define the sparsity of u by an index set I,
is generally efficient and the resulting vector is sparse. While back i.e. allowing non-zero coefficients only for ui , i ∈ I. Because the
substitution is also quite fast, it still requires looping over all ver- upper triangular matrix TT is given in a row-major sparse matrix

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams




■◆

▼ ■
▲◆

▼ ●







● ●






����� ▼



■ ◆
▼▼▼ ▲
▼▼▼▼▼
����� ▲▲▲ ▼▼▼▼▼▼▼▼▼▼▼▼▼
▼ ▼ ▼ ▼▼▼
▲▲ ▼▼▼
◆◆ ▲▲ ▼▼
◆ ▲ ▼

����
����� ▲▲▲▲▲▲ ▼

■ ●●●●●●●●●●●●●●●● ▲ ▲
● ▲●
▲●
■ ◆◆ ▲●
▲▲
●●●●●●●●●●●●●●
■ ■ ■ ■◆
■◆■■■■■■■■■■■■■■■ ▲▲■▲■■■■■■■■■■■
��-� ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆ ▲◆▲◆▲◆
▲◆▲◆
Figure 6: The central Voronoi cell is computed using the heat ▲◆▲◆ ◆◆
▲▲▼ ▲
method. The left image shows the heat distribution, the middle im-
age the result of the selective solve, which restricts heat computa- ��-�

tion to a neighborhood around the cell. The right image illustrates


��-�
the logarithm of the (relative) distance between the functions. The ��� ��� ��� ��� ��� ���
mean error is 1.8% (max 16%). �������� �� ��������� ������

Figure 7: The error of bisectors between Voronoi cells relative to


format, solving TT u = a can be easily restricted to the index set I the fraction of the vertices used in the sparse solve. The peak in
by ignoring rows in the complement of I during back substitution. error on the left is the result of not solving for all vertices in the
As a result, the complexity of selective back substitution depends mesh. For small time steps, the error either decreases sharply to
on the number of elements in I and not on the number of vertices a constant value as soon as the vertices of each cell are evaluated,
in the mesh. Algorithm 1 details this selective back substitution and using successively more vertices makes no difference. For large
algorithm. We integrated sparse forward-substitution and selective time steps, the error slowly decreases as more vertices are evalu-
back-substitution in our sparse Cholesky solver based on the LDL ated.
package [Dav11].
suggest that using smaller values of t and local solves are a good
choice in practice.
Input:
• Cholesky factor TT ∈ Rn×n in row-major format (IR , IC ,V ).
• Sparse right-hand side y ∈ Rn . 7. Applications
• Index set I.
Intrinsic Voronoi diagrams can be used in a variety of applications.
Output: Sparse approximate solution y.
We focus on two scenarios that particularly benefit from smooth-
1 for k in I do
ness and efficiency of the computation. We have found that the
2 for p from IR [k] to IR [k + 1] do
results in these applications are largely independent of the choice
3 y[k] ← y[k] −V [p] ∗ y[IC [p]]
of t and that there is no significant benefit of performing several
implicit time steps. We have followed the suggestion by Crane et
Algorithm 1: In the row-major sparse format the matrix is rep-
al. [CWW13] and use t = h2 (where h is the mean edge length) in
resented by three arrays. The row array IR contains the position
all of the following experiments.
of the first index of each row in the column array IC , where the
position of all non-zeros per row are stored. The array V con-
tains for each column position in IC the respective matrix entry. 7.1. Centroidal Voronoi tessellations
Computing an (approximate) centroidal Voronoi tessellation using
Lloyd’s algorithm proceeds by alternating two steps. Starting with
Numerical experiments Measuring the performance gain using a set of n generators p0i ∈ M one iterates:
the selective solve method, we find that the performance is almost 1. constructing the Voronoi tessellation of pk1 , . . . , pkn ;
perfectly linear in the number of requested result values. For error
2. setting pk+1
i to the centroids of their respective Voronoi cells.
measurement we use again the irregularly sampled unit spheres.
This time we generate a Voronoi diagram of moderate complex- Each of the two steps can be performed as explained in the previous
ity and measure the error on all intersection of triangle edges with sections. In the following, we provide details on how to adjust the
Voronoi edges. We restrict the set of vertices used for computing techniques to the specifics of Lloyd’s algorithm. It is important to
the heat distribution for a particular generator: let p be a generator, note that the subdivision of the original mesh is only needed for
then we only use vertices vi that satisfy pT vi > τ where τ ∈ [−1, 1] determining the locations of the Voronoi vertices; the mesh is never
is a threshold. We have repeated this experiment for sequence of actually subdivided throughout the process. We discuss the results
values τ and also a few different time steps t. The result of this and extend the technique to anisotropic diagrams.
experiment is shown in Fig 7. We can see that error decreases as
more vertices are used. This effect is naturally stronger for large Determining the relevant neighborhood Using the selective
t because the values away from the source are larger. For small t solve requires defining a local neighborhood. In the context of
the solution is indistinguishable from the full solution as soon as Lloyd’s algorithm we exploit the Voronoi tessellation of the previ-
all vertices in the eventual Voronoi cells are being evaluated. This ous step and use a union of adjacent Voronoi cells as neighborhood.


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

Model |V| Generators T f ac (m:s:ms) Mem (MB) min. φm (deg) φm (deg) T/iter (s:ms)
K LEIN -B OTTLE 35k 100 0:00:076 14 36.1 52.3 00:660
B IMBA 75k 1,000 0:00:202 34 33.7 52.0 00:289
C ASTING 109k 1,000 0:00:437 54 23.2 50.6 00:564
D RAGON 153k 1,500 0:00:479 71 27.6 51.6 00:786
B USTE 297k 2,000 0:01:324 149 35.7 52.8 01:951
K ITTEN 442k 2,000 0:03:069 244 38.4 53.6 03:536
F ERTILITY 499k 2,000 0:03:290 277 35.6 53.2 03:646
H APPY 608k 3,000 0:04:397 330 19.0 51.4 07:187
P IERROT 641k 1,000 0:06:011 367 33.8 52.8 03:838
B UDDHA 669k 2,000 0:06:348 388 28.4 51.7 06:342
P ENSATORE 886k 2,000 0:09:869 529 33.4 53.0 10:969
I SIDORE 4.2M 4,000 2:10:836 2867 23.2 50.6 84:000
Table 1: Statistics for results presented in Fig. 13. All timings were taken on an Intel 3.9 GhZ Core i7 processor using four threads. T f ac
stands for the time taken during pre-factorization. ‘Mem" reports the amount of memory required for storing the Cholesky factorization. φm
is the vector of the smallest interior angles per triangle of the Delaunay triangulation and φm the mean of this angle over all faces. The time
T/iter represents the average time for each iteration (construction of Voronoi diagram and finding cell centroids). In all cases we ran the
algorithm for 100 iterations.

When computing heat diffusion for centroid or distance computa- Parallelization The bulk of computation time (> 95%) is typically
tion of a cell Ci , we select all adjacent Voronoi cells of this cell. For spent during back substitution to solve the heat equation. This step
increased robustness we also include 2nd degree neighbors. The er- can be easily parallelized since we solve the equation for each cen-
ror due to the selective solve is small as illustrated in Fig. 6 and in troid (or Voronoi cell) independently. We use std::thread for
particular, is concentrated on the boundary of the region and neg- parallelization.
ligible in the area of interest. In the initial step, we estimate an
appropriate radius for each generator and compute the local neigh- Results We tested our approach on meshes varying in vertex count,
borhood using Dijkstra’s algorithm. triangle quality and curvature. For each mesh we generated a CVT
from a random initial distribution of the generators. The quality of
Centroids on faces The discrete energies we consider are all based the CVT can be measured based on the interior angles of its dual
on piecewise linear approximation. This means maxima, and there- triangulation. For easy comparison with related work we also report
fore centroids, necessarily coincide with vertices. For convergence the mean and minimum of the smallest interior angle per triangle.
of Lloyd’s method it is beneficial to move the generators smoothly Table 1 shows that the resulting tessellations are similar in regu-
on the surface over the course of the procedure. A possible solution larity compared to other approaches. Since the results depend on
would be to use higher order finite elements to solve the heat equa- random initialization, we report the best out of 5 runs with respect
tion, yet this would increase storage and computation requirements to mean interior angle.
of the factorization.
In terms of computational efficiency, we note that we have been
For the purpose of Lloyd’s algorithm, we decided to smooth the able to generate an intrinsic CVT on meshes with larger vertex
trajectories of generators by locally fitting bivariate quadratic poly- count than reported so far in the literature. To provide a rough com-
nomials to the piecewise linear heat function in the vicinity of the parison to Wang et al. [WYL∗ 15] we have run our algorithm on the
maximum c̃i and to compute the centroid as its unique maximizer. A RMADILLO model with the same number of generators on com-
More specifically, we first determine the heat centroid c̃i as de- parable hardware (2.6GHz Intel i5, four cores) and found a three-
tailed in the previous section. Then we select all faces incident to fold speed-up of the time needed per iteration (0.82s vs. 2.12s).
the vertex c̃i and project them onto the tangent plane at ci as de- Quality metrics in this experiment turned out to be very similar.
fined by the vertex normal at this point. Any choice of vertex nor- The diffusion CVT shows no sig-
mal could be used here, we decided to use the area weighted face nificant dependence on curvature. To
normals. Next, we fit a bivariate polynomial to the heat values at demonstrate this, we have generated 20
the projected vertices. Finally, we determine the triangle that con- and 500 sites on a torus and a sphere
tains the maximum of the polynomial and map this point back to (similar mesh resolution) scaled to unit
the geometry using barycentric coordinates. If the maximum is not area. After 100 iterations we measured
contained in a triangle we use the point on one of the triangles that the variance in cell area and obtained
is closest to the solution. values on the order of 10−6 for 20 sites
Even though this is just a local approximation, the quality of and 10−8 for 500 sites, for both the torus and the sphere. The in-
the resulting CVT is significantly increased using this method as set shows the torus with the sites color coded based on the squared
generators move freely on the surface. We observed an increase of difference to average area. There is apparently no systematic de-
the quality metric φm (see below) of up to 2◦ . pendence of area on curvature.

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

Figure 8: Dual Delaunay triangulation of a CVT computed using Figure 9: Intrinsic Voronoi diagrams enable interesting applica-
our algorithm. tions. Anisotropic CVTs are generated by immersing the surface
into R6 using positions and normals. For non-convex surfaces, this
The intrinsic nature of the computations allows applying the al- leads to self intersections. The Voronoi diagram on the Klein bot-
gorithm to surfaces that contain self intersections, i.e. that are not tle has been computed in R3 , where no embedding of the surface
properly embedded. This is important as many meshes encountered exists.
in practice contain self intersections. Figure 9 shows an example of
a CVT on an instance of the Klein bottle, which is an example of a
surface that cannot be embedded in R3 coordinates bi (q) at a point q have to fulfill the following require-
ments:
Meshing The regularity of a CVT induces dual Delaunay triangu-
lations with close-to-regular triangles (see Figure 8). This makes P OSITIVITY: bi (q) ≥ 0 for all i.
our approach attractive for computing high-quality base meshes as L AGRANGE PROPERTY: bi (p j ) = δi j .
needed e.g. in semi-regular re-meshing [Gus07]. As mentioned, the PARTITION OF UNITY: Coordinates at a point sum to 1, i.e.
intrinsic computation makes the meshing robust against the geo- ∑ni=1 bi (q) = 1.
metric properties of the embedding, such as proximity of differ- L INEAR PRECISION : The point is the weighted average of the fixed
ent parts of the surface. For generating high-resolution meshes the sites: q = ∑ni=1 bi (q)pi .
source mesh might need to be up-sampled, as the Voronoi diagrams Natural neighbor coordinates define barycentric coordinates using
cannot have more cells than the underlying mesh has vertices. Voronoi diagrams. The basic idea is to first form the Voronoi dia-
gram of the fixed sites pi and compute the area of each Voronoi cell
However, intrinsic computations are costly compared to dis-
ai . The barycentric coordinates of a point q are determined as fol-
tance computations in Euclidean space. For surfaces that are simple
lows: Construct a new Voronoi diagram with the added site q and
enough extrinsic approaches [YLL∗ 09] would be more appropriate.
compute the cell areas ãi and aq respectively. The coordinates are
Anisotropic centroidal Voronoi tessellations The Laplacian is an now defined as bi (q) = (ai − ãi )/aq . This definition motivates the
intrinsic operator and the cotan discretization consequently only alternative name area stealing coordinate.
depends on intrinsic properties such as edge lengths and angles. Given our fast approximation of Voronoi diagrams on meshes
This means our approach is independent of the ambient space and natural neighbor coordinates can be readily generalized to trian-
directly extends to higher co-dimension. We exploit this feature to gle meshes, however, for non-planar meshes linear precision can
get anisotropic CVTs that consider distances in positions as well as not carry over to curved domains. Figure 10 illustrates barycen-
normals: For a mesh with vertices pi and corresponding vertex nor- tric interpolation of texture coordinates. Out method is relatively
mals ni the mapping fλ : M 7→ R6 , pi → (p0i , p1i , p2i , λn0i , λn1i , λn2i ) slow compared to previous work. Rustamov [Rus10] generalizes 2d
lifts the mesh M into R6 [CG06]. In this immersion, intrinsic dis- barycentric coordinates to the surface case by using the exponential
tances also account for normal variation. Note that fλ is not nec- map. This method is limited to sites forming polygons whereas our
essarily injective and the mesh will generally have many self in- method can interpolate between arbitrary data points.
tersections. heat local We construct anisotropic centroidal Voronoi
Panozzo et al. [PBDSH13] compute approximate geodesic dis-
tessellations by evaluating Voronoi cells with respect to the immer-
tances by mapping the mesh to a higher dimensional space where
sion induced by fλ and cell centroids using the diffusion metric. To
Euclidean distances mimic geodesic distances on the original mesh.
fix the relative importance of normals in this computation we nor-
This approximation is used to define barycentric coordinates vari-
malize all meshes to a unit bounding box. In this setting we chose a
ationally. The resulting algorithm is very fast and robust, however,
value of λ = 0.05. Figure 9 shows to results that demonstrate how
the pre-computation is quite heavy and the approximation might
edges align with high-curvature regions.
fail. Moreover, negative weights might occur for coarse samplings.
Our algorithm has faster pre-computation time and can guarantee
7.2. Natural neighbor coordinates positive weights at the cost of much slower evaluation.
Voronoi diagrams can be used to define barycentric coordinates on
Blend skinning Another application of barycentric coordinates is
meshes using natural neighbor coordinates [Sib81] which are use-
blend skinning. Given a set of point handles on a mesh (usually
ful e.g. to interpolate data defined at fixed points.
structured in a skeletal hierarchy), the mesh should deform when
Let p1 , . . . , pn be points in the Euclidean domain. Barycentric the handles are moved. The influence of each handle on a given


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

our algorithms extend to any domain that allows the definition


of a Laplacian like polygonal meshes [AW11] and point clouds
[LPG12]. Computing CVT’s on point sets using the operator de-
fined in [LPG12] immediately allows us to reconstruct surfaces
from points using the dual Delaunay triangulation (see Figure 12).
While we have not demonstrated this, the computation of
Voronoi tessellations extends to arbitrary generators such as lines
or more general shapes. This would allow to efficiently implement
corresponding centroidal Voronoi tessellations [LLW12].
An important ingredient for efficiency is the localized back-
substitution. Back-substitution for pre-factored Laplace operator
matrices is a part of many geometric processing algorithms. Conse-
Figure 10: Natural neighbor coordinates can be used to perform quently, we believe that many other algorithms could benefit from
texture mapping. this idea. As an example, an important ingredient in many recent
geometry processing techniques [SA07, CPS11, CWW13] involves
solving constant linear systems based on the Laplacian and local
non-linear operations. Localized back-substitution would be appli-
cable whenever the desired solution is restricted to a local area in
the mesh.
We have so far restricted our analysis to plain heat diffusion.
It seems promising to use the solutions of other PDEs [BF15] for
defining Voronoi cells or centroids – efficiency of computation
would be similar to the heat method as long as the a sparse lin-
earization is available.

Figure 11: Voronoi diagram of handles (left), two weight functions


(center), posed model (right).

point can be computed using barycentric coordinates. To average


transformations given barycentric weights we use dual quaternion
skinning [KCvO07] as implemented in libigl [JP∗ 16]. Figure 11
shows skinning weights computed using the described method and
a posed model.
One of the favorable properties of natural neighbor coordinates
is their locality. Weights of distant handles are guaranteed to be ex-
actly zero. This feature sets natural neighbor skinning apart from Figure 12: Meshing of a point cloud by generating a CVT and then
competing methods like Bounded Biharmonic Weights [JBPS11] dualizing.
which uses non-linear optimization to compute a set of weights
with all required properties. Our method, albeit easy to implement,
is comparably slow. For seven handles on the armadillo with 55102 References
vertices (Fig. 11) computing blending weights for a specific ver- [ADVDI05] A LLIEZ P., D E V ERDIÈRE É. C., D EVILLERS O., I SEN -
tex takes about 1.1 ms on a 3.9 GHz CPU with four cores, which BURG M.: Centroidal voronoi diagrams for isotropic surface remeshing.
adds up to about a minute for all vertices. The main reason for this Graphical Models 67, 3 (2005), 204–231. 3
long computing time is the fact that we can not efficiently local- [AW11] A LEXA M., WARDETZKY M.: Discrete laplacians on gen-
ize the computation of the heat kernel if we are interested in a very eral polygonal meshes. In ACM SIGGRAPH 2011 Papers (New York,
coarse diagram. Natural neighbor coordinates could be made useful NY, USA, 2011), SIGGRAPH ’11, ACM, pp. 102:1–102:10. doi:
10.1145/1964921.1964997. 11
in practice by computing the weights on a coarse mesh and subse-
quently propagating them to the original version. [BF15] B ELYAEV A. G., FAYOLLE P.-A.: On variational and pde-based
distance function approximations. Computer Graphics Forum 34, 8
(2015), 104–118. doi:10.1111/cgf.12611. 1, 3, 11
8. Conclusion [BL76] B RASCAMP H. J., L IEB E. H.: On extensions of the Brunn-
Minkowski and Prékopa-Leindler theorems, including inequalities for
We defined Voronoi cells and centroids based on heat diffusion. log concave functions, and with an application to the diffusion equation.
This enables stable and very efficient computation on various dis- Journal of Functional Analysis 22, 4 (1976), 366 – 389. doi:http:
crete surfaces. Since diffusion is based on the Laplace operator, //dx.doi.org/10.1016/0022-1236(76)90004-5. 7

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

[BPVR11] B ENJAMIN W., P OLK A. W., V ISHWANATHAN S., R AMANI [LRF10] L IPMAN Y., RUSTAMOV R. M., F UNKHOUSER T. A.: Bi-
K.: Heat walk: Robust salient segmentation of non-rigid shapes. Com- harmonic distance. ACM Trans. Graph. 29, 3 (July 2010), 27:1–27:11.
puter Graphics Forum 30, 7 (2011), 2097–2106. doi:10.1111/j. doi:10.1145/1805964.1805971. 1, 3
1467-8659.2011.02060.x. 2 [Ma06] M A L.: Partial convexity to the heat equation, 2006. arXiv
[CG06] C AÑAS G. D., G ORTLER S. J.: Surface remeshing in arbitrary preprint math/0604059. 7
codimensions. The Visual Computer 22, 9-11 (2006), 885–895. 10 [MMP87] M ITCHELL J. S., M OUNT D. M., PAPADIMITRIOU C. H.:
[CH90] C HEN J., H AN Y.: Shortest paths on a polyhedron. In Proceed- The discrete geodesic problem. SIAM Journal on Computing 16, 4
ings of the Sixth Annual Symposium on Computational Geometry (New (1987), 647–668. 2
York, NY, USA, 1990), SCG ’90, ACM, pp. 360–369. 2 [PBDSH13] PANOZZO D., BARAN I., D IAMANTI O., S ORKINE -
[CLL∗ 05] C OIFMAN R. R., L AFON S., L EE A. B., M AGGIONI M., H ORNUNG O.: Weighted averages on surfaces. ACM Transactions on
NADLER B., WARNER F., Z UCKER S. W.: Geometric diffusions as Graphics (proceedings of ACM SIGGRAPH) 32, 4 (2013), 60:1–60:12.
a tool for harmonic analysis and structure definition of data: Diffusion 10
maps. Proceedings of the National Academy of Sciences of the United [PP93] P INKALL U., P OLTHIER K.: Computing discrete minimal sur-
States of America 102, 21 (2005), 7426–7431. doi:10.1073/pnas. faces and their conjugates. Experim. Math. 2 (1993), 15–36. 2
0500334102. 2
[PS13] PATANÉ G., S PAGNUOLO M.: Heat diffusion kernel and distance
[CPS11] C RANE K., P INKALL U., S CHRÖDER P.: Spin transformations on surface meshes and point sets. Computers & Graphics 37, 6 (2013),
of discrete surfaces. ACM Trans. Graph. 30, 4 (July 2011), 104:1– 676–686. 1, 3
104:10. doi:10.1145/2010324.1964999. 11
[QHY∗ 16] Q IN Y., H AN X., Y U H., Y U Y., Z HANG J.: Fast and
[CWW13] C RANE K., W EISCHEDEL C., WARDETZKY M.: Geodesics exact discrete geodesic computation based on triangle-oriented wave-
in heat: A new approach to computing distance based on heat flow. front propagation. ACM Trans. Graph. 35, 4 (July 2016), 125:1–125:13.
ACM Trans. Graph. 32, 5 (Oct. 2013), 152:1–152:11. doi:10.1145/ doi:10.1145/2897824.2925930. 5
2516971.2516977. 2, 3, 4, 8, 11
[Rus10] RUSTAMOV R. M.: Barycentric coordinates on surfaces. Com-
[Dav11] DAVIS T. A.: User guide for ldl, a concise sparse cholesky pack- puter Graphics Forum 29, 5 (2010), 1507–1516. doi:10.1111/j.
age, 2011. 7, 8 1467-8659.2010.01759.x. 10
[DE13] D ZIUK G., E LLIOTT C. M.: Finite element methods for sur- [SA07] S ORKINE O., A LEXA M.: As-rigid-as-possible surface model-
face pdes*. Acta Numerica 22 (04 2013), 289–396. doi:10.1017/ ing. In Proceedings of the Fifth Eurographics Symposium on Geome-
S0962492913000056. 4 try Processing (Aire-la-Ville, Switzerland, Switzerland, 2007), SGP ’07,
[DRSL16] DAVIS T. A., R AJAMANICKAM S., S ID -L AKHDAR W. M.: Eurographics Association, pp. 109–116. 11
A survey of direct methods for sparse linear systems. Acta Numerica 25 [SdGP∗ 15] S OLOMON J., DE G OES F., P EYRÉ G., C UTURI M.,
(2016), 383–566. 7 B UTSCHER A., N GUYEN A., D U T., G UIBAS L.: Convolutional
[FPmRS07] F OUSS F., P IROTTE A., M . R ENDERS J., S AERENS M.: wasserstein distances: Efficient optimal transportation on geometric do-
Random-walk computation of similarities between nodes of a graph mains. ACM Trans. Graph. 34, 4 (July 2015), 66:1–66:11. doi:
with application to collaborative recommendation. IEEE Transactions 10.1145/2766963. 1, 3
on Knowledge and Data Engineering 19, 3 (March 2007), 355–369. [Set96] S ETHIAN J. A.: A fast marching level set method for monotoni-
doi:10.1109/TKDE.2007.46. 3 cally advancing fronts. Proceedings of the National Academy of Sciences
[Gus07] G USKOV I.: Manifold-based approach to semi-regular remesh- 93, 4 (1996), 1591–1595. 2
ing. Graphical Models 69, 1 (2007), 1 – 18. doi:http://dx.doi. [Sib81] S IBSON R.: A brief description of natural neighbour interpola-
org/10.1016/j.gmod.2006.05.001. 10 tion. Interpreting multivariate data 21 (1981), 21–36. 10
[Ham93] H AMILTON R. S.: A matrix Harnack estimate for the heat equa- [SSK∗ 05] S URAZHSKY V., S URAZHSKY T., K IRSANOV D., G ORTLER
tion. Communications in Analysis and Geometry 1, 1 (1993), 113–126. S. J., H OPPE H.: Fast exact and approximate geodesics on meshes. ACM
doi:10.4310/CAG.1993.v1.n1.a6. 7 Trans. Graph. 24, 3 (July 2005), 553–560. doi:10.1145/1073204.
[JBPS11] JACOBSON A., BARAN I., P OPOVI Ć J., S ORKINE O.: 1073228. 2, 5
Bounded biharmonic weights for real-time deformation. ACM Trans- [Var67] VARADHAN S. R. S.: On the behavior of the fundamental solu-
actions on Graphics (proceedings of ACM SIGGRAPH) 30, 4 (2011), tion of the heat equation with variable coefficients. Communications on
78:1–78:8. 11 Pure and Applied Mathematics 20, 2 (1967), 431–455. 2
[JP∗ 16] JACOBSON A., PANOZZO D., ET AL .: libigl: A simple C++ [WYL∗ 15] WANG X., Y ING X., L IU Y.-J., X IN S.-Q., WANG W., G U
geometry processing library, 2016. http://libigl.github.io/libigl/. 11 X., M UELLER -W ITTIG W., H E Y.: Intrinsic computation of centroidal
voronoi tessellation (cvt) on meshes. Computer-Aided Design 58 (2015),
[Kar14] K ARCHER H.: Riemannian center of mass and so called karcher
51–61. 3, 9
mean, 2014. 5
[XW09] X IN S.-Q., WANG G.-J.: Improving chen and han’s algorithm
[KCvO07] K AVAN L., C OLLINS S., Ž ÁRA J., O’S ULLIVAN C.: Skin- on the discrete geodesic problem. ACM Trans. Graph. 28, 4 (Sept. 2009),
ning with dual quaternions. In Proceedings of the 2007 Symposium on 104:1–104:8. 2, 3
Interactive 3D Graphics and Games (New York, NY, USA, 2007), I3D
’07, ACM, pp. 39–46. doi:10.1145/1230100.1230107. 11 [YLL∗ 09] YAN D.-M., L ÉVY B., L IU Y., S UN F., WANG W.: Isotropic
remeshing with fast and exact computation of restricted voronoi dia-
[KS98] K IMMEL R., S ETHIAN J. A.: Computing geodesic paths on man- gram. In Computer graphics forum (2009), vol. 28, Wiley Online Li-
ifolds. Proceedings of the National Academy of Sciences 95, 15 (1998), brary, pp. 1445–1454. 3, 10
8431–8435. 2
[LLW12] L U L., L ÉVY B., WANG W.: Centroidal voronoi tessellation of
line segments and graphs. Comput. Graph. Forum 31, 2pt4 (May 2012),
775–784. doi:10.1111/j.1467-8659.2012.03058.x. 11
[LPG12] L IU Y., P RABHAKARAN B., G UO X.: Point-based manifold
harmonics. Visualization and Computer Graphics, IEEE Transactions
on 18, 10 (2012), 1693–1703. doi:10.1109/TVCG.2011.152. 11


c 2017 The Author(s)
Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.
P. Herholz, F. Haase & M. Alexa / Diffusion Diagrams

Figure 13: Results obtained with our algorithm. See Tab. 1 for timings and statistics.

c 2017 The Author(s)


Computer Graphics Forum
c 2017 The Eurographics Association and John Wiley & Sons Ltd.

You might also like