0% found this document useful (0 votes)
74 views12 pages

Biharmonic Coordinates: Figure 1: Source Shape Deformed Using Various Algorithms by Moving Three Control Points

The document introduces biharmonic barycentric coordinates, which are a generalization of harmonic coordinates. Biharmonic coordinates are constructed by solving the biharmonic Dirichlet problem, allowing them to interpolate both boundary values and derivative data. This gives them advantages over existing methods for applications like shape and image deformation. The coordinates can be computed efficiently and provide a smooth interpolation.

Uploaded by

Roi Poranne
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views12 pages

Biharmonic Coordinates: Figure 1: Source Shape Deformed Using Various Algorithms by Moving Three Control Points

The document introduces biharmonic barycentric coordinates, which are a generalization of harmonic coordinates. Biharmonic coordinates are constructed by solving the biharmonic Dirichlet problem, allowing them to interpolate both boundary values and derivative data. This gives them advantages over existing methods for applications like shape and image deformation. The coordinates can be computed efficiently and provide a smooth interpolation.

Uploaded by

Roi Poranne
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Biharmonic Coordinates

Ofir Weber1
1

Roi Poranne2

Craig Gotsman2

Courant Institute of Mathematical Sciences, New York University, USA 2 Computer Science Department, Technion, Haifa, Israel

Source

Biharmonic

VHM

MLS

ARAP

Figure 1: Source shape deformed using various algorithms by moving three control points. Abstract Barycentric coordinates are an established mathematical tool in computer graphics and geometry processing, providing a convenient way of interpolating scalar or vector data from the boundary of a planar domain to its interior. Many different recipes for barycentric coordinates exist, some offering the convenience of a closedform expression, some providing other desirable properties at the expense of longer computation times. For example, harmonic coordinates, which are solutions to the Laplace equation, provide a long list of desirable properties (making them suitable for a wide range of applications), but lack a closed-form expression. We derive a new type of barycentric coordinates based on solutions to the biharmonic equation. These coordinates can be considered a natural generalization of harmonic coordinates, with the additional ability to interpolate boundary derivative data. We provide an efficient and accurate way to numerically compute the biharmonic coordinates and demonstrate their advantages over existing schemes. We show that biharmonic coordinates are especially appealing for (but not limited to) 2D shape and image deformation and have clear advantages over existing deformation methods. Categories and Subject Descriptors (according to ACM CCS): I.3.5 [Computer Graphics]: Computational Geometry and Object Modeling (C.2.1, C.2.4, C.3) I.3.7 Animation Interpolating or approximating a set of values given at the vertices , is achieved by linearly blending the coordinate functions with the given data at the polygon vertices as coefficients: () = ()
=1

1. Introduction Barycentric coordinates have been used extensively in the last decade for a wide variety of graphics applications. The most common applications are: mesh parameterization, rendering, shape deformation and color-and-data interpolation. Originally defined for triangles, barycentric coordinates have evolved and been generalized in many ways to perform different tasks. In the most basic setup, we are given a planar region 2 bounded by a polygon (sometimes called a cage), with vertices = , and edges = , +1 , = 1, , . We use a prime superscript to distinguish between an internal point and a boundary point . A set of functions () are called barycentric coordinates, if for any point they satisfy the following two properties: identity reproduction:
=1

(3)

partition of unity:
=1

() = () = 1

(1)

(2)

(1) and (2) are sometimes referred to as linear precision and constant precision respectfully. Combined together they imply that the interpolant () reproduces affine functions from their boundary values. Beside (1) and (2), the coordinates are often required to satisfy some additional desirable properties such as smoothness, positivity, Lagrange (the ability to exactly interpolate the user data), etc. Thus, the choice of the most suitable set of coordinates is application-dependent. Over the years, the basic concept of barycentric coordinates has been extended in many different ways. Some extensions allow the coordinate functions to be complex-valued functions [WBCG09], while others allow the polygon to be an arbitrary smooth curve [Bel06] or even a 3D surface [FKR05, LLCO08]. The barycentric coordinates that we will describe here belong to a family of coordinates that supports higher order interpolation. i.e., not only do they possess the ability to exactly interpolate boundary data, but they also interpolate derivative information given along the boundary.

For this to be realized, (3) must be modified to take the following form: namely, the single set of functions () is replaced with two distinct sets of functions () and (). are the prescribed values at the polygon vertices as before, and are the prescribed normal derivatives along the edges of the polygon. More precisely, = / = where is the unit normal to the boundary. The function is assumed to vary linearly on the edges and the normal derivative to be constant on each edge. Property (1) is reformulated as: where is the unit normal to the th edge, and property (2) reformulated as: () = 1
=1

() = () + ()
=1

2.

Previous Work

(4)

() + () =
=1

(5)

(6)

The second term in (5) is the natural extension to (1) since the normal derivatives of the identity map are exactly the unit normals. Note that the do not appear in (6) since the derivatives of a constant function are zero. It is important to emphasize that on their own are not barycentric coordinates, as they do not satisfy (1). Finally, for () to actually interpolate the boundary values and derivatives, the Lagrange property must be replaced by the analogous Hermite property: ( ) = ( ) = 0, (7) ( ) = 0, ( ) = , In this paper, we show how to construct a set of barycentric coordinates that satisfy (5)-(7). Additionally, they respect the shape of the object, decaying proportionally to the inner distance in a smooth manner. Such coordinates can be constructed by solving the biharmonic Dirichlet problem: 2 () = 0,
)

