EUROGRAPHICS 2008 / G. Drettakis and R. Scopigno Volume 27 (2008), Number 2 (Guest Editors)

Curvature-Domain Processing

Michael Eigensatz Robert W. Sumner Mark Pauly

Applied Group ETH Zurich

Abstract We propose a framework for 3D geometry processing that provides direct access to to facili- tate advanced shape editing, filtering, and synthesis . The central idea is to map a given surface to the curvature domain by evaluating its principle , apply filtering and editing operations to the curvature distribution, and reconstruct the resulting surface using an optimization approach. Our system allows the user to prescribe arbitrary principle curvature values anywhere on the surface. The optimization solves a nonlinear least-squares problem to find the surface that best matches the desired target curvatures while preserving impor- tant properties of the original shape. We demonstrate the effectiveness of this processing metaphor with several applications, including anisotropic smoothing, feature enhancement, and multi-scale curvature editing.

Categories and Subject Descriptors (according to ACM CCS): I.3.5 []: Computational Geometry and Object Modeling

1. Introduction Curvature is an essential concept in geometry and plays a crucial role in surface optimization, geometric model- Curvature ing, and shape classification. Many geometry processing estimation operations strive to optimize the curvature distribution of Original model Principal curvatures a surface based on energy functionals that measure sur- Editing, face fairness [BPK∗07]. Shape classification, feature extrac- filtering tion, and segmentation algorithms [Sha06, AKM∗06] heav- ily rely on curvature information to identify meaningful geometric structures, such as ridges, valleys, and corners, that are mapped to features or used as segmentation bound- Optimization aries. Similarly, non-photorealistic rendering approaches of- ten make use of surface curvature to determine the position Reconstructed model Target curvatures and style of rendered strokes [MHIL02]. Typically, these methods use curvature either as a tool for analysis, or indi- Figure 1: The central idea of our approach is to process the rectly in the optimization of fairness energies that are defined geometry of a model by altering its curvature distribution. as curvature integrals over the entire surface. Our goal is to provide direct access to curvature as a ge- ometry processing tool to facilitate advanced shape editing, filtering, and synthesis algorithms. We propose an optimiza- face of a given object. In this domain, important geomet- tion framework that allows editing and filtering of surface ric features and properties are more directly accessible and curvatures in order to alter the shape of an object, as il- can be manipulated by setting specific curvatures to desired lustrated in Figure 1. Our system first computes a map- target values or by applying filtering operations on the cur- ping from the spatial domain to the curvature domain by vature distribution. The mapping to the curvature domain is evaluating principal curvatures for each point on the sur- then inverted to reconstruct the modified object geometry. As

c 2008 The Author(s) Journal compilation c 2008 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. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing

Original κ1 → 2κ1 κ1 → 2 κ2 → 0

κ2 >0

=0

κ1 <0 <0 =0 >0

0 0 0 κ1,κ2 κ1,κ2 κ1,2 → 1.5 κ2 → −κ2 κ1,2 → κ1,2

Figure 2: Geometry processing in the curvature domain. The models on the right (blue regions indicate constrained vertices) have been reconstructed by modifying the signed maximum and minimum curvatures, κ1 and κ2, respectively, of the model shown in the upper left. For example, setting the minimum curvature κ2 to zero while keeping κ1 fixed straightens out the curved regions, as shown in the top right. In the bottom right, the curvatures of a smaller scale are set to the curvatures estimated at a larger scale, as visualized in the curvature plots in the bottom left.

