barycentric coordinates on surfaces - inventiveswan2/reference/differentialg...langer et al....

10
Eurographics Symposium on Geometry Processing 2010 Olga Sorkine and Bruno Lévy (Guest Editors) Volume 29 (2010), Number 5 Barycentric Coordinates on Surfaces Raif M. Rustamov Drew University, Madison NJ, USA Abstract This paper introduces a method for defining and efficiently computing barycentric coordinates with respect to polygons on general surfaces. Our construction is geared towards injective polygons (polygons that can be en- closed in a metric ball of an appropriate size) and is based on replacing the linear precision property of planar coordinates by a requirement in terms of center of mass, and generalizing this requirement to the surface setting. We show that the resulting surface barycentric coordinates can be computed using planar barycentric coordinates with respect to a polygon in the tangent plane. We prove theoretically that the surface coordinates properly gen- eralize the planar coordinates and carry some of their useful properties such as unique reconstruction of a point given its coordinates, uniqueness for triangles, edge linearity, similarity invariance, and smoothness; in addition, these coordinates are insensitive to isometric deformations and can be used to reconstruct isometries. We show empirically that surface coordinates are shape-aware with consistent gross behavior across different surfaces, are well-behaved for different polygon types/locations on variety of surface forms, and that they are fast to compute. Finally, we demonstrate effectiveness of surface coordinates for interpolation, decal mapping, and correspondence refinement. 1. Introduction Barycentric coordinates, which encode the location of a point with respect to a planar polygon (or polyhedron in 3D), have found many practical applications in computer graphics and other fields that involve geometric processing. Among such applications are interpolation, shading, free-form de- formation of images and meshes, generalized Bézier sur- faces, parametrization, interior distance measurement, im- age cloning, shape retrieval, and finite elements. To increase the scope of the applications it is useful to define barycentric coordinates in the setting of polygons lying on surfaces. It is desirable that such coordinates generalize existing planar coordinates, are intrinsic (insensitive to isometric deforma- tions), and are fast to compute. While a variety of ways have been proposed for comput- ing barycentric coordinates in the planar setting (e.g. Wach- spress [Wac75], Mean Value [Flo03, HF06], etc.), the re- search in the surface setting remains very limited. A com- plete success has only been achieved for polygons on the sphere [ANS96, CON99, JSWD05, LBS06]. Constructions exist on sphere-like surfaces [ANS96] and the hyperbolic plane [Har03], but these are restricted to triangles. The goal of this work is to provide a method for defin- Figure 1: Barycentric coordinate with respect to the vertex v 1 of a surface triangle. ing and efficiently computing barycentric coordinates with respect to polygons on general surfaces (Figure 1). Our con- struction is geared towards injective polygons (polygons that can be enclosed in a metric ball of an appropriate size) and is guided by the following observation. The defining properties of barycentric coordinates can be transferred to the surface setting directly except for the linear precision property. In the surface setting it both contradicts another defining prop- erty (partition of unity) and depends on the embedding of the surface, which renders the resulting coordinates sensitive c 2010 The Author(s) Journal compilation c 2010 The Eurographics Association and Blackwell Publishing Ltd. Published by Blackwell Publishing, 9600 Garsington Road, Oxford OX4 2DQ, UK and 350 Main Street, Malden, MA 02148, USA.

Upload: others

Post on 18-Jul-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Eurographics Symposium on Geometry Processing 2010Olga Sorkine and Bruno Lévy(Guest Editors)

Volume 29 (2010), Number 5

Barycentric Coordinates on Surfaces

Raif M. Rustamov

Drew University, Madison NJ, USA

AbstractThis paper introduces a method for defining and efficiently computing barycentric coordinates with respect topolygons on general surfaces. Our construction is geared towards injective polygons (polygons that can be en-closed in a metric ball of an appropriate size) and is based on replacing the linear precision property of planarcoordinates by a requirement in terms of center of mass, and generalizing this requirement to the surface setting.We show that the resulting surface barycentric coordinates can be computed using planar barycentric coordinateswith respect to a polygon in the tangent plane. We prove theoretically that the surface coordinates properly gen-eralize the planar coordinates and carry some of their useful properties such as unique reconstruction of a pointgiven its coordinates, uniqueness for triangles, edge linearity, similarity invariance, and smoothness; in addition,these coordinates are insensitive to isometric deformations and can be used to reconstruct isometries. We showempirically that surface coordinates are shape-aware with consistent gross behavior across different surfaces, arewell-behaved for different polygon types/locations on variety of surface forms, and that they are fast to compute.Finally, we demonstrate effectiveness of surface coordinates for interpolation, decal mapping, and correspondencerefinement.

1. Introduction

Barycentric coordinates, which encode the location of apoint with respect to a planar polygon (or polyhedron in 3D),have found many practical applications in computer graphicsand other fields that involve geometric processing. Amongsuch applications are interpolation, shading, free-form de-formation of images and meshes, generalized Bézier sur-faces, parametrization, interior distance measurement, im-age cloning, shape retrieval, and finite elements. To increasethe scope of the applications it is useful to define barycentriccoordinates in the setting of polygons lying on surfaces. Itis desirable that such coordinates generalize existing planarcoordinates, are intrinsic (insensitive to isometric deforma-tions), and are fast to compute.