where is the Laplace operator and 1 , 2 are the prescribed boundary conditions. The biharmonic Dirichlet problem admits a unique solution under very mild conditions. This solution minimizes the so-called Hessian energy and has a harmonic Laplacian at all points of . As a consequence, these coordinates are smooth away from the boundary. Since any harmonic function is also biharmonic, biharmonic functions are a natural extension to harmonic functions. Yet this extra power (compared to harmonic) can be a mixed blessing if care is not taken, as biharmonic functions do not (in general) satisfy the maximum principle and as a fourth order PDE, (8) is more prone to oscillations. Nevertheless, by incorporating a semi-automatic control mechanism over the boundary behavior we can design simple and intuitive tools to obtain results dramatically better than the relevant alternatives.

( = 1 ( ) = 2 ( ),

( ),

(8)

2.1 Barycentric Coordinates There are many different constructions of barycentric coordinates for planar polygons. Wachspress [Wac75] was the first to define barycentric coordinates for convex polygons and apply them to finite elements analysis. Pinkall and Polthier [PP93] derived the so-called discrete harmonic coordinates (also called cotangent weights) based on a finite-element discretization of the Dirichlet energy. For non-convex polygons, these classic constructions result in discontinuous coordinates which makes them unusable. Mean-value coordinates [Flo03] were proposed as an alternative to discrete harmonic since they are guaranteed to be positive in the kernel of a star-shaped polygon. They were further generalized [HF06] for arbitrary non-convex polygons, although the positivity property is not maintained. Figure 2 demonstrates the undesirable effect of negative coordinate values when mean-value coordinates are used to perform planar image deformation. In fact (contrary to what their name seems to imply), mean-value coordinates do not satisfy the classical mean-value property. While all the coordinates mentioned above possess simple closed-form expressions, the need for barycentric coordinates with more tailored properties triggered further research. Lipman et al. [LKCOL07] modified the construction of mean-value coordinates to force them to be positive for non-convex polygons at the price of longer numerical evaluation. However, these coordinates are not smooth. Joshi et al. [JMD*07] proposed harmonic coordinates, defined as solutions of the Laplace equation over the domain. Being harmonic functions, the coordinates obey the minimum/maximum principle and since the boundary values are forced to be in the range [0,1], the coordinates are guaranteed to be positive even in highly concave regions, without sacrificing smoothness (they are inside the domain). On the down side, harmonic coordinates do not possess an analytic formula even for fairly simple polygons. [JMD*07] suggested using a multigrid solver to accelerate their computation. [Rus08, BCWG09] used the boundary elements method (BEM) [BD89] to construct harmonic coordinates in 3D. Recently, Weber and Gotsman [WG10] showed how to accurately and efficiently compute 2D harmonic coordinates based on a second-order discontinuous discretization of the celebrated Cauchy integral formula from complex analysis. Hormann and Sukumar [HF08] proposed the maximum entropy coordinates (MEC) as a possible alternative to harmonic coordinates. MEC are also smooth, positive and interpolating and can be computed by solving a convex optimization problem. The important question of the existence of barycentric coordinates (for non-convex polygons), which are positive, interpolating, smooth and have a closed form, remains open. Lipman et al. [LLCO08] proposed Green Coordinates an extension to barycentric coordinates especially suitable for shape deformation. The deformation is represented as a linear combination of two sets of barycentric coordinates: one for the polygons vertices and the other for its normals. This construction is quite similar in spirit to ours, as we will see in Section 4. In fact, (4) has exactly the same form as that used in [LLCO08], although the Green coordinates do not satisfy (7).

Weber et al. [WBCG09] introduced the concept of complex barycentric coordinates by allowing the barycentric coordinates to be complex-valued functions. They proposed several recipes for such complex coordinates, the most fundamental one being the Cauchy coordinates (which is shown to be equivalent to Lipman et al.s Green coordinates in 2D). In [WBCG09], the coordinate functions are designed to be holomorphic; thus, their linear combinations (with complex coefficients) are also holomorphic, implying that the 2D mappings they produce have the potential of being conformal maps. Even though it is meaningless to talk about positivity of complex numbers, it is quite remarkable that Cauchy coordinates (which possess a closed-form expression) are well behaved even in highly concave regions. Unfortunately, their simple and efficient computation comes at the price of being able to only approximate the boundary values. In follow-up work, Weber and Gotsman [WG10] demonstrated that Cauchy/Green coordinates do not always produce conformal maps, since a complex holomorphic function will be conformal only if its first complex derivative does not vanish. They proposed Hilbert coordinates and showed how to use them in order to construct maps from the complex plane to itself which are guaranteed to be conformal. Their deformation algorithm allows the user to prescribe rotations along the boundary and exactly interpolate them, but no direct control over position is given. Recently, it was shown in [WBCG*11] that complex barycentric coordinates may be used also to generate useful non-holomorphic complex maps in the plane. A general construction for complex barycentric coordinates was given, along with a closed-form recipe for (non-holomorphic) complex coordinates which interpolate the boundary values (MAGIC coordinates). 2.2 Hermite Interpolation Biharmonic coordinates are not the first to address the problem of interpolating derivative boundary values (the so-called Hermite setting). Dyken and Floater [DF09] extended mean-value coordinates to the Hermite setting. However, those coordinates suffer from the same artifacts that regular mean-value coordinates do, namely, they perform poorly on non-convex shapes (see Figure 2). Furthermore, as opposed to regular mean-value, they do not possess a closed-form expression and numerical integration is required. Manson and Schaefer [MS10] showed how to construct a family of barycentric coordinates based on moving least squares (MLS) fitting of polynomials (of arbitrary degree) and extended them to also support derivative interpolation. Unfortunately, like mean-value, they do not handle concave regions properly and suffer from the same leakage artifact across boundary edges. Both [DF09] and [MS10] do not provide a proof that their constructions actually satisfy the derivative constraints (although numerical experiments seem to imply that this is indeed the case). A related concept, but one that does not entirely conform to the Hermite setting, was described by Langer and Seidel [LS08]. They gave a general recipe to convert any existing barycentric coordinates to higher-order ones. This provides the ability to interpolate boundary values as well as derivatives, but only at the vertices of the cage. Control over the rest of the boundary (i.e. edges in 2D and faces in 3D) is impossible.

2.3 Variational Methods Barycentric coordinates lie at the heart of many deformation methods due to their smoothness, simplicity and the ability to compute them at a preprocessing step. They can be used, directly [JMD*07, WBCG09, LLCO08] or indirectly, to create a meaningful low-dimensional subspace of deformations from which an optimal deformation may be selected by solving a variational (i.e. optimization) problem [BCWG09, MKB*08, WG10]. Most modern deformation techniques are based on the variational approach, in which an energy functional is minimized subject to a set of user-defined constraints. Popular choices for energies are the Dirichlet (harmonic) energy [ZRK*05, JMD*07], which minimizes the magnitude of the Jacobian of the deformation map, the conformal energy (As-Similar-As-Possible - ASAP), which penalizes the deviation of the Jacobian matrix from being a similarity transformation (composition of rotation with a uniform scale) [IMH05, WBCG09], and As-Rigid-As-Possible (ARAP), which minimizes the distance of the Jacobian from the closest rotation [IMH05, BCWG09].
Source

Cauchy

Mean-value

Harmonic

Hermite Mean-value

Biharmonic

Figure 2: Deformation of the "Pants" shape (top-left). Cauchy coordinates produce angle-preserving deformation but miss the boundary. Negative values of the mean-value coordinates cause a repelling artifact between the legs. Harmonic coordinates overcome this problem, but result in shear on the boundary. Hermite mean-value provides the ability to specify boundary derivatives but result in severe artifacts due to the concavity of the shape. Biharmonic coordinates generate a good compromise with full control over boundary behavior. The VHM method [BCWG09] is a variant of the ARAP method, and closely related to our deformation algorithm. VHM operates in the subspace of harmonic maps, parameterized by two functions defined on the boundary of the domain. In addition, the Jacobian of the deformation at a small set of points (so-called anchors) located along the skeleton of the shape is required to be close to rotations. Finally, a regularization term is added to compensate for the fact that rigidity is forced only at small portion of the

shape (the anchors). As we will see, our deformation algorithm has two clear advantages over VHM. First, it does not require knowledge of the skeleton of the shape. Second, it does not rely on a user knob to control the balance between smoothness and rigidity. Botsch and Kobbelt [BK04] presented an interactive shape deformation framework which in contrast to our space deformation method operates on manifolds. The user assigns manipulators to different parts of the shape and applies affine transformations to them. The transformations are propagated to the rest of the shape by recursively solving the Laplace equation. Higher order Laplacians allow smoother transition between constrained and unconstrained regions and in particular, a second order Laplacian results in a 1 continuous biharmonic function. Andrews et al. [AJC11] also solved high order harmonic systems in their surface modeling technique. This allowed them to explicitly control Dirichlet and Neumann boundary conditions simultaneously. Recently, Jacobson et al. [JBPS11] presented a method for computing weight functions (not quite barycentric coordinates), specifically designed for shape deformation. Their main observation is that in order to achieve appealing results, the weights should be positive and at least 1 at the control handles. The weights are computed by solving a (convex) constrained optimization problem using the finite element method (essentially decomposing the region of interest in space into tetrahedral elements). The energy is the Hessian energy with natural boundary conditions (i.e. normal derivative is zero) whose minimizer without positivity constraints is a biharmonic function. Figure 3 compares between these Bounded Biharmonic Weights (BBW) and our () coordinate. We observed that in the majority of cases, () tend to be positive even without explicitly constraining it. It is important to note that in general, BBW satisfy Eq. (2) but not (1). In order to achieve identity reproduction, the weights are linearly blended with transformations rather than with positions. However, without the complementary () coordinate, it is impossible to achieve explicit control over boundary derivatives. 3. Contributions We formulate three different deformation methods, all based on our new biharmonic coordinates. Each method has a different user interface and provides different advantages. The most sophisticated one (Section 5.4) is a competitive alternative to ARAP, which allows the Jacobian near the boundary to be an orthogonal matrix (as opposed to orthonormal), eliminating shearing artifacts while preserving the thickness of the object (see Figure 1 for a sneak peek). The main contributions of this paper are: 1) Proposal of biharmonic coordinates as a general mathematical tool for data interpolation. 2) Description of an efficient and accurate algorithm for the computation of biharmonic coordinates (closedform expressions for the BEM basis functions used in the computation are also provided). 3) Introduction of a deformation algorithm based on the novel concept of shape thickness. 4. Biharmonic Functions In this section, we derive the biharmonic coordinates as solutions to the biharmonic Dirichlet problem and describe a numerical procedure to compute these coordinates based