shown in Figure 2 and in Section 5, this approach facilitates Related Work. The most common methods in surface op- a variety of geometry processing operations that are difficult timization are based on energy minimizing flows, where a to achieve by manipulating spatial 3D coordinates but trivial given surface is progressively evolved to decrease an en- to formulate in the curvature domain. ergy functional that quantifies the desired surface proper- ties. Taubin [Tau95] proposed an iterative Laplacian scheme The main challenge lies in the formulation and imple- to implement surface diffusion for low-pass filtering of dis- mentation of the inverse mapping, i.e., the reconstruction of crete surfaces. Desbrun and colleagues [DMSB99] perform the surface geometry from the modified curvature values. In mean curvature flow to remove geometric noise on a sur- general, this mapping is not well-defined and not every set face and propose an implicit scheme to stabilize the com- of curvature values is realizable. For example, there is no putation. Ohtake and co-workers [OBS02] apply diffusion 3D embedding of a genus-1 surface with constant principal to the mesh normals and reconstruct the smoothed surface curvatures everywhere. using a fitting approach. Bobenko and Schröder [BS05] in- troduced a version of discrete Willmore flow that preserves We address this issue by formulating the reconstruction important symmetries of the continuous setting. A variety of as an optimization process that computes a deformation of different energy functionals, including Willmore and mini- the input surface that best approximates the prescribed cur- mum variation of curvature energies, are studied by Pushkar vatures in a least-squares sense. Additional terms in the ob- and Sequin [PS07] in the context of fair surface design. Sim- jective function aim at preserving metric properties of the ilarly, Pinkall and Polthier [PP93] construct discrete minimal original surface and ensure that the solution is well-defined. surfaces based on an area minimizing flow. Due to the nonlinear relation between spatial coordinates and corresponding curvature values, the optimization em- Various researchers have extended this class of shape op- ploys an iterative Levenberg-Marquardt method to solve the timization methods by adding more direct control of the nonlinear least-squares problem. This procedure requires flow evolution. Hildebrandt and Polthier [HP04] present partial derivatives for which we derive analytical expres- a method for feature-preserving noise removal on surface sions. We show various applications of our framework that meshes based on an anisotropic mean curvature flow. Their demonstrate how complex geometry processing operations method allows mean curvatures to be prescribed as targets can be formulated as simple operations on surface curva- for the flow evolution. Eckstein and co-workers [EPT∗07] tures. generalize geometric surface flows by tailoring the inner

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing product of the underlying vector field to the requirements of with constants kc and km that allow a trade-off between cur- specific applications. This extension provides a design tool vature fit and metric distortion. for controlling the flow, which has been successfully applied for surface fairing and deformable shape matching. Tosun 3. Discretization and co-workers propose a system for shape optimization us- ing reflection lines that allows modifying surfaces by spec- Minimizing the energy defined in Equation 3 requires a suit- ifying a target reflection function gradient [TGRZ07]. An able discretization of the surface, its principal curvatures, optimization then solves for the surface that best matches and the metric term. We approximate a surface S by a tri- the prescribed reflection field. In the context of surface re- angle mesh M = (V,E,F), where V = {vi} denotes the set construction from differential quantities, Lipman and col- of vertices, E = {ei j} the edge set, and F = { fi jk} the face leagues [LSLCO05] introduced a rigid motion invariant sur- set with 1 ≤ i, j,k ≤ n = |V|. The position of vertex vi is 3 face representation based on discrete forms. given by vi ∈ IR and the edge vector corresponding to ei j is e = v −v . To simplify notation, we omit the indices when Building on these ideas, we develop a comprehensive sys- i j j i the meaning is clear from the context. tem for curvature-domain shape processing. Our work com- plements existing surface optimization methods by support- ing direct editing and filtering of surface curvatures, thus 3.1. Discrete Curvature broadening the toolset for manipulating discrete surfaces. A variety of techniques have been proposed to estimate curvatures on piece-wise linear surfaces (cf., [MDSB02, 2. Continuous Problem Formulation CSM03,CP05,GGRZ06,KSNS07]). In our implementation, we use the curvature tensor proposed by Cohen-Steiner and Our goal is to develop a geometry processing tool that en- Morvan [CSM03] as it provides a robust and theoretically ables the user to modify a given surface S ⊂ IR3 by altering well-founded estimation of the principle curvatures at multi- its curvature profile to obtain a new surface S0. This pro- ple scales, which we exploit in our framework to implement cedure requires the computation of curvatures on the input multi-scale processing operations. However, our method is model S, suitable operators to modify these curvatures, and not dependent on this specific curvature discretization and a method to reconstruct the corresponding surface S0. We other techniques could be used instead. formulate the reconstruction as an optimization process that finds the unknown surface S0 by minimizing an appropriate We adopt the notation used by Alliez and colleagues energy function. We first derive this energy in the continuous [ACSD∗03] and summarize the curvature computation here. setting, then propose a suitable discretization in Section 3, The curvature tensor K(v) for vertex v is found by averaging and discuss the resulting optimization in Section 4. an edge-based tensor for all edges that fall within a region B surrounding the vertex. The curvature tensor is represented Let S and S0 be defined over a domain Ω ⊂ IR2 by map- 0 3 by the 3 × 3 matrix pings p,p : Ω → IR , respectively. We denote with κ1(u,v) the maximum and with κ (u,v) the minimum curvature at 1 > 2 K(v) = ∑ β(e) |e ∩ B| e¯ e¯ , (4) a point p(u,v) ∈ S, but omit the (u,v) parameters for nota- |B| e∈B tional brevity. Quantities of the unknown surface S0 are de- fined analogously and denoted by a prime. In principle, we where |B| is the surface area of the region B, β(e) repre- want to be able to prescribe arbitrary target curvature values sents the signed angle between the normals of the triangles 0 incident to e and is positive for a convex crease and nega- κˆ 1 and κˆ 2 for the modified surface S and preserve important properties of the original surface S. We define an energy that tive for a concave one, |e ∩ B| is the length of the portion quantifies this goal by measuring the deviation of principal of the edge within the region B, and e¯ is a unit-length vec- curvatures κ0 , κ0 of the surface S0 from the prescribed target tor aligned with e. The principle curvatures are found by 1 2 computing the eigenvalues of the curvature tensor K(v). The values κˆ 1, κˆ 2 as eigenvalue closest to zero is discarded, and the remaining Z 0 2 0 2 Ec = (κˆ 1 − κ1) + (κˆ 2 − κ2) dA, (1) two form the signed maximum and minimum curvatures: Ω the larger signed eigenvalue is κ and the smaller κ . The √ 1 2 where dA = detI dudv and I is the first fundamental form. 0 In addition, we wish S to have a similar metric as S and vk define the energy v j v j A fi jk Z 2 vi vi A vi E = I − I0 dA, (2) ei j m F Avi Ω 0 where k·kF denotes the Frobenius norm. The surface S can then be found as the minimizer of the combined energy Figure 3: Vertex, edge, and face areas. E = kcEc + kmEm, (3)

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing size of B determines the scale of the curvature estimation.