While a variety of ways have been proposed for comput-ing barycentric coordinates in the planar setting (e.g. Wach-spress [Wac75], Mean Value [Flo03, HF06], etc.), the re-search in the surface setting remains very limited. A com-plete success has only been achieved for polygons on thesphere [ANS96, CON99, JSWD05, LBS06]. Constructionsexist on sphere-like surfaces [ANS96] and the hyperbolicplane [Har03], but these are restricted to triangles.

The goal of this work is to provide a method for defin-

Figure 1: Barycentric coordinate with respect to the vertexv1 of a surface triangle.

ing and efficiently computing barycentric coordinates withrespect to polygons on general surfaces (Figure 1). Our con-struction is geared towards injective polygons (polygons thatcan be enclosed in a metric ball of an appropriate size) and isguided by the following observation. The defining propertiesof barycentric coordinates can be transferred to the surfacesetting directly except for the linear precision property. Inthe surface setting it both contradicts another defining prop-erty (partition of unity) and depends on the embedding ofthe surface, which renders the resulting coordinates sensitive

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.Published by Blackwell Publishing, 9600 Garsington Road, Oxford OX4 2DQ, UK and350 Main Street, Malden, MA 02148, USA.

Page 2: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

to deformations. Therefore, we replace the linear precisionproperty of planar coordinates by an equivalent requirementin terms of center of mass, and generalize this requirementto the surface setting using the concept of the Riemanniancenter of mass.

In addition to being natural, this approach has the fol-lowing benefits. First, these coordinates generalize existingplanar coordinates: for any given choice of planar coordi-nates, one obtains a construction of barycentric coordinateswith respect to polygons on surfaces. When the underlyingsurface is the plane one gets back the planar coordinatesone chose. In addition, many useful properties of the pla-nar coordinates transfer to the surface setting. Second, ourdefinition is based on the intrinsic properties of the surface,namely geodesic distances, and is independent of the par-ticular embedding of the surface in space. This renders theresulting coordinates insensitive to isometric deformations.Moreover, surface coordinates can be used to reconstructisometric maps between surfaces. Third, these coordinatesare easy to implement and fast to compute. In fact, after pre-processing, their computation is as fast as computing planarbarycentric coordinates.

The main contribution of this paper is the proposed ap-proach for defining (Section 3) and constructing (Section 4)barycentric coordinates with respect to injective polygons onsurfaces. We also prove the theoretical properties of these co-ordinates (Section 5). After providing more detail about theircomputation in discrete setting (Section 6), we present theirpractical evaluation (Section 7) and applications (Section 8).

2. Previous Work

Planar barycentric coordinates have been attracting a lot ofattention recently. A variety of ways have been proposedfor computing such coordinates, including but not limitedto Wachspress [Wac75], Mean Value [Flo03,HF06], PositiveMean Value [LKCOL07], Harmonic [FHK06,JMD∗07], andMaximum Entropy [HS08] coordinates. However, researchregarding coordinates on surfaces remains very limited.

A complete success has only been achieved for polygonson the (hemi)sphere. Barycentric coordinates with respectto spherical triangles were studied as early as by Mobius;their modern use in computer graphics is associated with theworks of Alfeld et al. [ANS96] and Cabral et al. [CON99].Next, they were extended to convex spherical polygons inthe work of Ju et al. [JSWD05], who called the resultingcoordinates “vector coordinates”. Finally, a construction inthe case of arbitrary spherical polygons was introduced byLanger et al. [LBS06]. In all of these spherical constructionsthe original linear precision property of barycentric coordi-nates was preserved at the cost of sacrificing the partition ofunity property.

The construction of Langer et al. reduces the computationof spherical coordinates to that of the planar coordinates in

the tangent plane. While this strategy is similar to ours, theyuse gnomonic projection to achieve this reduction and we arenot aware of any extensions of such an approach to generalsurfaces. In addition, if following Langer et al. one preservesthe linear precision property in its original planar form, theresulting barycentric coordinates will strongly depend on theparticular embedding of the surface in space and one wouldnot be able to achieve insensitivity to deformations.

Alfeld et al. [ANS96] also propose a construction of coor-dinates for triangles on sphere-like surfaces. These surfacesare “spheres” but with radius that is allowed to change frompoint to point. Given three points on such a surface, one con-siders the three corresponding vectors starting at the origin.These vectors constitute a basis for R3. Therefore, the vec-tor corresponding to a point on the surface can be writtenas a linear combination of these vectors. The coefficients inthis linear combination give the barycentric coordinates ofthis point. Not only is such an approach limited to triangles,but also the original linear precision property of barycentriccoordinates is preserved with the resulting sacrifices of par-tition of unity and insensitivity to deformations.

A construction of barycentric coordinates for triangles onthe hyperbolic plane can be found in mathematical litera-ture [Har03]. This construction directly follows the planardefinition based on triangle areas. The differences are thatthe point within the triangle is connected to the vertices viageodesic arcs, and the areas of the resulting hyperbolic trian-gles are used to define the coordinates. While being intrinsicand preserving the partition of unity property, this approachis limited to triangles. In addition, it is not clear what kindof linear precision property the resulting coordinates satisfyand how such a property would generalize to other surfaces.

Our construction uses the concept of Riemannian centerof mass which was first introduced by Élie Cartan [Car29]and later investigated in the works of Karcher [Kar77]and Kendall [Ken90]. This concept has found some im-portant applications in geometry, Lie group theory, and in-trinsic statistics. It has also recently been drawing the at-tention of the machine learning community; some of theapplications include the out-of-sample pre-image problem[Sol06, EKS07, TSK09] and a generalization of the meanshifts to manifolds [SM09]. In computer graphics literature,Buss and Fillmore [BF01] use the Riemannian center ofmass to define Bezier and B-spline curves on spheres.