on the direct Boundary Elements Method (BEM) approach [BD89]. 4.1 The Boundary Integrals Fuglede [Fug81] provide a boundary integral equation for the biharmonic Dirichlet problem. For completeness, we provide here a slightly different, more detailed derivation for the same equation, as we have found it to be more revealing. Our starting point is Greens second identity: = (9)

where and are any twice-differentiable functions in 2 , is the Laplace operator, the integral on the left is over the area of and the integral on the right is over the boundary . Now denote by and the fundamental solutions of the 2D harmonic and biharmonic equation respectively: 1 (, ) = ln 2 2 (ln 1) (, ) = 8 and by a biharmonic function. Plugging = and = into (9) leads to:

In contrast to [Fug81], we use a slightly different function for that has the property = . Since 2 = 0, we have: Returning to (9), but this time plugging in = and = and rearranging the terms results in: which is Greens third identity. Finally, combining (11) and (12) leads to the boundary integral identity for the biharmonic function f: ( ) () = ( ) (13) ( ) + ( )

(10)

= +

(11)

(12)

Eq. (13) implies that we can evaluate a biharmonic function at any point if we know the values of , /, , / on the boundary. Moreover, given any such values on the entire boundary, the integral in (13) will produce a biharmonic function in . However, this function will not have the specified boundary values, unless they were taken from a biharmonic function in the first place. In particular, since is a harmonic function, it is uniquely defined by / along the boundary. Substituting instead of in (12) leads to the following extra condition that must satisfy: () = ( )