As the smallest scale we use the barycentric area Avi of a vertex vi [MDSB02] (Figure 3). We use barycentric areas rather than generalized Voronoi regions to simplify deriva- tive computations. For larger scales, we compute the union Original Isometric of the barycentric areas of all vertices within a certain dis- tance to vi. Conformal Figure 4: Scaling curvatures by a factor of 0.5 for a hemi- 3.2. Discrete Energy sphere (center). The conformal energy (left) only preserves inner angles and achieves the target curvature by scaling the We discretize the integral of Equation 1 as a sum of discrete model. The isometric energy (right) additionally tries to pre- curvatures, leading to serve area at the cost of a slight deviation in inner angles. h 0 2 0 2i Ec = ∑ Avi (κˆ 1,i − κ1,i) + (κˆ 2,i − κ2,i) , (5) vi∈V where the subscript i indicates that the corresponding quan- in an attempt to drive the total energy to its lowest possible value. Thus, the energy we use is defined by tities are computed with respect to vertex vi. 1 The metric term E measures the deviation from isom- E = (kcEc + kαEα + kdEd), (9) m 2 etry, i.e. change of lengths. A discrete version can thus be k k k formulated as where the parameters c, α, and d allow the user to adapt the optimization to a particular application domain. The fac- 0 ke k 2 tor 1 is introduced for convenience in subsequent equations. Em = ∑ Ae(1 − ) , (6) 2 e∈E kek where Ae is the barycentric area associated with edge e (Fig- 4. Optimization ure3). We found that trying to preserve isometry can be too We minimize the energy defined in Equation9 in order to restrictive in certain applications, in particular when large find the vertex positions v0 ...v0 of the deformed shape that changes in shape are desired. We thus propose a conformal 1 n best matches the target curvatures: energy Eα that only penalizes deviation of inner angles: 0 0 h i v1 ...vn = argmin E. (10) E A 0 2 0 2 0 2 v0 ...v0 α = ∑ fi jk (αi − αi) + (α j − α j) + (αk − αk) , 1 n fi jk∈F This optimization is a nonlinear least-squares problem, due (7) to the nonlinear relationship between the terms of the ob- where A denotes the area of triangle f , and α , α , α fi jk i jk i j k jective function (principle curvature values, triangle angles) are the inner angles of f at vertices v , v , and v , respec- i jk i j k and the vertex positions. Specifically, it falls into the cate- tively (Figure 3). Note that similar energies are also used in gory of composite non-smooth optimization [WF86] due to surface parameterization [SdS01]. discontinuities in the derivatives of the principle curvatures The isometric energy Em aims at preserving lengths, i.e. at umbilic points. As detailed in the Appendix, we are able angles and area, whereas the conformal term Eα tries to pre- to derive suitable approximations for the derivatives at these serve inner angles only, i.e. does not place a penalty on uni- points so that efficient methods designed for smooth func- form scaling. Figure 4 illustrates the difference between the tions can be applied. Although we have written the prob- two terms. lem as an unconstrained optimization, positional vertex con- straints can be trivially enforced by treating the constrained For the results in this paper, we use the conformal for- vertices as constants rather than free variables. mulation Eα and focus on this energy for the remainder of the discussion. Additionally, we add a third term to the op- We employ the Levenberg-Marquardt timization that measures the size of the deformation field: [MNT04], which is a damped version of the Gauss- Newton method that first linearizes the nonlinear problem 0 2 with Taylor expansion around x: Ed = ∑ kvi − vik . (8) vi∈V f(x + δ) = f(x) + Jδ (11) This term has a twofold purpose. First, it resolves ambigu- The vector f(x) stacks the equations that define the objec- > ity in the objective function that exists because Ec, Em, and tive function so that f(x) f(x) = 2E, the vector x stacks the Eα are invariant under rigid transformations. Second, it ad- unknown vertex positions, and J is the Jacobian matrix of dresses the problem of overfitting by penalizing large defor- f(x). The details of the derivative computations to build J mations that might otherwise be selected by the optimizer are given in the Appendix.

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing

Each iteration solves a linearized problem to improve xk, the current estimate of the unknown vertex positions: Edit 2 δk = argmin kf(xk) + Jδk2 δ (12) xk+1 = xk + δk. In solving this problem, the Levenberg-Marquardt method Original curvatures Target curvatures Final curvatures adds a damping factor to the equations, yielding: > > Estimate Reconstruct Estimate (J J + µI)δ = J f(xk), (13) with µ > 0. The initial value of µ is chosen to be 10−6 times > the largest entry on the diagonal of J J evaluated at x0. In subsequent iterations, µ is updated according to the schedule suggested by Nielsen [Nie99]. The algorithm is not sensitive to the initial value of µ as it is continually adapted by the update procedure. The damping factor serves two main purposes. First, it improves numeric robustness by guaranteeing that the coeffi- cient matrix is positive definite and that δk is in the decent di- rection. Second, the damping parameter influences both the Original model Cross-scale smoothing step direction and the step size, obviating the need for a spe- cific line search and leading to faster convergence [MNT04]. Since the system matrix in Equation 13 is sparse, we solve the normal equations in each iteration using a direct solver that employs sparse Cholesky factorization [SG04]. We de- tect convergence by monitoring the change in the objective function Fk = E(xk), the gradient of the objective function, and the magnitude of the update vector δk [GMW89]:

|Fk − Fk−1| < ε(1 + Fk) √ 3 k∇Fkk∞ < ε(1 + Fk) (14) Curvature clamping Feature enhancement √ 2 kδkk∞ < ε(1 + kδkk∞). Figure 5: Curvature-domain processing on the Stanford In our experiments, the optimization converges after about bunny. The top row shows the curvature plots of the original −6 five iterations with ε = 10 . model, the prescribed target values, and the actual achieved For some applications, there may be a conflict between curvatures on the final reconstructed model. Vertices on the the desired curvatures and the original shape metric, since base of the bunny are constrained to remain fixed in place in the requested curvatures necessitate a deviation in triangle the optimization. shape. For this reason, we adapt the optimization procedure to allow the metric to evolve in an iterative fashion. Initially, the target angles and vertex positions for Eα and Ed are de- rived from the original shape and the optimization is allowed curvature values are then modified by applying filtering op- to converge. Then, the angles and positions are updated with erations or direct edits, and the resulting surface is recon- values taken from the converged shape and the process is re- structed using the optimization introduced in Section4. peated. Conceptually, this iterative scheme evolves the met- ric to better match the curvatures, while avoiding drastic Figure5 shows a number of curvature-domain edits on changes in triangle shape that may cause numeric instabil- a shape with a complex curvature distribution. For cross- ities. scale smoothing, we set the target principal curvatures of the smallest scale (barycentric vertex area) to the values com- puted at a scale of four times the average one-ring radius. As 5. Results the curvature plots indicate, the target curvature values are This section shows various geometry processing applica- well approximated in the final model. The curvature plots vi- tions supported by our system. Following the pipeline de- sualize both principle curvatures according to the colormap picted in Figure 1, we first compute discrete principal cur- in Figure2. Note that the resulting smoothing avoids local vatures on the input mesh as described in Section 3.1. These shrinkage artifacts often observed with diffusion-based ap-

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing

(a) Original (b) Multi-scale (c) Enhanced (d) To sphere small scale

Figure 6: Different curvature-domain processing opera- tions on the Matterhorn. Curvature plots show the result- ing curvatures after the optimization. For (b) curvature op- timization is performed at two scales. large scale large

proaches that can increase mean curvature and eventually Figure 8 shows a curvature-domain bilateral filter applied lead to pinch-off singularities. to a noisy range scan. Target curvature values κˆ 1,i for vertex v (and analogously for κˆ ) are computed as local weighted Curvature clamping restricts both the minimum and max- i 2,i averages that combine domain and range filtering imum curvature to lie within a user-defined interval, thus re- moving the extreme curvatures from the surface. As a re- ∑v ∈N φc(kvi − v jk)φs(|κ1,i − κ1, j|)κ1,i ˆ j i sult, the bunny’s ears inflate in order to avoid high curva- κ1,i = , (15) ∑v j∈Ni φc(kvi − v jk)φs(|κ1,i − κ1, j|) tures. Note how surface detail that is characterized by curva- tures within the clamping interval is preserved, while strong where Ni is the local averaging region around vertex vi, and creases are smoothed and rounded. φc and φs are two Gaussians measuring spatial closeness and curvature similarity, respectively (see [TM98] for details). Figure7 shows one-sided curvature clamping on a ma- Compared to isotropic Laplacian smoothing, the bilateral fil- chine part, where curvatures are restricted to lie in the inter- ter better preserves ridges and corners, while leading to an val [−5,∞]. As a result, concave corners evolve into smooth overall smoother curvature distribution. The curvature plots fillets to meet the new curvature requirements. Note that reveal the anisotropic behavior of the filter, i.e., illustrate normal discontinuities across feature edges are introduced purely for rendering purposes. Curvature processing is obliv- ious to these tagged edges, i.e. the entire mesh is considered a discrete approximation of a smooth surface. Feature enhancement in Figure 5 is achieved by increas- ing the largest absolute principal curvature by an amount -23 -5 11 -23 -5 11 proportional to the difference of the absolute principal cur- vature values. This change enhances convex ridges as well as concave valleys. The same enhancement filter is applied in Figure 6 (c) on a digital elevation model. This figure also shows the effect of multi-scale editing (b), where target cur- vatures have been specified on two different scales: the cur- vatures of the original model are prescribed on the smallest scale, while on a coarser scale target curvatures are set to a constant in a circular region around the peak of the moun- tain. This “flattens out” the mountain flanks, while preserv- ing the fine-scale structure. Multi-scale editing is easily in- Curvature clamping corporated into the optimization by including target curva- Original tures at different scales in the energy Ec. Image (d) shows Figure 7: Curvature clamping of a machine part. The his- the result of a single-scale edit, where both principal curva- tograms show the distribution of κ2 on a logarithmic scale tures for the center region have been set to the same constant, before and after the optimization. thus pushing the shape towards a spherical configuration.

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing

Fig.2 σ Bunny σ

κ1 → 2κ1 .950 Clamp .821 κ1 → 2 .944 Cross-Scale .963 κ2 → 0 .858 Enhance .721 Original Laplacian Bilateral κ1,2 → 1.5 .999 scan smoothing curvature filter κ2 → −κ2 .988 0 κ1,2 → κ1,2 .994 Table 1: The value σ ∈ [0,1] indicates to what extent the target curvatures are achieved by the final model.

differences in the achieved scores stem from the fact that the metric regularization prevents drastic changes of the shape and that target curvatures can be incompatible.

6. Discussion The results shown in the previous section demonstrate the flexibility of curvature-domain shape processing. Although specialized techniques based only on mean curvature exist for some of the applications presented, our approach offers a different perspective since the specific geometric operations employed by our method are often quite different than the ones already known. Investigating these similarities and dif- Laplacian smoothing Bilateral curvature filter ferences for specific applications may lead to new insights about shape processing and suggest avenues of future work Figure 8: Comparison of isotropic Laplacian smoothing in this area. with bilateral filtering of curvatures on a noisy range scan. An interesting connection of our approach to continuum mechanics becomes apparent when comparing the energy function of Equation 3 with the elastic thin-shell energy how curvature variation is reduced along feature lines with- Z out blurring the surface across the features. For comparison 0 2 0 2 E = ks I − I F + kb II − II F dudv, (17) we apply ten smoothing steps in both examples. Boundaries Ω are handled without special treatment. Our formulation oper- where II denotes the second fundamental form, and ks and ates directly on discrete curvatures, i.e., scalar attributes de- kb are stiffness parameters that determine the stretching and fined on each mesh vertex, so that we avoid local height-field bending resistance of the material [TPBF87]. In our formu- parameterizations of vertex positions, as for example used lation we replace the bending term by principal curvature in [FDCO03], that can lead to distortions for larger neigh- differences, thus avoiding the directional component of the borhoods or high curvature regions. second fundamental form. The key difference, however, is that in Equation 17 the second fundamental form II is com- To evaluate the results of our algorithm we introduce a puted from a given, initial rest state, whereas we prescribe ar- score function σ that measures the degree to which the pre- bitrary target curvatures values. Effectively, minimizing the scribed curvatures are achieved by the optimization proce- objective function 3 pulls the surface to a “fictitious” rest dure. This function is designed to be a relative measure in- state defined by the target curvatures. dependent of both scale and sampling and is defined as h i Rusinkiewicz observed [Rus04] that the curvature tensor A (κˆ − κ0 )2 + (κˆ − κ0 )2 ∑vi∈V vi 1,i 1,i 2,i 2,i proposed by Cohen-Steiner and Morvan can yield a poor ap- σ = 1 − , (16)  ˆ 2 ˆ 2 proximation of the true curvatures for small local neighbor- ∑vi∈V Avi (κ1,i − κ1,i) + (κ2,i − κ2,i) hoods at low-valence vertices. In our optimization this can where κ denotes the principal curvatures of the original j,i lead to local distortions that diminish the quality of the fi- model. nal result. In general, we observed that the performance de- Higher values indicate that the optimization procedure grades with poor input mesh quality, since the estimation of was better able to match the desired curvatures. Table 1 lists curvatures and corresponding derivatives becomes numeri- the values of σ for the models shown in Figures 2 and 5. The cally unstable. Our experiments indicate that these artifacts

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing can be reduced by applying appropriate local remeshing op- derivatives of the per-vertex principal curvatures with re- erations, e.g., [SG03], to improve the stability of the curva- spect to the unknown vertex positions. We present the deriva- ture estimation. tive formulas here. In the following equations, vi,c refers to the component c of vertex i, c ∈ {x,y,z}. In terms of performance, the dominating factor is the non- linear optimization used to reconstruct the final model from the given target curvature values. The initial curvature esti- Curvature Derivatives mation constitutes less then 5 percent of the total computa- tion time, and the overhead for filtering/editing of curvatures The principle curvatures κ1 and κ2 are eigenvalues of the is negligible. While performance was not our main concern, curvature tensor K defined in Equation 4. Umbilic points the optimization for e.g. the bunny model with 35,111 ver- occur whenever the curvature tensor field is isotropic, in- tices, i.e. more than 100k unknowns, runs in less than 2.5 dicating that the underlying surface locally approximates minutes on a 2.4 GHz Intel Core 2 Duo with 2GB of mem- a sphere or plane. At such points, the principal curvatures ory. Our current prototype implementation supports mod- are equal and their derivatives are undefined. However, this erately sized meshes up to 60,000 vertices. Since memory problem falls into the class of composite nonsmooth opti- constraints restrict the use of larger meshes with our in-core mization [WF86] since, although the derivatives are discon- solver, we intend to improve the scalability of our system tinuous at umbilic points, they can be approximated from by investigating alternative solvers, in particular multi-level information available at the discontinuities. Following Kim solvers that operate on a hierarchy of surface approximations and colleagues [KCH02], we average the derivative compu- of different levels of detail. tation at nonsmooth points to achieve a viable approxima- tion. With these observations in place, we compute the cur- The example of Figure 8 demonstrates how a standard im- vature derivatives according to three cases. age processing filter can be applied in curvature-domain to implement an advanced geometry processing tool. We be- lieve that our curvature-based processing metaphor offers a Case 1: The most common case occurs when all three versatile framework for exploring a variety of such filtering eigenvalues are distinct. In this situation, we have methods. In the future we intend to follow this avenue and   ∂ > ∂ evaluate different filters for their potential use in curvature- λ j = u j K u j, (18) ∂vi,c ∂vi,c based geometry processing. th where λ j and u j are the j eigenvalue and normalized eigenvector, respectively, of the curvature tensor K(vi) and 7. Conclusion λ1 < λ2 < λ3 [HUY95]. The tensor derivative is given below We introduced curvature-domain shape processing, an op- in Equation 21. timization framework that allows arbitrary curvature values to be prescribed on a given surface. We show how advanced Case 2: A cylindric point occurs when the two smallest geometry processing techniques can be implemented as sim- eigenvalues, in an absolute sense, are nearly equal and dis- ple operations in the curvature domain. Through the use of tinct from the remaining eigenvalue. The derivative of this nonlinear optimization, we push the complexity of geome- remaining eigenvalue, which corresponds to either κ1 or κ2, try processing tasks toward computation, thus reducing the can be computed as described above. The derivative of the burden on the user, who can apply simple and intuitive mod- other principle curvature can be computed using the mean ifications and filtering operations in the curvature domain to 1 1 curvature H = 2 (κ1 + κ2). Since H = 2 trace(K), we have edit and design geometric models. Our framework offers a   new perspective on shape optimization and provides a plat- ∂ 1 ∂ ∂ ∂ H = t11 + t22 + t33 , (19) form for further development in 3D geometry processing. ∂vi,c 2 ∂vi,c ∂vi,c ∂vi,c