3. Definition

Our goal is to generalize the definition of planar barycentriccoordinates to the setting of polygons on surfaces. A surfacepolygon is similar to a planar one except that the straight linesegments are replaced by the geodesic segments connectingthe vertices. Let {vi}n

i=1 be the vertices of such a polygon,and p be a surface point within the polygon. We seek to de-fine the barycentric coordinates bi(p), i = 1...n.

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 3: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

The defining properties of planar barycentric coordinatesare as follows: the Lagrange property requires that bi(v j) =δi j (the Kronecker delta); partition of unity requires the coor-dinates to add up to one, ∑bi(p) = 1; linear precision prop-erty is that the equality ∑bi(p)vi = p holds, where vi and pare considered as vectors.

These defining properties of barycentric coordinates canbe transferred to the surface setting directly except for thelinear precision property. In the surface setting it both con-tradicts the partition of unity property (e.g. consider the casewhen all polygon vertices lie on the intersection of the sur-face with a plane, but p is not on that plane) and dependson the embedding of the surface, which renders the resultingcoordinates sensitive to deformations. Therefore, we replacethe linear precision property by a new requirement which wecall the “center of mass property”. The planar linear preci-sion property ∑bi(p)vi = p is equivalent to requiring that thepoint p is the center of mass of the point set {vi}n

i=1 wherethe vertex vi has mass bi(p). We generalize this reformula-tion of the linear precision property to surfaces by requiringthat p is the Riemannian center of mass of the point set.

In the rest of this section we elaborate on the concept ofthe Riemannian center of mass. The center of mass on Rie-mannian manifolds is introduced by modeling on Euclideangeometry. Let v1,v2, ...,vn be a set of points with corre-sponding masses m1,m2, ...,mn. In the Euclidean case it isknown that the center of mass of this pointset is the (unique)point minimizing the function U(x) = ∑mid2(x,vi), whered(·, ·) is Euclidean distance. This can be directly extendedto surfaces by replacing Euclidean distances with geodesicdistances; the local minima of the function U(x) in this caseare called the Riemannian centers of mass.

Rigorous results about the uniqueness of Riemannian cen-ter of mass are provided in Karcher [Kar77] and Kendall[Ken90]; a summary can be found in Pennec [Pen06]. Themain theorem is that if the points vi are not “too far” fromeach other, then there exists a unique Riemannian centerof mass. To make this more precise we will need the fol-lowing definitions that we borrow from [Pen06]. The metricball B(y,r) = {x |d(y,x) < r}, where d(y,x) is the geodesicdistance between y and x, is called geodesic if there ex-ists a unique minimizing geodesic from the center y to anypoint in B(y,r); i.e. if r is smaller than the injectivity ra-dius at y. The ball is called regular if its radius satisfies2r√

max(0,k) < π, where k is the maximum of the Rie-mannian curvature (equivalent to Gaussian curvature for sur-faces) in this ball. For example, on the unit sphere the curva-ture is k = 1, and thus any geodesic ball of radius r < π/2 isregular. Such a ball can almost cover a hemisphere, but notthe equator. For surfaces of non-positive curvature, a regulargeodesic ball can be as large as desired.

Theorem (Karcher [Kar77]) If the points {vi}ni=1 are con-

tained in a geodesic ball B(y,r) and if the ball of doubleradius B(y,2r) is still geodesic and regular, then the poten-

tial U(x) is convex and achieves a unique minimum withinthe ball B(y,r). Moreover, this point of minimum is charac-terized by being the unique zero of the gradient vector field∇U(x) within B(y,r).

In the rest of the paper we will only consider polygons forwhich this theorem holds. Namely, we assume that the ver-tices of polygons can be enclosed in a regular geodesic ballas in Karcher’s theorem, and we call these injective poly-gons. The edges and the interior of an injective polygon willbe necessarily contained within the geodesic ball as well.Also note that any two points within a regular geodesic ballare connected by a unique geodesic (which will lie withinthe ball, cf. [Ken90]).

4. Construction

In this section we provide a general framework for con-structing barycentric coordinates satisfying our definition.For any choice of planar barycentric coordinates (e.g. meanvalue coordinates) we show how to obtain the correspondingbarycentric coordinates on surfaces.

The construction is based on the following observation.For a given surface point p let bi = bi(p), i = 1, ...,n thesought barycentric coordinates. The center of mass prop-erty together with Karcher’s theorem (Section 3) imply that∇U(x) =~0 must hold at x = p, where U(x) = ∑bid2(x,vi).Consider the (scaled) gradient vectors

~gi =−12∇(d2(x,vi))

∣∣∣x=p

lying in the tangent plane to the surface at the point p. Thescaling was introduced in order to simplify notation and dis-

Figure 2: The construction of surface coordinates. The(scaled) gradient vectors of squared geodesic distances andthe polygon formed by their endpoints are shown on the tan-gent plane to the surface at the point p. The surface barycen-tric coordinates are equal to the planar barycentric coordi-nates of p with respect to the dashed polygon.

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 4: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

cussions in the sequel. We have that

− 12∇U(x)

∣∣∣x=p

= ∑bi~gi =~0. (1)

Together with partition of unity this implies that bi are planarbarycentric coordinates of~0 (which on the tangent plane canbe identified with the point p) with respect to the polygongenerated by gradient vectors~gi.