( )

(14)

4.2 Boundary Discretization The main idea of BEM is to represent the function we are solving for as a boundary integral, then discretize this boundary (as opposed to Finite Element Methods which discretize the entire domain) and derive the solution by solving a linear system of equations. Although the obtained solution only approximates the true solution (with high fidelity), it is a biharmonic function expressed in a closed form. Since our domain is polygonal, we can convert the boundary integrals (13) and (14) to a sum over the m polygon edges , = 1, , : () =
=1 =1 =1 =1

Evaluating (16) at the vertices results in linear equations:


= ( ) + ( ) , =1

, are singular on the boundary, their limits when approaches exist.

We are interested in a particular biharmonic function that has continuous piecewise-linear values on the polygon edges and piecewise-constant normal derivatives. Unfortunately, the Laplacian and its normal derivative / can be quite complicated functions. Nevertheless, in order to solve the boundary integral equation, we will assume that can be faithfully approximated by a piecewiselinear function and / by a piecewise-constant function on . Note that in the special case that is an affine function, these assumptions are accurate and will be reproduced exactly, and since affine precision implies linear and constant precision, the advantage of using this particular construction is now clear. Namely, that equations (5) and (6) are satisfied exactly. Since / and are constant on each edge, they may be factored out of the integral sign. Expressing and on each edge as a linear function of the values , +1 and , +1 at the endpoints, and evaluating the integrals, leads to:
() = () + () + () + () =1 =1

() =
=1 =1

= ( )1 ( ) Following the same path, we evaluate (15) at the vertices, obtaining the following system of equations: = + + + = ( ) = = ( + )1 (18)

which has the matrix form: = + , where and are 1 column vectors and and are matrices. Rearranging the equation and inverting leads to the following linear relation = , where Plugging in the expression for , combining similar terms and inverting another matrix, we can express as = + , where

= 1

(17)

Denoting by (), (), (), () the 1 row vectors obtained by evaluating the appropriate basis functions at a given fixed , we obtain the matrix form of Eq. (13):

where

(15)

where = , = and = ( ), = ( )/ for . , , , are the basis functions obtained from computing the integrals. Fortunately, these integrals may be solved analytically, and the exact expressions are given in Appendix A. To the best of our knowledge, the solution of the above integrals has not appeared in the literature before. 4.3 Biharmonic Coordinates We now have all the necessary building blocks for setting up the linear system. Eqs. (15) and (16) are valid for any point , and although the basis functions , ,

() = () + ()

(16)

() = () + () (19) () = () + () () = () + () and conclude that the vectors () and () are the biharmonic coordinates of . A color visualization of the coordinate functions for a sample vertex and edge of a simple polygon is given in Figure 3. To summarize: the algorithm for computing the biharmonic coordinates boils down to evaluating the four matrices , , , based on the expressions given in Appendix A and using them to compute the three matrices , , . The latter involves two matrix inversions and several matrix multiplications and additions. Once this is done (typically in a preprocessing stage), Eq. (19) is used to compute the biharmonic coordinates at as many points as needed. Finally, we mention that it is possible to improve the accuracy of the results by subsampling the polygon along the edges in two ways. First, (15) and (16) can be evaluated at the subsamples, resulting in additional equations for the systems (17) and (18). Since this system will be overconstrained, the matrix inversion used for computing and is replaced by a pseudo-inverse. This typically leads to smoother results near the boundary. The second way to improve accuracy is by adding virtual vertices at the subsamples, which will result in a larger, but still square

Finally, we are able to express the biharmonic function () using the following linear combination: () = () + ()

() = () + () + () + () Plugging in the expressions derived above for and : () = () + () + ( () + ())( + )

system. The prescribed boundary values of the new vertices are simply linearly interpolated from those of the original vertices, making the refinement process transparent to the user.
Mean-value

Bounded Biharmonic

Harmonic

Biharmonic

Biharmonic

Hermite Mean-value

Hermite Mean-value

Figure 4: A square (top-left) is mapped to itself in various ways using biharmonic coordinates, varying only the normal derivatives. Forcing the derivative to be too large (bottom-right) leads to self-overlap. the map, which depends linearly on the derivatives of the coordinates, characterizes the local behavior of the deformation. In contrast to traditional barycentric coordinates, which allow only the prescription of boundary values, biharmonic coordinates provide the freedom to prescribe both boundary values and normal derivatives. Specifically, biharmonic coordinates allow to prescribe the complete 2 2 (piecewise constant) Jacobian matrix on the boundary. To see this, denote the th 2 1 edge vector as = +1 and the edge unit normal as = . The action of the Jacobian matrix of on an edge vector is given by = +1 . Similarly, the action of on the normal is = . Hence, since and are fixed, specifying and uniquely determine .

5. Shape Deformation Although biharmonic coordinates are general enough to be applied to any kind of scalar or vector data interpolation, from now on we focus exclusively on the application of planar shape deformation. A simple setup of a deformation algorithm based on barycentric coordinates is obtained by treating the boundary values as vectors in 2 , allowing the user to interact with the system by dragging the vertices of the cage to some new positions . In response, Eq. (3) or (4) is invoked, mapping each point to a new position (). The mathematical properties of the map : 2 2 and the quality of the deformation are then derived from the properties of the coordinates. In particular, the Jacobian of