where t j j, j ∈ 1...3, are the diagonal entries of K. The for- Acknowledgments mula for their partial derivatives is presented in Equation 21. We would like to thank Pierre Alliez, Mario Botsch, David Case 3: When κ1 = κ2, we have an umbilic point and the Cohen-Steiner, Joachim Giesen, Eitan Grinspun, Martin Kil- derivative is not defined. However, a viable approximation to ian, Niloy Mitra, Helmut Pottmann, Filip Sadlo and Jo- the derivative at this point is given by averaging the deriva- hannes Wallner for fruitful discussions about this research. tives that meet at the discontinuity [KCH02], which leads to

Appendix ∂ ∂ ∂ κ = κ ≈ H, (20) ∂v 1 ∂v 2 ∂v Building the Jacobian matrix for the optimization problem i,c i,c i,c outlined in Section 4 requires the computation of partial where the rightmost term is defined in Equation 19.

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing v As a side remark, the principle curvatures and their deriva- n¯ 3 tives can also be estimated in terms of the mean and Gaus- e23 sian curvatures. Under the assumption that the third eigen- e31 value is zero, this approach avoids eigenvalue decomposi- α v2 tion and leads to simpler derivative expressions. However, 1 e12 we found this method to be less accurate near umbilic points. v1 Figure 9: Notation used in the derivation of derivatives. Tensor Derivatives Equation 18 requires the partial derivative of the curvature tensor K with respect to the unknown vertices: The dihedral angle gradients from Equation 22 can be computed according to the formulas presented by Bridson, ∂ 1 ∂ Kˆ ∂ Marino, and Fedkiw [BMF03]. K = Kˆ − |B| ∂v |B| ∂v |B|2 ∂v i,c i,c i,c (21) The edge length derivatives from Equations 22 and 23 are where Kˆ = ∑ β(e) |e ∩ B| e¯ e¯>. e∈B ∂ ∂ |e12 ∩ B| = −Be12 e¯12 |e12 ∩ B| = Be12 e¯12 The derivative of Kˆ is given by ∂v1 ∂v2 ∂ 2 ∂ 2 ∂ ˆ h ∂  > ke12k = −2e12 ke12k = 2e12, K = ∑ β(e) |e ∩ B|e¯ e¯ + ∂v1 ∂v2 ∂vi,c e∈B ∂vi,c (27)  ∂  > β(e) |e ∩ B| e¯ e¯ + (22) where Be12 is the fraction of the edge which is inside B. ∂vi,c 1 Again because of the barycentric regions, Be12 is either 2  ∂ >i or 1. β(e)|e ∩ B| e¯ e¯ ∂vi,c where Metric Derivatives > ∂ > ∂ ee As discussed in Section 3.2, we have experimented with two e¯ e¯ = 2 ∂vi,c ∂vi,c kek forms of metric regularization: isometric and conformal. The (23) isometric regularization measures the change in edge length,   ¯ ¯> ∂ > 1 ee ∂ 2 and the appropriate derivatives are already given in Equa- = ee 2 − 2 kek . ∂vi,c kek kek ∂vi,c tion 27. The conformal regularization measures the change The outer product derivative is given by in each triangle’s inner angles. The necessary derivatives are   ∂ e × n¯ exex exey exez α = 12 (28) ∂ > ∂ ∂v 1 ke k2 ee = eyex eyey eyez, (24) 2 12 ∂v ∂v i,c i,c e e e e e e ∂ e × n¯ z x z y z z α = 31 (29) ∂v 1 ke k2 which is straightforward to evaluate entrywise. 3 31 ∂ e12 × n¯ e31 × n¯ α1 = − 2 − 2 (30) The remaining terms in Equations 21, 22, and 23 are more ∂v1 ke12k ke31k easily interpreted geometrically as derivatives with respect for face f123 and the inner angle α1 at v1 (Figure 9). to vertex vi, rather than with respect to its individual compo- nents. References The area gradient for Equation 21 is given by ∗ [ACSD 03] ALLIEZ P., COHEN-STEINER D.,DEV- ∂ ∂ ILLERS O.,LÉVY B.,DESBRUN M.: Anisotropic polyg- |B| = ∑ B f A f (25) ∂vi f ∈B ∂vi onal remeshing. ACM Transactions on Graphics 22, 3 (July 2003), 485–493. where A f is the face area and B f is the fraction of A f which ∗ is inside B. Since B is a union of barycentric regions, B f is [AKM 06] ATTENE M.,KATZ S.,MORTARA M., always equal to 1 , 2 , or 1. The derivative of the face area is PATANE G.,SPAGNUOLO M.,TAL A.: Mesh segmen- 3 3 tation – a comparative study. In IEEE International Con- ∂ 1 ference on Shape Modeling and Applications A = (n¯ × e ), (26) (2006). ∂v f123 2 23 1 [BMF03] BRIDSON R.,MARINO S.,FEDKIW R.: Simu- where n¯ is the normalized face normal and e23 is the edge lation of clothing with folds and wrinkles. In Symposium vector opposite v1 (Figure 9). on Computer Animation (2003), pp. 28–36.