Using this observation we compute the surface barycen-tric coordinates as follows, see Figure 2. First, for consis-tency, we fix a choice of planar barycentric coordinate type,e.g. mean value coordinates. Second, we compute the gradi-ent vectors~gi of squared distances from the surface polygonvertices. Third, we set bi equal to planar barycentric coor-dinates of p with respect to the polygon whose vertices arethe endpoints of the gradient vectors ~gi (the dashed polygonin Figure 2); this polygon, which we will call the gradientpolygon, is endowed with the same connectivity as the sur-face polygon.

In general the gradients ~gi can be obtained via a di-vided difference approximation. However, an explicit formfor the (scaled) gradient of squared geodesic distance exists,namely, ~gi = exp−1

p (vi) (cf. [Kar77]). Here, the inverse ex-ponential map exp−1

p (vi) (cf. [Ber03]) is the vector in thetangent plane at p that points in the direction (within an in-finitesimal neighborhood at p) of the geodesic connecting pto vi, and has length equal to the geodesic distance betweenp and vi. The involved geodesic is unique as mentioned atthe end of the last section.

In the next section we will prove that our constructionprovides barycentric coordinates with desirable properties.At an intuitive level, one can see that this construction pro-vides coordinates commensurable with planar coordinates.Loosely stated, due to the inverse exponential map, the ver-tices of the gradient polygon are located at the “correct”directions and distances from the point p. For comparison,consider the spherical barycentric coordinate construction ofLanger et al. [LBS06] who use a similar strategy of reduc-tion to planar coordinates. They obtain the planar polygonvia the gnomonic projection onto the tangent plane (shoota radial ray through the point on the sphere, take the inter-section point with the plane). The vertices of this gnomonicpolygon are located at the “correct” directions with respectto p, but the distances are given by a non-linear function ofthe geodesic distance.

5. Theoretical Properties

This section is devoted to describing the properties of sur-face barycentric coordinates obtained using the constructionabove. In particular, we will argue that these coordinates sat-isfy the defining properties, inherit properties of planar co-ordinates, are isometry invariant, and smooth.

Defining properties: We start by proving that the resulting

coordinates indeed satisfy our definition. The partition ofunity and center of mass properties are satisfied by construc-tion. The Lagrange property is satisfied because if a point pcoincides with a surface polygon vertex v j , then the gradientvector ~g j =~0 and in the tangent plane p will coincide withthe j-th vertex of the gradient polygon (the polygon whosevertices are the endpoints of the gradient vectors ~gi). Sincethe planar coordinates with respect to the gradient polygonsatisfy the Lagrange property, we will also have bi(p) = δi j.

Unique reconstruction: The linear precision property ofplanar barycentric coordinates allows reconstructing a pointwhen given its barycentric coordinates. Similarly, the centerof mass property provides a way of uniquely reconstruct-ing a surface point if its surface coordinates are given. Thisfollows from the injectivity assumption on the polygon andKarcher’s theorem in Section 3.

Planar reproduction: When the underlying surface is theplane, the surface coordinates are equal to the planar coordi-nates used in the construction. The reason for this is that thegradient polygon coincides with the original polygon, andone would be computing the planar coordinates with respectto this polygon. Indeed, on the plane~gi =−→pvi as can be seenfrom the explicit form of the gradient vectors in terms of theinverse exponential map.

Uniqueness on triangles: On planar triangles only a sin-gle system of barycentric coordinates exists – one gets thesame coordinate values for a point no matter what construc-tion (e.g. Mean Value, Maximum Entropy) one uses to ob-tain them. This property is inherited by our construction aswell. Indeed, the gradient polygon would be a triangle, anda single set of coefficients exists to make Eq. (1) hold. Thisset of coefficients will be the unique surface barycentric co-ordinates for the point in the surface triangle.

Edge linearity: The edges of surface polygons aregeodesics; along these edges the surface coordinates dis-play the following behavior. Suppose that vi and v j are ad-jacent vertices in the polygon, then for any point p on theedge viv j we have bk(p) = 0 for all k 6= i, j, and bi(p) =1−d(p,vi)/d(vi,v j); similarly for b j. In other words, on theedges the coordinates either vanish or behave like hat func-tions. This property is inherited from the similar property ofthe planar barycentric coordinates. Indeed, if p is on the edgeviv j, then in the tangent plane we have that p belongs to theedge of the gradient polygon connecting the endpoints of ~giand~g j; the exact formula now follows from the explicit formof the gradient vectors, namely the fact that the lengths ofthe gradient vectors are equal to the corresponding geodesicdistances.

Similarity invariance: Planar barycentric coordinates donot change when a uniform scaling is applied to the ambientEuclidean space. A similar property is inherited by the sur-face coordinates: if the surface is uniformly scaled, then thecoordinates stay the same. Indeed, such a scaling will keep

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 5: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

the directions of the gradient vectors the same but scale theirlengths by the same factor. The gradient polygon will be uni-formly scaled with respect to the origin (identified with thepoint p in the tangent plane) and, so the planar barycentriccoordinates will not change, meaning that the surface coor-dinates will stay the same.