Figure 3: Visualization of various coordinate schemes for the vertex / edge marked in green. Top-down meanvalue contains undesirable negative values. Bounded biharmonic weight [JBPS11] are forced to be positive. Harmonic coordinates are positive as well due to the min / max principle. Our biharmonic is positive for that particular vertex, which explains its similarity to [JBPS11]. Note the unintuitive local maximum on the left hand side of Hermite mean-value . Hermite mean-value becomes negative.

Figure 4 shows a variety of maps from the square to itself, obtained by keeping the boundary fixed while manually changing the normal derivative vector direction and magnitude. While this example demonstrates the flexibility and expressiveness of biharmonic coordinates, in some scenarios a user may want to prescribe only boundary positions, and avoid dealing with boundary derivatives all together. Moreover, as evident in Figure 4 bottom right, a careless specification of boundary derivatives may lead to unnatural results. To alleviate this, we now provide several methods for automatically deducing boundary derivatives from boundary positions alone. Which method to choose depends on the effect that the user wants to achieve, thus application-dependent. 5.1 Orthogonal Boundary Jacobians A natural choice in many scenarios is to set the normal derivative vector to be perpendicular to the target edge. The corresponding Jacobians on the boundary are orthogonal but not necessarily orthonormal. Denote the unit normal to the th edge of the target cage as = +1 +1 and consider the case where = for some real scalar . The question that remains is then, what value should we assign to ? As a

first obvious choice we set = 1 so that has unit length. This means that the deformation will not contain stretch in the normal direction. Figure 5 compares between bending a bar using harmonic coordinates and using biharmonic coordinates with orthogonal boundary Jacobians with fixed = 1.

grange property, our coordinates are the first complex barycentric coordinates that have the Hermite property. Figure 6 demonstrates this effect and compares our result to Cauchy coordinates which preserve angles everywhere but only approximate the cage target position. 5.3 As-Harmonic-As-Possible Deformation In more complicated scenarios, when the source and target cages are significantly different, a more sophisticated way to choose is required. Since we consider harmonic coordinates to be the preferred choice for deformation among all real coordinate recipes, the closest to this is what we call the As-Harmonic-As-Possible (AHAP) map that still satisfies the user constraints.
Source Cauchy Complex Biharmonic

Harmonic

Biharmonic

Figure 5: Bending of a bar by specifying a circular boundary. On the left, harmonic coordinates results in shear. In addition, the center line (red) is unnaturally shifted away from the center of rotation. On the right, biharmonic coordinates with orthogonal boundary Jacobians (Section 5.1) maintains the center line exactly in the middle, keeping the anisotropic scale aligned to the boundary. 5.2 Complex Barycentric Coordinates An alternative choice is to restrict the Jacobians on the boundary to be similarity matrices. This can be achieved by setting = +1 / . The deformation will tend to preserve angles between any two intersecting curves in the vicinity of the boundary with the added value of interpolating the boundary (with possibly more shear in the interior). Recall an elementary fact from complex analysis; a 90 degree rotation can be expressed by multiplication with the complex number . Let us interpret the vectors and as complex numbers and impose = +1 . Rearranging the terms in Eq. (4), we can express the mapping formula in complex form: 1 () () () = () + 1 () = ()
=1

We define the harmonicity of a biharmonic function () as: where the integration is done solely on the boundary. Recall that () is harmonic, hence achieves minimum/maximum values on the boundary. Therefore minimizing ()2 on the boundary bounds its values in the interior. We also experimented with integrating over the entire domain and obtained similar results. In our discrete setting, (20) becomes 2 , where = + (Section 4.3) and = . Thus, given the vector of bounda ry values , the only unknowns are the scalars .

Figure 6: Deformation of the star: Cauchy coordinates produces a conformal map, but the boundary is not interpolated. Using complex biharmonic coordinates (Section 5.2) we are able to interpolate the boundary while maintaining conformality at the vicinity of the boundary.

() = ()2

(20)

Since negative values of lead to a non-bijective map, we restrict to be positive. Thus, minimizing boils down to a non-negative least squares problem with a nonempty feasible region, which implies the existence of a global minimum. Figure 8 shows a square deformed into a diamond shape using harmonic coordinates, biharmonic coordinates with orthogonal unit length normal derivatives (Section 5.1) and the AHAP biharmonic map. The latter manages to create a map that satisfies the orthogonality constraints on the boundary while avoiding selfintersections. Away from the boundary, the map resembles the harmonic deformation.

where () are complex barycentric coordinates [WBCG09]. Since the real part () is not harmonic, obviously these complex coordinates are not holomorphic. While Weber et al. [WBCG*11] showed how to construct non-holomorphic complex coordinates that have the La-

5.4 Thickness-Preserving Shape Deformation Cage-based deformation follows naturally from the use of barycentric coordinates, nonetheless, manipulating the entire cage to produce a deformation is tedious and can lead to suboptimal results. To simplify the users task, we follow [IMH05, SMW06, WBCG09, BCWG09] and use the point-to-point deformation metaphor. The user selects a small set of control points inside the cage (usually at joints and extremities of the shape), and controls the deformation by repositioning only these control points. The idea is to

Biharmonic VHM Source Biharmonic VHM Biharmonic VHM Figure 7: Comparison of the deformation of a giraffe using VHM and our thickness-preserving method for three different positions of the control points. Our method easily handles shortening or elongation of the giraffes neck and tail, while VHM results in artifacts at the head and tail in an effort to preserve length. Note that our method correctly deals with bending when desired. make the cage invisible to the user, although behind the scenes we solve an inverse problem. i.e., we search for a target cage that will transform the control points to their prescribed target locations. Since the number of control points is typically much lower than the number of cage vertices, the problem is under-constrained and requires a regularization term, similarly to other variational deformation methods. Let us define the local thickness ( ) of a map at a boundary point as: (
)