c 2008 The Author(s) Journal compilation c 2008 The Eurographics Association and Blackwell Publishing Ltd. M. Eigensatz, R. Sumner, M. Pauly / Curvature-Domain Shape Processing

∗ [BPK 07] BOTSCH M.,PAULY M.,KOBBELT L.,AL- rendering for art and . ACM SIGGRAPH LIEZ P., LEVY B.: Geometric modeling based on polyg- Course Notes (2002). onal meshes. ACM SIGGRAPH Course Notes (2007). [MNT04] MADSEN K.,NIELSEN H.,TINGLEFF O.: [BS05] BOBENKO A.I.,SCHRÖDER P.: Discrete will- Methods for Non-Linear Least Squares Problems. Tech. more flow. In Symposium on Geometry Processing rep., Informatics and Mathematical Modelling, Technical (2005). University of Denmark, 2004. [CP05] CAZALS F., POUGET M.: Estimating differen- [Nie99] NIELSEN H.: Damping Parameter in Marquardt’s tial quantities using polynomial fitting of osculating jets. Method. Tech. rep., Informatics and Mathematical Mod- Comput. Aided Geom. Des. 22, 2 (2005), 121–146. elling, Technical University of Denmark, 1999. [CSM03] COHEN-STEINER D.,MORVAN J.-M.: Re- [OBS02] OTHAKE Y., BELYAEV A.,SEIDEL H.-P.: stricted delaunay triangulations and normal cycle. In Sym- Mesh smoothing by adaptive and anisotropic gaussian fil- posium on Computational geometry (2003), pp. 312–321. ter. Vision, Modeling, and Visualization (2002). [DMSB99] DESBRUN M.,MEYER M.,SCHRÖDER P., [PP93] PINKALL U.,POLTHIER K.: Computing discrete BARR A. H.: Implicit fairing of irregular meshes us- minimal surfaces and their conjugates. Experimental ing diffusion and curvature flow. In Proceedings of SIG- Mathematics 2, 1 (1993). GRAPH (1999), pp. 317–324. [PS07] PUSHKAR J.,SEQUIN C.: Energy minimizers for ∗ [EPT 07] ECKSTEIN I.,PONS J.-P., TONG Y., KUO C.- curvature-based surface functionals. Computer-Aided De- C.J.,DESBRUN M.: Generalized surface flows for sign and Applications (2007). mesh processing. In Symposium on Geometry Processing [Rus04] RUSINKIEWICZ S.: Estimating curvatures and (2007), pp. 183–192. their derivatives on triangle meshes. In Symposium on 3D [FDCO03] FLEISHMAN S.,DRORI I.,COHEN-OR D.: Data Processing, Visualization, and Transmission (2004). Bilateral mesh denoising. ACM Trans. Graph. 22, 3 [SdS01] SHEFFER A., DE STURLER E.: Parameterization (2003), 950–953. of faceted surfaces for meshing using angle-based flatten- [GGRZ06] GRINSPUN E.,GINGOLD Y., REISMAN J., ing. with Computers 17 (2001), 326–337. ZORIN D.: Computing discrete shape operators on gen- [SG03] SURAZHSJY V., GOTSMAN C.: Explicit sur- eral meshes. Computer Graphics Forum 25, 3 (2006). face remeshing. In Symposium on Geometry Processing [GMW89] GILL P. E., MURRAY W., WRIGHT M.H.: (2003), pp. 20–30. Practical Optimization. Academic Press, London, 1989. [SG04] SCHENK O.,GÄRTNER K.: Solving unsymmetric [HP04] HILDEBRANDT K.,POLTHIER K.: Anisotropic sparse systems of linear equations with pardiso. Future filtering of non-linear surface features. Computer Graph- Gener. Comput. Syst. 20, 3 (2004), 475–487. ics Forum 23, 3 (2004). [Sha06] SHAMIR A.: Segmentation and shape extraction [HUY95] HIRIART-URRUTY J.-B.,YE D.: Sensitivity of 3d boundary meshes. Eurographics State-of-the-Art analysis of all eigenvalues of a symmetric matrix. Numer. Report (2006). Math. 70, 1 (1995), 45–72. [Tau95] TAUBIN G.: A approach to fair [KCH02] KIM M.S.,CHOI D.H.,HWANG Y.: Com- surface design. In Proceedings of SIGGRAPH (1995), posite nonsmooth optimization using approximate gener- pp. 351–358. alized gradient vectors. J. Optim. Theory Appl. 112, 1 (2002), 145–165. [TGRZ07] TOSUN E.,GINGOLD Y. I., REISMAN J., ZORIN D.: Shape optimization using reflection lines. In [KSNS07] KALOGERAKIS E.,SIMARI P., Symposium on Geometry Processing (2007). NOWROUZEZAHRAI D.,SINGH K.: Robust statis- tical estimation of curvature on discretized surfaces. In [TM98] TOMASI C.,MANDUCHI R.: Bilateral filter- Symposium on Geometry Processing (2007), pp. 13–22. ing for gray and color images. In Proceedings of ICCV (1998), p. 839. [LSLCO05] LIPMAN Y., SORKINE O.,LEVIN D., COHEN-OR D.: Linear rotation-invariant coordinates for [TPBF87] TERZOPOULOS D.,PLATT J.,BARR A., meshes. In Proceedings of ACM SIGGRAPH 2005 (2005), FLEISCHER K.: Elastically deformable models. In Pro- ACM Press, pp. 479–487. ceedings of SIGGRAPH (1987), pp. 205–214. [MDSB02] MEYER M.,DESBRUN M.,SCHROEDER P., [WF86] WOMERSLEY R.S.,FLETCHER R.: An algo- BARR A.: Discrete differential-geometry operators for rithm for composite nonsmooth optimization problems. J. triangulated 2-manifolds. VisMath. (2002). Optim. Theory Appl. 48, 3 (1986), 493–523. [MHIL02] MA K.-L.,HERTZMANN A.,INTERRANTE V., LUM E. B.: Recent advances in non-photorealistic

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