Smoothness: Surface coordinates are smooth in the inte-rior, provided that the planar coordinates used in the con-struction are polygon smooth, namely if barycentric coordi-nates of a fixed point strictly inside a planar polygon dependsmoothly on the polygon vertex locations. This assumptionimplies the smoothness of surface coordinates because thegradient polygon depends smoothly on point p. Indeed, dueto the injectivity assumption on the surface polygon, its ver-tices are located within the injectivity radius of p (becauseany two points within a regular geodesic ball are connectedby a unique geodesic, cf. [Ken90]), so the squared geodesicdistances appearing in the potential U(·) and their gradientsdepend smoothly on p. While we intuitively expect meanvalue (Floater [Flo03] proves this in a special case) and har-monic coordinates to be polygon smooth, a rigorous proof isbeyond the scope of this paper.

Isometry invariance: If the surface is isometrically de-formed, then the coordinates of the deformed point with re-spect to the deformed polygon will stay the same. Indeed,the gradient polygon used in the construction is obtainedin terms of intrinsic quantities of the surface, namely theinverse exponential map. As a result, the gradient polygonwill stay the same, and the computed coordinates will be thesame as before the deformation.

Isometry reconstruction: Planar barycentric coordinateshave the following property: if a polygon undergoes a rigidtransformation, then one can apply barycentric interpolationto the new vertex positions to determine where any pointwithin the polygon maps under this transformation (compareto cage-based editing when the cage undergoes a rigid trans-formation). A similar property holds for surface coordinateswith respect to isometric transformations: an isometric mapwithin an injective polygon can be reconstructed given theimages of the polygon vertices.

Since this property is used in one of our applications inSection 8, we provide more details. Given two isometric sur-faces S and S′ with the isometric map φ : S→ S′, let {vi}n

i=1be a polygon in S, and {v′i = φ(vi)}n

i=1 the correspondingpolygon in S′. Consider the map ψ : S→ S′ defined as fol-lows. For a point p ∈ S within the polygon, let bi(p) its sur-face coordinates with respect to the polygon {vi}n

i=1. Defineψ(p)∈ S′ to be the unique Riemannian center of mass of thepointset {v′i}n

i=1 with masses bi(p). Then it is true that φ = ψ

within the polygon.

To prove this property, for a point p ∈ S within the poly-gon consider its image p′ = φ(p) ∈ S′. Due to isometry in-variance of surface coordinates, we know that the coordi-nates bi(p′) of p′ with respect to the polygon {v′i}n

i=1 sat-

isfy bi(p′) = bi(p). By the center of mass property we havethat p′ is the Riemannian center of mass of the pointset{v′i}n

i=1 with masses bi(p′) = bi(p). As a result, we haveψ(p) = p′ = φ(p).

6. Computation and Complexity

In this section we provide more details about the compu-tation of surface coordinates on triangle meshes. The maincomponent in computing the coordinates is the inverse ex-ponential map exp−1

p (vi) which can be inferred given thegeodesic connecting the points p and vi. In the discrete set-ting this geodesic is a poly-line; the first straight segment(the one that contains p) of this poly-line is projected ontothe tangent plane at p to obtain a vector in the direction ofexp−1

p (vi). To obtain the actual value of the inverse expo-nential map, we rescale this vector to have length equal tothe geodesic distance between p and vi.

We compute the geodesics using the exact geodesic al-gorithm [MMP87, SSK∗05]. The projection onto the tan-gent plane is done using the normals at mesh vertices, es-timated as the averages of per-face normals with the weightsproposed by Max [Max99]. When projecting onto the tan-gent plane poses robustness issues (e.g. the coarse cheetahmesh in Figure 7) we employ the approach of Welch andWitkin [WW94] to “flatten” the one-ring neighborhood ofa vertex. Namely, consider the triangles in the one-ring to-gether with the segments (needed for the computation of theinverse exponential map) they contain; we uniformly scaleall the angles (including the angles between segments andtriangle edges) incident to the vertex to sum to 2π, so as totransform the one-ring neighborhood into a planar configu-ration; using the transformed segments we obtain the inverseexponential map vectors as described before.

Next we estimate the computational complexity of com-puting the coordinates with respect to surface polygons withn vertices. The underlying triangular surface mesh has Mvertices. We consider two approaches best suitable for twodifferent scenarios and show that after preprocessing, thecomplexity of surface coordinate computation is the sameas the complexity of planar barycentric coordinates.

The first scenario is when the surface polygon is fixed,and the coordinates of r different points are computed. Inthe preprocessing step, from each polygon vertex we com-pute geodesics to all the mesh vertices We have to solve ninstances of “single source, all destinations” problem, whichhas an average time complexity of O(nM1.5 logM) (worstcase is O(nM2 logM)) when solved using the exact geodesicalgorithm [MMP87, SSK∗05]. Now for each surface pointwe need to compute the planar barycentric coordinates withrespect to its gradient polygon. The complexity of this stepvaries depending on the kind of the planar coordinates used;if mean value coordinates are assumed, the complexity isO(n), and the overall complexity of the computation for r

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 6: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

Figure 3: Effect of surface shape on coordinates. Underlying surfaces are (from left to right) plane, sphere, hyperboloid, saddle,Matlab’s peaks.

surface points is O(nM1.5 logM + nr). Note that this com-plexity is linear with respect to the polygon size.

The second scenario is when a single surface point isfixed, and the coordinates with respect to s different n-gons are computed. In the preprocessing step, we computegeodesics from the given point to all the mesh vertices.We have to solve an instance of “single source, all desti-nations” problem, which has an average time complexity ofO(M1.5 logM) (worst case is O(M2 logM)). Now for eachsurface polygon we need to compute the planar barycentriccoordinates of the point with respect to the gradient poly-gon. If mean value coordinates are assumed, the complexityis O(n) per polygon, and the overall complexity of the com-putation is O(M1.5 logM+ sn). Note that in this scenario theapproximate inverse exponential map algorithm of [SGW06]can be used to reduce the complexity to O(M logM+ sn).