mize changes in . Note that since is constant on each edge, its derivative in the tangent direction vanishes. Hence we aim at minimizing changes only in the normal direction. Formally, we would like the vector to vanish. Since in general, it is impossible for this term to vanish in the presence of positional constraints (at the control points), we aim to minimize this term by defining the following energy functional: () =

( )( ) is the normal derivative vector, denoted by ( ), and is the target unit normal (at ( ) ). The local thickness ( ) measures the amount of stretch in the normal direction. In continuum mechanics terminology, this is simply the normal strain in the normal direction. In our discrete setting, ( ) is piecewise constant and assumed to be aligned with hence the local thickness on the th , edge is: (21) = = = = .

= (

)( )( )

2 ( ) 2
2

(22)

Harmonic

We call a map that has unit local thickness at any boundary point and orthogonal Jacobians, a thickness-preserving map. Note that the maps described in Section 5.1 are thickness-preserving by construction. However, in this Section, instead of fixing the boundary as is done in Section 5.1, we fix only a small number of internal points. We then search the subspace of biharmonic maps and pick a map which is thickness-preserving while satisfying the point-to-point position constraints. Consider a small offset of the boundary curve in the direction of the inward normal and the narrow band that surrounds the swept area. Intuitively, a thicknesspreserving map deforms this narrow band such that the image of the band maintains its width (but not necessarily its length). Such a map does not limit the change in the tangential component along the boundary and allows articulated objects to stretch their bones. Nevertheless, even though we disallow shear on the boundary (by setting to be equal to shear and stretch may still appear as we move ), away from the boundary toward the interior of the shape. To tackle this, we design an energy that strives to mini-

Biharmonic = 1

Biharmonic AHAP

Figure 8: The unit square is mapped to a diamond shape: Harmonic coordinates produce shears near the boundary. A biharmonic map with = 1 (Section 5.1) overlaps itself in the middle. A biharmonic As-Harmonic-As-Possible map (Section 5.3) is smooth, bijective, and perfectly aligned with the boundary.

In our discrete setting, the integral is replaced with a sum over uniformly spaced boundary samples and the optimization problem becomes: subject to: ( ) = , = 1, , = argmin ()

=1

Source

ARAP

ASAP

Biharmonic

where b is the number of control points. Note that in the general case, the map depends both on and , implying that the energy should be quadratic. However, we restricted the map to be thickness-preserving, meaning that = = +1 +1 , hence, the map and therefore the energy and the set of constraints, depend (non-linearly) only on . Experimental Evaluation We compare our thickness-preserving deformation method with the MLS [SMW06], ASAP and ARAP [IMH05], VHM [WBCG09] and BBW [JBPS11] methods. All share the same user interface. As a first sanity check, we place three control points on a horizontal bar; two at the far ends and one in the middle (illustrated in Figure 1). We then drag the middle control point upwards. Despite the simplicity of this setting, it is still quite challenging for existing deformation methods since the target positions of the control points imply that the bar should change its length. As a result, methods that are based on some notion of isometry (distance preserving) will try to resist this change and respond with artifacts. As evident in Figure 1, the ARAP method results in discontinuity artifacts at the control points, while VHM produces a foldover in the middle of the bar and creates unnatural bending near the end points. Our deformation is at the control points and is the only one that preserves the overall shape of the bar. In Figure 7, we compare our method with VHM when deforming a giraffe shape. Note the distortion created by VHM at the head and tail of the giraffe when control points are pulled apart or brought close together. Figure 9 compares our method with the ARAP and ASAP methods. Again, the control points are positioned in a configuration that suggests that the giraffes neck and legs should shorten. ASAP reacts by uniformly scaling down the head and legs dramatically, while ARAP, in an effort to preserve distances, bends the neck and legs. Our method simply shortens them to satisfy the positional constraint. However, this behavior can be altered easily. By adding a third control point in the middle of the neck and dragging it to the side, the shortening effect is replaced with bending (Figure 7 left). Figure 11 compares our method with the Bounded Biharmonic Weights (BBW) method of Jacobson et al. [JBPS11]. BBW requires the additional user input of affine transformation per control point. In an attempt to automate this, Jacobson et al. proposed a heuristic to estimate rotation matrices from the position of control points. While this automatic method does not produce satisfying results for this particular deformation, manually tweaking the rotations and scale values results in a pleasing deformation comparable to our automatic thickness-preserving algorithm.

Figure 9: Deformation of a giraffe by different algorithms using identical positional constraints. ARAP bends the neck and legs in order to accommodate the user constraints. ASAP reduces dramatically the overall size of head, tail and legs, creating unnatural effect. Thicknesspreserving biharmonic deformation simply shortens the neck and legs and extends the length of the tail as expected. 6. Implementation details

We have implemented our algorithms on an Intel i7 CPU with 8 GB of RAM. A typical number of cage edges for a fairly complicated model such as the Giraffe is 100. Each edge was subsampled (creating an extra 2-3 virtual vertices per edge) to achieve better accuracy. The computation of the biharmonic coordinates (Section 4.3) was done in C++. Evaluating the basis functions and solving the relevant linear systems took 1 to 20 seconds of preprocessing time, depending on the complexity of the cage and the image resolution. All the cage-based deformation algorithms (Section 5 excluding 5.4) run in real time and achieve frame rates of at least 100fps for all the examples shown in this paper. To solve the optimization problem of Section 5.3, we used the CVXGEN quadratic programing solver [MB10] which turned out to be very efficient for problems with up to 50 variables. The solution of the optimization problem for the thickness-preserving deformation (Section 5.4) was done in MATLAB using the non-linear constrained optimization solver (fmincon) from the Optimization Toolbox. We fed the solver with the analytic expression of the non-linear energy along with its gradient. Running times were somewhat slower, however we did manage to achieve interactive rates for inputs with up to 150 degrees of freedom. We believe that incorporating a dedicated solver into our C++ framework will improve performance by an order of magnitude. To evaluate the non-linear energy (Eq. 22), we need to compute the second normal derivatives of and which, in turn, contain the normal derivatives of the harmonic and biharmonic basis functions. These derivatives (along with all the other basis functions) are computed during the preprocessing step. Although we were able to obtain closedform expressions for the derivatives of the basis functions (using a symbolic solver), the expressions for the biharmonic functions turned out to be lengthy and we found that evaluating them numerically using a simple finite difference scheme leads to good results. In addition, we found that numerically evaluating the expression for the limits of the biharmonic basis functions on the boundary (which is needed for Eqs. (17) and (18)) is