7. Results

In order to investigate the practical properties of surface co-ordinates, we ran a set of experiments using a variety of3D meshes and synthetic models. In these experiments, ourgoals are to understand how the coordinates behave on dif-ferent surfaces, to test their properties empirically, and tomake qualitative comparisons to planar barycentric coordi-nates. Due to their computational efficiency, we use meanvalue coordinates [Flo03,HF06] as the planar coordinates inour construction.

For the experiments, we compute surface coordinates withrespect to a polygon and visually evaluate the results. Forease of visualization, we select a single vertex of the poly-gon and then display the corresponding coordinate for allpoints in the interior of the polygon. This polygon vertex isdepicted as a dark red point; twenty equally spaced isocon-tours of the coordinate function are shown. The followingcolor coding is used to enhance the visual information con-tent: dark red represents large coordinate values, dark bluerepresents small values. The whole range of values taken bythe coordinate – both positive and negative – is included forisocontouring and color coding.

Figure 1 depicts the surface coordinates on a triangle. Thecoordinates display the behavior as expected from the planar

Figure 4: Coordinates shown on a variety of meshes.

case. The isolines within the triangle are approximately par-allel to the base and are uniformly spaced. Also, on the twoadjacent edges (to the vertex with respect to which coordi-nate function is displayed) we can see that the isolines aredistributed uniformly.

Figure 3 shows the effect of surface variation on the co-ordinates. In this experiment we controlled the polygon ver-tices to provide similar configurations on different types ofsurfaces. When compared, we can see that surface coordi-

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 7: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

Figure 5: Insensitivity of coordinates to isometric deforma-tions.

Figure 6: Effect of using different planar coordinates in sur-face coordinate construction: Mean Value (left) versus Max-imum Entropy [HS08] (right).

nates display consistent isoline patterns across different sur-faces, yet are also “shape-aware” and adapt to the surfacebehavior.

The combined effect of surface and polygon type isstudied in Figure 4. A variety of meshes with differenttypes of polygons are shown. We can see that the coordi-nates are defined and well-behaved across different polygontypes/locations on a variety of surface forms.

Figure 5 shows that the surface coordinates are insensitiveto isometric deformations of the underlying surface. Start-ing with a plane we deform (bend) it in a way that preservesgeodesic distances. The same polygon is drawn on these sur-faces. The resulting figure confirms the theoretical isometryinvariance property of the surface coordinates.

Figure 6 shows the surface coordinates’ dependence onthe choice of the planar barycentric coordinates used withinour construction. Non-trivial variation in the behavior resultsfrom this choice, which provides a better assortment of co-ordinates for different applications.

Compute time: Table 1 reports time in seconds to computethe surface coordinates for a variety of surface mesh sizeson a 3.06Ghz Intel T9900 processor. The main part of ourimplementation is done in MATLAB. To compute geodesicsand vertex normals we call C++ libraries. Despite the factthat the main part of the code is unoptimized, coordinatecomputations still take milliseconds after preprocessing.

|V| |F| Preprocess Per-point2K 4K 0.81 0.00184K 7K 1.25 0.00188K 16K 5.46 0.001917K 35K 7.12 0.002127K 56K 12.71 0.002453K 105K 28.04 0.0027

Table 1: Timing in seconds for coordinate computation withrespect to an octagon for different sizes of 3D surface mod-els. During the preprocessing the geodesic distances frompolygon vertices to all mesh vertices are computed togetherwith the data structure needed to determine the geodesicpaths. Given the preprocess data, the last column shows thetime needed to compute the surface coordinates for a singlepoint. This involves computing the gradient vectors (inverseexponential map) and finding the mean value coordinateswith respect to the gradient polygon.

8. Applications

Interpolation: A standard application of planar barycentriccoordinates is interpolation. Similarly, surface coordinatescan be used to interpolate values given on polygon verticesto the interior. Given function values fi, i = 1, ...,n on thevertices of the polygon {vi}n

i=1, the interpolant is definedby f (p) = ∑ fibi(p). Figure 7 shows the result of interpo-lating the height function (z-coordinate) from vertices intothe interior of polygon. Since surface coordinates do not sat-isfy the linear precision property, our interpolation schemedoes not reproduce the height function (or any other linearfunction of Cartesian coordinates). However, note that theobtained interpolant has isolines that approximately matchthose of height – an indication that the center of mass prop-erty provides an appropriate replacement for the linear pre-cision property in this context.

Due to edge linearity of surface coordinates, one can tilethe surface with polygons and obtain a continuous inter-polant on the entire surface. Higher order continuity can beachieved by adapting the techniques such as described byFarin [Far90].

Figure 7: Interpolating the height function (z-coordinate)using surface coordinates.

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 8: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

Figure 8: Decal mapping using surface coordinates andbackward mapping.

Figure 9: Decal mapping examples obtained using surfacecoordinates.

Decal mapping: Planar barycentric coordinates are knownto provide an especially elegant solution to the problemof image warping, cf. [HF06]. We show that this solu-tion can be extended to give local parameterizations thatare useful for surface texturing by placing images – decals[Ped95, SGW06] – on surfaces. While the following proce-dure can be used for other types of polygons as well, forsimplicity we will illustrate the approach for quadrilaterals.