simple to implement and leads to accurate results. We simply offset the entire cage inwards by a small amount (1 6 in all our examples) and evaluate the expressions on the offset.

Harmonic

that it is based solely on boundary formulation and does not require discretization of the interior e.g. by meshing (ARAP) or finding the skeleton of the shape (VHM). Our biharmonic coordinates were defined in 2D. Nevertheless, they can be derived in any dimension (although closed-form expressions might be more difficult to obtain). In the future, we would like to explore their behavior on volumetric models. We believe that a 3D extension of the thickness-preserving method may be promising.
Source BBW Auto BBW Manual Biharmonic

Two parts Harmonic

Two parts Biharmonic

Figure 10: A square (top-left) is deformed using harmonic coordinates (top-right). Note how the interior of the square spills outside the target cage. We then split the square into two triangles, mapping each part separately and gluing the results back together. Both harmonic (bottom-left) and biharmonic (bottom-right) coordinates result in a bijective map. However, harmonic is only C0 along the seam while biharmonic is C1. 7. Summary and Future Work We have developed biharmonic barycentric coordinates as a useful tool for interpolating data values as well as normal derivatives from the boundary of a polygonal shape to its interior. Using the Boundary Elements Method, the computation of the coordinates is efficient and accurate and does not require discretization of the entire domain. In the context of planar deformations, biharmonic coordinates enable full control over the boundary shape (as do harmonic coordinates) as well as boundary derivatives, thus can be regarded as a direct generalization to harmonic coordinates. Some of the maps within this richer subspace are superior to their harmonic counterparts (see Figures 5, 8, 10). Yet using biharmonic coordinates, in general, requires more user input to which it might be sensitive. For example, providing incorrect boundary derivative data might lead to undesirable effects. This is demonstrated in Figure 4 (bottom-right) and Figure 8 (middle). Also, our biharmonic coordinates do not possess the min / max principle that harmonic coordinates have; hence the coordinates are not guaranteed to be positive. To alleviate these limitations and in an effort to simplify the user interaction, we provide several ways for automatically adjusting the boundary derivatives based only on the given boundary positions. In addition, we have proposed a novel variational approach to deformation that encourages stretching in the tangent direction while eliminating shear in the vicinity of the boundary. We call it thickness-preserving deformation and have demonstrated its advantages over other state-of-the-art methods. This method has the advantage

Figure 11: Deformation of the snake with glasses. Top row using the original image texture. Bottom row: same result textured with a pattern of circles. BBW with automatic rotation estimation results in a severe area loss. Manually tweaking the affine transformations creates a plausible result comparable to our automatic thicknesspreserving algorithm (right). The basic construction we used in this paper can also be extended to higher orders using polyharmonic functions, which are a generalization of harmonic and biharmonic functions. Although the motivation for this in the context of shape deformation is not obvious, we provide the first few steps of the derivation in Appendix B. Figure 10 illustrates a deformation of a square to an Lshaped figure. In general, doing this with any barycentric coordinates will result in a spill outside the boundary. To overcome this, we split the square into two triangles and deform each part separately and then glue the results back together. We repeat the experiment using harmonic and biharmonic coordinates. Since harmonic coordinates do not allow any control over the normal derivative, the map is not smooth along the joint seam. In the biharmonic case, we can set the normal derivatives on both sides of the seam to be identical, resulting in a map which is smooth on the seam. This technique may be used to create 1 basis functions on non-convex finite elements, which may be more powerful for physical simulations than the 0 harmonic basis functions used by Martin et al. [MKB*08]. Acknowledgements The authors are grateful to Alec Jacobson for inspiring discussions. Ofir Weber was partially supported by NSF IIS grant 0905502. We would like to thank the anonymous reviewers for their valuable comments. References [AJC11] ANDREWS J., JOSHI P., CARR N.: A linear variational system for modeling from curves. Computer Graphics Forum 30, 6, (2011)