Given a user selected quadrilateral v1v2v3v4 on the sur-face, for a point p within this quadrilateral we obtain itstexture coordinates (U,V ) by the following procedure (Fig-ure 8). First, compute the surface coordinates bi = bi(p), i =1,2,3,4 of p with respect to the surface quadrilateral. Next,consider the unit square in the UV plane, and set the pointq equal to the linear combination of the square vertices withweights bi:

q =

[UV

]= b1

[00

]+b2

[10

]+b3

[11

]+b4

[01

].

The UV -coordinates of point q give the sought texture coor-dinates for point p on the surface.

Figure 9 shows examples of decal mapping using this ap-proach. Observe that we have a complete control over theboundary of the decal due to the edge linearity property ofsurface coordinates. Thus, when two decals are adjacent, thetexture coordinates on the common boundary will coincide.In comparison, the exponential map decals of Schmidt etal. [SGW06] provide only control over the central portionof a decal, and not its boundary.

Figure 10: Colored spheres show the new correspondencesfound using surface coordinates. Labeled dark blue spheresdepict the input coarse correspondence.

Correspondence refinement: We exploit the isometry re-construction property of the surface coordinates in order toprovide an approach to correspondence refinement. Given acoarse correspondence between two surfaces we would liketo obtain a larger set of corresponding points. Let us denotethe involved surfaces by S and S′; our input consists of corre-sponding point pairs (vi,ui) ∈ S×S′, i = 1, ...,n. For a givenpoint p∈ S we would like to construct a corresponding pointp′ ∈ S′.

Let us assume that the points (or a subset of them) vi, i =1, ...,n give an injective surface polygon that contains thepoint p. We use the map introduced during the discussionabout the isometry reconstruction property to find the cor-responding point p′ ∈ S′. Namely, we compute the surfacecoordinates bi = bi(p) of point p with respect to the polygon{vi}n

i=1. The corresponding point p′ is found as the meshvertex in S′ lying within the polygon {ui}n

i=1 that minimizesthe potential U(x) = ∑bid2(x,ui).

Figure 10 shows an experiment of correspondence refine-ment using this approach. In each row of the figure we showthe initial coarse corresponding points as dark blue sphereswith labels. The new correspondences found using our ap-proach are shown as colored spheres. We can see that theapproach works for polygons of different types: in this fig-ure the surface coordinates are computed with respect to atriangle (cat) and quadrilateral (human and gorilla). We canalso see that this approach is robust enough to give meaning-ful correspondences between objects from different classes,as evidenced by the second row of the figure.

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 9: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

9. Conclusion and Future Work

This work presents a novel definition and construction ofbarycentric coordinates on surfaces based on a reformula-tion of the linear precision property in terms of the Rieman-nian center of mass. The resulting coordinates properly gen-eralize existing planar coordinates and carry some of theiruseful properties such as unique reconstruction of a pointfrom its coordinates, uniqueness for triangles, edge linearity,and similarity invariance. In addition, these coordinates areinsensitive to isometric deformations, can be used to recon-struct isometries, are easy to implement, and fast to compute.

This work provides a small, first step and therefore haslimitations that suggest topics for future work. A first topicsuitable for further investigation is to characterize the the-oretical and empirical properties of surface coordinates fordifferent design choices. For example, our definition andconstruction of surface coordinates has an added degree offreedom provided by the choice of the distance d(·, ·) ap-pearing in the potential U(·). This allows constructing newsurface coordinates by varying the choice of the distance.In our initial implementation, we chose to use geodesic dis-tances because the resulting coordinates provide a propergeneralization of planar barycentric coordinates with prov-able properties. A drawback of geodesic distances is thatwe had to require polygons to be injective. Although thisdoes not prevent producing useful results and applications,an interesting direction for future research would be tochoose/design a distance that provides less restrictive ana-logues of Karcher’s theorem, and thus, obtain surface coor-dinates for a larger variety of polygons.

Another interesting avenue for future work would be toinvestigate applications of surface coordinates in computergraphics and geometric modeling. We describe applicationsto interpolation, decal mapping, and surface correspondence,but we imagine that several other applications of surface co-ordinates will be possible.

Acknowledgments

We thank the reviewers for the constructive comments andsuggestions that helped to streamline and clarify the expo-sition of the paper significantly. We are grateful to the se-nior reviewer for their extraordinary effort in improving thefinal version. We thank Szymon Rusinkiewicz for the veryuseful Trimesh2 library. We are thankful to Danil Kirsanovfor making publicly available the MATLAB/C++ librariesfor the exact geodesic algorithm. For the 3D models wethank Daniela Giorgi, AIM@SHAPE, and Project TOSCA[BBK08].

References[ANS96] ALFELD P., NEAMTU M., SCHUMAKER L. L.:

Bernstein-Bézier polynomials on spheres and sphere-like sur-faces. Computer Aided Geometric Design 13, 4 (1996), 333 –349. 1, 2

[BBK08] BRONSTEIN A., BRONSTEIN M., KIMMEL R.: Nu-merical Geometry of Non-Rigid Shapes. Springer, 2008. 9

[Ber03] BERGER M.: A panoramic view of Riemannian geometry.Springer-Verlag, Berlin, 2003. 4

[BF01] BUSS S. R., FILLMORE J. P.: Spherical averages andapplications to spherical splines and interpolation. ACM Trans-actions on Graphics 20, 2 (2001), 95–126. 2