[ACL83] ARONSZAIN N., CREESE T.M., LIPKIN L.J.: Polyharmonic functions, Clarendon Press (1983). [BK04] BOTSCH M., KOBBELT L.: An intuitive framework for real-time freeform modeling. ACM Trans. Graphics 23, 3 (2004). [BCWG09] BEN-CHEN M., WEBER O., GOTSMAN C.: Variational harmonic maps for space deformation. In ACM Trans. on Graphics Vol. 28, No. 3 (Proc. SIGGRAPH 2009). [BD89] BREBBIA C. A., DOMINGUEZ J.: Boundary Elements: An Introductory Course, 2nd ed, Computational Mechanics. Publications, McGraw-Hill, New York, 1989. [Bel06] BELAYEV A.: On transfinite barycentric coordinates. Proc. of SGP (2006). [DF09] DYKEN C., FLOATER M. S.: Transfinite mean value interpolation, Comp. Aided Geom. Design. 26 (2009). [FHK06] FLOATER M. S., HORMANN K., KS G.: A general construction of barycentric coordinates over convex polygons. Advances in Computational Mathematics 24, 14 (2006). [FKR05] FLOATER M. S., KS G., REIMERS M.: Meanvalue coordinates in 3D. Comp. Aided Geom. Design 22 (2005). [Flo03] FLOATER M. S.: Mean value coordinates. Computer Aided Geometric Design 20, 1 (2003). [Fug81] FUGLEDE B.: On a direct method of integral equations for solving the biharmonic Dirichlet problem. ZAMM 61, 9 (1981). [HF06] HORMANN K., FLOATER M. S.: Mean value coordinates for arbitrary planar polygons. ACM Transactions on Graphics 25, 4 (2006). [HS08] HORMANN K., SUKUMAR N.: Maximum entropy coordinates for arbitrary polytopes. Computer Graphics Forum 27, 5 (2008). Proc. SGP. [IMH05] IGARASHI T., MOSCOVICH T., HUGHES J.-F.: AsRigid-As-Possible shape manipulation. ACM Trans. Graph. (Proc. SIGGRAPH),. 24, 3, (2005). [JMD*07] JOSHI P., MEYER M., DEROSE T., GREEN B., SANOCKI T.: Harmonic coordinates for character articulation. ACM Transactions on Graphics 26. Proc. of SIGGRAPH (2007). [JBPS11] JACOBSON A., BARAN I., POPOVIC J., SORKINE O.: Bounded biharmonic weights for real-time deformation. ACM Trans. Graph. 30. 4, Proc. of SIGGRAPH (2011). [LLCO08] LIPMAN Y., LEVIN D., COHEN-OR D.: Green coordinates. ACM Transactions on Graphics 27, 3 (2008), Proc. of SIGGRAPH. [LS08] LANGER T., SEIDEL H.-P.: Higher order barycentric coordinates. Computer Graphics Forum (Proc. Eurographics) 27 (2), (2008). [LKCOL07] LIPMAN Y., KOPF J., COHEN-OR D., LEVIN D.: GPU-assisted positive mean value coordinates for mesh deformations. SGP 2007. [MB10] MATTINGLEY J., BOYD S.: CVXGEN: A code generator for embedded convex optimization, 2010.

[MS10] MANSON J., SCHAEFER S.: Moving least squares coordinates. Computer Graphics Forum 29, 5. Proc. SGP (2010). [MKB*08] MARTIN S., KAUFMANN P., BOTSCH M., WICKE M., GROSS M.: Polyhedral finite elements using harmonic basis functions. Computer Graphics Forum 27, 5, (2008). [PP93] PINKALL U., POLTHIER K.: Computing discrete minimal surfaces and their conjugates. Experiment. Math. 2, 1 (1993). [Rus08] RUSTAMOV R. M.: Boundary element formulation of harmonic coordinates. Technical report, Department of Mathematics, Purdue University, 2008. [SMW06] SCHAEFER S., MCPHAIL T., WARREN J.: Image deformation using moving least squares. ACM Transactions on Graphics 25, 3 (2006). Proc. of SIGGRAPH [Wac75] WACHSPRESS E. L.: A Rational Finite Element Basis, vol. 114 of Mathematics in Science and Engineering. Academic Press, New York, 1975 [WBCG09] WEBER O., BEN-CHEN M., GOTSMAN C.: Complex barycentric coordinates with applications to planar shape deformation. Computer Graphics Forum 28, 2. Eurographics 2009. [WBCG*11] WEBER O., BEN-CHEN M., GOTSMAN C., HORMANN K.: A complex view of barycentric mappings. Computer Graphics Forum 30, 5 (SGP 2011). [WG10] WEBER O., GOTSMAN C.: Controllable conformal maps for shape deformation and interpolation. ACM Trans. on Graphics 29, 3 (Siggraph 2010). [ZRK*05] ZAYER R., RSSL C., KARNI Z., SEIDEL H.-P.: Harmonic guidance for surface deformation. In Computer Graphics Forum (2005).

Appendix A Closed form expressions of the biharmonic basis functions All of the basis functions are defined by integrals which can be solved analytically. To simplify calculations, we translate and rotate each edge: such that it coincides with the interval [0, ] on the -axis, where = . Denote the vector as:
, = (0 , 0 )

ry. The analogous Greens third identity for the polyLaplacian [ACL83] consists of equations, the th of which is: where 0 = and is the fundamental solution of the th harmonic equation: 1 1 ( ln ) (, ) = 2 and and are given by the recurrence: 1 = 1,
1

= +1

= 1
=1

To evaluate the basis functions, we first evaluate the following intermediate terms: 2 = 2 + 2 + 2 2 2 (1 2 ) 4 1 = 2 + 2

where (0 , 0 ) is the point at which we want to evaluate the basis functions. we first apply the affine transformation (0 , 0 ): 1 (0 , 0 ) = ( + , ) then, instead of evaluating the solution at (0 , 0 ), we evaluate it at ( , ) = (0 , 0 ).

1 = 0 1 1 1 = , = + 1 4( 1)2 4( 1)2 1 We can follow the same path as in Section 4, discretize the boundary and assume that for each , is linear and

is constant on each edge. Integrating results in a set of equations similar to (15). We can then solve for and the derivatives and form the polyharmonic coordinates.

= 1 + 1

1 (2 + 1 2 + ( )2 ) 4 = 1 + 2 1 = 31 32 + 2 144 Finally, the basis functions are given by:


= = 1 + 2 + 1 3 + 2 ( ) 8

+ 1 2 2 2 ( + )

1 4 2 2 2 2 2 16

+ 32 ( ) 2 2 + 32 + 2

+ 12 3 + 24 2 2 83 30 2

Appendix B Polyharmonic Coordinates Our construction of biharmonic coordinates can be generalized to polyharmonic coordinates. A polyharmonic function of degree is a function () that satisfies:

() = 0 The corresponding Dirichlet conditions consist of up to the -th derivative in normal direction of on the bounda-

You might also like