[Car29] CARTAN É.: Groupes simples clos et ouverts etgéométrie riemannienne. J. Math. Pures Appl. 8 (1929), 1–33.2

[CON99] CABRAL B., OLANO M., NEMEC P.: Reflection spaceimage based rendering. In SIGGRAPH (1999), pp. 165–170. 1,2

[EKS07] ETYNGIER P., KERIVEN R., SÉGONNE F.: Projectiononto a shape manifold for image segmentation with prior. In ICIP(4) (2007), pp. 361–364. 2

[Far90] FARIN G.: Surfaces over dirichlet tessellations. Comput.Aided Geom. Des. 7, 1-4 (1990), 281–292. 7

[FHK06] FLOATER M., HORMANN K., KÓS G.: A generalconstruction of barycentric coordinates over convex polygons.Advances in Computational Mathematics 24, 1 (January 2006),311–331. 2

[Flo03] FLOATER M. S.: Mean value coordinates. ComputerAided Geometric Design 20, 1 (2003), 19–27. 1, 2, 5, 6

[Har03] HARMER M.: Barycentric Coordinates on the Hyper-bolic Plane. Tech. Rep. 498 (2003), Department of Mathematics,The University of Auckland, 2003. 1, 2

[HF06] HORMANN K., FLOATER M. S.: Mean value coordinatesfor arbitrary planar polygons. ACM Transactions on Graphics 25,4 (2006), 1424–1441. 1, 2, 6, 8

[HS08] HORMANN K., SUKUMAR N.: Maximum entropy coor-dinates for arbitrary polytopes. Computer Graphics Forum (Proc.SGP) 27, 5 (July 2008), 1513–1520. 2, 7

[JMD∗07] JOSHI P., MEYER M., DEROSE T., GREEN B.,SANOCKI T.: Harmonic coordinates for character articulation.ACM Transactions on Graphics (Proc. SIGGRAPH) 26, 3 (2007).2

[JSWD05] JU T., SCHAEFER S., WARREN J., DESBRUN M.: Ageometric construction of coordinates for convex polyhedra us-ing polar duals. In SGP (2005), p. 181. 1, 2

[Kar77] KARCHER H.: Riemannian center of mass and mollifiersmoothing. Communications on Pure and Applied Mathematics30, 5 (1977), 509–541. 2, 3, 4

[Ken90] KENDALL W. S.: Probability, convexity, and harmonicmaps with small image I: uniqueness and fine existence. Proc.London Math. soc. 61, 2 (1990), 371–406. 2, 3, 5

[LBS06] LANGER T., BELYAEV A., SEIDEL H.-P.: Sphericalbarycentric coordinates. In SGP (2006), pp. 81–88. 1, 2, 4

[LKCOL07] LIPMAN Y., KOPF J., COHEN-OR D., LEVIN D.:GPU-assisted positive mean value coordinates for mesh defor-mations. In SGP (2007), pp. 117–123. 2

[Max99] MAX N.: Weights for computing vertex normals fromfacet normals. J. Graph. Tools 4, 2 (1999), 1–6. 5

[MMP87] MITCHELL J. S. B., MOUNT D. M., PAPADIMITRIOUC. H.: The discrete geodesic problem. SIAM J. Comput. 16, 4(1987), 647–668. 5

[Ped95] PEDERSEN H. K.: Decorating implicit surfaces. In SIG-GRAPH (1995), pp. 291–300. 8

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.

Page 10: Barycentric Coordinates on Surfaces - Inventiveswan2/Reference/DifferentialG...Langer et al. [LBS06]. In all of these spherical constructions the original linear precision property

Raif M. Rustamov / Barycentric Coordinates on Surfaces

[Pen06] PENNEC X.: Intrinsic statistics on riemannian manifolds:Basic tools for geometric measurements. Journal of Mathemati-cal Imaging and Vision 25, 1 (2006), 127–154. 3

[SGW06] SCHMIDT R., GRIMM C., WYVILL B.: Interactive de-cal compositing with discrete exponential maps. ACM Transac-tions on Graphics (Proc. SIGGRAPH) 25, 3 (2006). 6, 8

[SM09] SUBBARAO R., MEER P.: Nonlinear mean shift over rie-mannian manifolds. International Journal of Computer Vision84, 1 (2009), 1–20. 2

[Sol06] SOLEM J. E.: Geodesic curves for analysis of continuousimplicit shapes. In ICPR (1) (2006). 2

[SSK∗05] SURAZHSKY V., SURAZHSKY T., KIRSANOV D.,GORTLER S. J., HOPPE H.: Fast exact and approximategeodesics on meshes. ACM Transactions on Graphics (Proc.SIGGRAPH) 24, 3 (2005), 553–560. 5

[TSK09] THORSTENSEN N., SÉGONNE F., KERIVEN R.: Pre-image as karcher mean using diffusion maps: Application toshape and image denoising. In SSVM (2009), pp. 721–732. 2

[Wac75] WACHSPRESS E. L.: A Rational Finite Element Basis,vol. 114 of Mathematics in Science and Engineering. AcademicPress, 1975. 1, 2

[WW94] WELCH W., WITKIN A. P.: Free-form shape designusing triangulated surfaces. In SIGGRAPH (1994), pp. 247–256.5

c© 2010 The Author(s)Journal compilation c© 2010 The Eurographics Association and Blackwell Publishing Ltd.