25
COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING DISCRETE BELTRAMI FLOW Abstract. The manipulation of surface homeomorphisms is an important aspect in 3D modeling and surface processing. Every homeomorphic surface map can be considered as a quasiconformal map, with its local non-conformal distortion given by its Beltrami differential. As a generaliza- tion of conformal maps, quasiconformal maps are of great interest in mathematical study and real applications. Efficient and accurate computational construction of desirable quasiconformal maps between general surfaces is crucial. However, in the literature we have reviewed, all existing compu- tational works on construction of quasiconformal maps to or from a compact domain require global parametrization onto the plane, and have difficulty to be directly applied to maps between arbitrary surfaces. This work fills up the gap by proposing to compute quasiconformal homeomorphisms be- tween arbitrary Riemann surfaces using discrete Beltrami flow, which is a vector field corresponding to the adjustment to the intrinsic Beltrami differential of the map. The vector field is defined by a partial differential equation (PDE) in a local conformal coordinate. Based on this formulation and a composition formula, we can compute the Beltrami flow of any homeomorphism adjustment as a vector field on the target domain defined from the source domain, with appropriate boundary con- ditions and correspondences. Numerical tests show that our method provides a robust and efficient way of adjusting surface homeomorphisms. It is also insensitive to surface representation and has no limitation to the classes of surfaces that can be processed. Extensive numerical examples will be shown. Key words. quasiconformal maps, Beltrami differential, homeomorphism adjustments, least squares AMS subject classifications. 30C62, 30C65, 53A05, 53A30 1. Introduction. Surface processing is an important task in many problems such as 3D modeling and medical image processing. One important aspect of surface processing is how to compute or construct maps between surfaces with some desired properties and correspondences such as in shape deformation, surface registration, shape classification, texture mapping, mesh editing, and etc. One common and important problem is to define and compute a good map be- tween two surfaces in different applications. One natural choice is to look for a map which minimizes angular distortions, hence preserving local surface geometry. This led to the widely studied conformal maps both mathematically and computationally. While conformal maps preserve local geometry well by minimizing angular distortions, the conformal factor of the map can vary greatly throughout the surface, likely caus- ing significant expansions and compression of the map. Also, in image registration, one needs to enforce the correspondence of landmarks and/or feature curves between two surfaces. As a result, conformal mapping can rarely be achieved. In order to consider more general surface maps, a generalization called quasicon- formal maps, or QC maps can be a more useful tool in many applications. Unlike conformal maps, which aim at eliminating angular distortions, quasiconformal maps take into account that conformal mapping is not always possible. By describing local non-conformal distortions using intrinsic Beltrami differential, one can represent any surface map with bounded non-conformal distortions. Therefore, in principle, any surface homeomorphism that occurs in practice can be represented by a quasicon- formal map. In another word, any surface homeomorphism can be characterized by the Beltrami differential. Moreover, many desired properties for surface maps can be expressed in terms of Beltrami differential. Beside the generality of quasiconformal maps, the study of quasiconformal maps with minimal distortions is of interest in its own right. Given two arbitrary surfaces, they may not have the same conformal struc- 1

COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

  • Upload
    others

  • View
    4

  • Download
    2

Embed Size (px)

Citation preview

Page 1: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTATION OF QUASICONFORMAL SURFACE MAPS USINGDISCRETE BELTRAMI FLOW

Abstract. The manipulation of surface homeomorphisms is an important aspect in 3D modelingand surface processing. Every homeomorphic surface map can be considered as a quasiconformalmap, with its local non-conformal distortion given by its Beltrami differential. As a generaliza-tion of conformal maps, quasiconformal maps are of great interest in mathematical study and realapplications. Efficient and accurate computational construction of desirable quasiconformal mapsbetween general surfaces is crucial. However, in the literature we have reviewed, all existing compu-tational works on construction of quasiconformal maps to or from a compact domain require globalparametrization onto the plane, and have difficulty to be directly applied to maps between arbitrarysurfaces. This work fills up the gap by proposing to compute quasiconformal homeomorphisms be-tween arbitrary Riemann surfaces using discrete Beltrami flow, which is a vector field correspondingto the adjustment to the intrinsic Beltrami differential of the map. The vector field is defined by apartial differential equation (PDE) in a local conformal coordinate. Based on this formulation anda composition formula, we can compute the Beltrami flow of any homeomorphism adjustment as avector field on the target domain defined from the source domain, with appropriate boundary con-ditions and correspondences. Numerical tests show that our method provides a robust and efficientway of adjusting surface homeomorphisms. It is also insensitive to surface representation and hasno limitation to the classes of surfaces that can be processed. Extensive numerical examples will beshown.

Key words. quasiconformal maps, Beltrami differential, homeomorphism adjustments, leastsquares

AMS subject classifications. 30C62, 30C65, 53A05, 53A30

1. Introduction. Surface processing is an important task in many problemssuch as 3D modeling and medical image processing. One important aspect of surfaceprocessing is how to compute or construct maps between surfaces with some desiredproperties and correspondences such as in shape deformation, surface registration,shape classification, texture mapping, mesh editing, and etc.

One common and important problem is to define and compute a good map be-tween two surfaces in different applications. One natural choice is to look for a mapwhich minimizes angular distortions, hence preserving local surface geometry. Thisled to the widely studied conformal maps both mathematically and computationally.While conformal maps preserve local geometry well by minimizing angular distortions,the conformal factor of the map can vary greatly throughout the surface, likely caus-ing significant expansions and compression of the map. Also, in image registration,one needs to enforce the correspondence of landmarks and/or feature curves betweentwo surfaces. As a result, conformal mapping can rarely be achieved.

In order to consider more general surface maps, a generalization called quasicon-formal maps, or QC maps can be a more useful tool in many applications. Unlikeconformal maps, which aim at eliminating angular distortions, quasiconformal mapstake into account that conformal mapping is not always possible. By describing localnon-conformal distortions using intrinsic Beltrami differential, one can represent anysurface map with bounded non-conformal distortions. Therefore, in principle, anysurface homeomorphism that occurs in practice can be represented by a quasicon-formal map. In another word, any surface homeomorphism can be characterized bythe Beltrami differential. Moreover, many desired properties for surface maps can beexpressed in terms of Beltrami differential. Beside the generality of quasiconformalmaps, the study of quasiconformal maps with minimal distortions is of interest in itsown right. Given two arbitrary surfaces, they may not have the same conformal struc-

1

Page 2: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

2

tures. In other words, any homeomorphism between them must be quasiconformal.The deformation between different Riemann surfaces has been studied extensively inTeichmuller quasiconformal geometry.

Computing and constructing quasiconformal maps numerically is an importantissue in practice. In reviewing the literature, which will be summarized in moredetails in the next section, we find that earlier works mainly studied the computationof quasiconformal maps between simply or multiply connected planar domains. Thecomputation of quasiconformal maps from a parametrized domain onto a surface inR3 has also been studied. However, no work was found to compute and adjust mapsbetween arbitrary surfaces in an intrinsic way. This motivates us to create suchintrinsic algorithms.

In this work, we propose an approach that can compute quasiconformal home-omorphisms between arbitrary Riemann surfaces using discrete Beltrami flow. Thekey ingredients in our approach are: (1) Define a vector field that adjust the map-ping according to the perturbation of the intrinsic Beltrami differential. In anotherword, a flow in term of Beltrami differential is translated into a flow in the mapping.Moreover, the vector field is defined by an intrinsic partial differential equation (PDE)in a local conformal coordinate. (2) Based on a composition formula, the Beltramiflow is induced on the target or source domain, with appropriate boundary conditionsand correspondences. The resulting flow is solved on a compact domain. With thistechnique, we are able to directly adjust surface maps between arbitrary compactRiemann surfaces.

The organization of this paper is as follows. In Section 2, we review previous workson computing quasiconformal maps. In Section 3, we first present the theoreticalbackground of Beltrami differential. Then we introduce the Beltrami flow and definethe vector field that adjusts the mapping according to the perturbation of the intrinsicBeltrami differential. In Section 4, we give detailed algorithms for our method surfacemap adjustments in this paper. In Section 5, we show computational results of ouralgorithms and analyze the accuracy, robustness and efficiency of our approach. Wesummarize our work in Section 6 and suggest further work in the future.

2. Previous Work. The study of quasiconformal maps is closely related tothat of conformal maps. Computational conformal geometry quickly developed afterThurston et al. [16] introduced the notion of circle packing for discretizing smoothsurfaces. Using this approach, Collins et al. [3] developed a fast algorithm for findingcircle packing metrics, which is a method of finding discrete conformal maps. Later,Yin et al. [20] introduced a method for finding conformal maps called discrete cur-vature flow, which is a discrete version of the classical Yamabe flow. As numericalmethods developed, different applications emerged. Lui et al. [10] proposed to com-pute conformal mapping of cortical surfaces preserving landmarks for further medicalanalysis. Levy et al. [14] proposed to generate texture atlas using least square errorof conformality. Conformal mapping of surfaces is closely related to certain geomet-ric problems. For example, one can compute the geodesics on surfaces by mappingthem conformally onto the plane and solve a weighted Eikonal equation. To providesome theoretical guarantee on this method, Aflalo et al. [1] proposed an algorithm tocompute conformal mappings with conformal factors as uniform as possible, and pro-vided theoretical bounds. Besides, since the conformal structure of a surface carriesinformation of its geometry, conformal maps are also being used in shape analysis.Kim et al. [8] proposed to compute intrinsic maps with surface correspondences bycombining different conformal maps.

Page 3: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 3

The computation of quasiconformal maps has also been studied for quite long andmore extensively recently. One of the earliest work is by Mastin et al. [15] using finitedifference method to compute quasiconformal maps with arbitrary Beltrami coeffi-cient from a multiply connected planar domain onto a rectangular domain with slitsremoved. Later work by He et al. [7] solved the Beltrami equation using a discretecircle packing approach. The work can be applied on planar domains or any com-pact Riemann surface whose boundary is a finite union of Jordan curves. However, itmainly served as a constructive proof for the existence of quasiconformal maps, butnot a practical algorithm. Daripa et al. [4] proposed a fast algorithm to computequasiconformal maps by Fourier transform of an integral kernel for efficient integra-tion. However, their method is also restricted to planar domains. Later, Daripa etal. [5] proposed a similar approach of evaluating certain singular integrals for comput-ing quasiconformal mappings of doubly connected domains with unknown conformalmodules. Recently, Zeng et al. [21] proposed solving Beltrami equations using discreteholomorphic differential forms. The main idea is to deform the conformal structureof the original surface by the Beltrami coefficient so that the desired map becomes aconformal map. Then techniques for computing conformal maps using discrete holo-morphic differential forms can be used. Lately, Zeng et al. [22] used a similar metricdeforming idea on their discrete Yamabe flow method to compute quasiconformalmaps on Riemann surfaces. In the last two works, the final conformal structure of thetarget domain cannot be determined at the beginning. Their method can be moreappropriately described as finding a quasiconformal parametrization with a given Bel-trami coefficient onto a domain with conformal structure to be determined. To thebest of our knowledge, no algorithm has been proposed for the computation of home-omorphisms between general domains or surfaces with a given Beltrami coefficient.

Besides the need for computing quasiconformal maps, the applications of quasi-conformal maps is also of great interest in applications such as shape deformation,surface registration, texture mapping, brain mapping, mesh editing, and etc. The goalin these applications is to find mappings with desired properties that can be expressedin terms of Beltrami differential or other quantities. For example, one may want tofind conformal maps between surfaces in surface mapping applications, because theypreserve local geometry well. Lipman et al. [9] used quasiconformal maps to generateplane deformations with less distortion. Lui et al. [13] proposed to optimize surfaceregistrations using an integral flow. Wong et al. [18] used the integral flow method forthe inpainting and refinement of diffeomorphisms by computing new diffeomorphismswith inpainted or interpolated Beltrami coefficients. The inpainted maps are smoothlyreconstructed in the missing regions and the refined maps are smoothly interpolated.However, for simply connected closed surfaces, the integral flow method has to becomputed on an unbounded domain, which is computationally inefficient. Moreover,for simply connected closed surfaces, the method requires a global parametrizationthrough a conformal map onto the plane. As a result, the method is only applicablefor computing quasiconformal maps on open or closed simply connected surfaces. Be-sides applications in texture mapping, quasiconformal maps are also widely used inmedical imaging. Lui et al. [11] proposed compressing surface registrations by storingthe Fourier coefficients of the Beltrami coefficients. Lui et al. [12] also proposed usinggeometric-matching quasiconformal maps for hippocampal surface registration. Ingeneral quasiconformal maps are very useful tools in many applications, but there isno efficient computational algorithms available that work in general situations. Thisis the goal of our work.

Page 4: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

4

3. Theoretical Background. In this section, we introduce all the theoreticalbackground of our algorithms. First we define what quasiconformal maps are and showsome related properties describing them, such as Beltrami coefficients and Beltramidifferentials. Next, we define the Beltrami flow and discuss how it is related to theadjustment of quasiconformal maps. We give an example of the Beltrami flow forthe case of Riemann sphere, where the Beltrami flow can be explicitly written as anintegral formula. After that, we generalize the Beltrami flow through an intrinsicallydefined vector field which can be characterized by a PDE in local conformal coordinate.Then we derive a composition formula for quasiconformal maps which allows oneto compute Beltrami flow of any homeomorphism adjustment as a vector field onthe target domain defined from the source domain. Finally, we introduce the Tutteembedding, which will be useful for producing an initial map for simply connectedopen and closed surfaces.

3.1. Quasiconformal Maps and Beltrami Coefficients. Quasiconformal mapsare generalizations of conformal maps. In conformal maps, the local metric betweentwo surfaces are scaled by a conformal factor. In quasiconformal maps, a boundednon-conformal distortion is allowed. As a motivating example, consider a differen-tiable function f : C → C. Write f(z) = u(x, y) +

√−1 · v(x, y), where u and v are

the real and imaginary parts of f represented as real-valued functions on R2, andz = x+

√−1 · y. f is said to be quasiconformal if it satisfies the Beltrami equation

fz = µfz, (3.1)

where fz and fz are complex derivatives defined by

∂f

∂z=

1

2(ux − vy) +

√−1

2(vx + uy) (3.2)

and

∂f

∂z=

1

2(ux + vy) +

√−1

2(vx − uy) (3.3)

In (3.1), µ : C → C is called the Beltrami coefficient. When µ ≡ 0, (3.1) becomesthe well-known Cauchy-Riemann equation and f is conformal. In general µ measuresthe local non-conformal distortion of f . Locally, f maps a disk onto an ellipse. Thedirection of maximal expansion is given by arg(µ)/2, with a factor of |fz| · (1 + |µ|).The direction of maximal shrinkage is given by arg(µ)/2 + π/2, with a factor of

|fz| · (1 − |µ|). The dilation of the ellipse is given by K = 1+|µ|1−|µ| . An illustration of

how µ affects the quasiconformal map w(z) = z + µz is shown in Figure 3.1.On maps between Riemann surfaces, Beltrami coefficients are generalized as Bel-

trami differentials and has the form µ(z)dzdz . Precisely, it means that if f : M → Nis a map between two Riemann surfaces, and w = g(z) is the representation of f inconformal local coordinates z of M and w of N , then µ(z) is the Beltrami coefficientof g. If z1 is another conformal local coordinate of M , it can be easily derived by the

chain rule that the Beltrami differential transforms as µ1(z1)dz1dz1

, where

µ1(z1) = µ(z)(dz/dz1)

(dz/dz1). (3.4)

Hence, the Beltrami differential can be defined intrinsically on the surface. From nowon, we may use Beltrami differential and Beltrami coefficient interchangeably when

Page 5: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 5

w(z) = z + µz

Dilation: K =1+|µ|1 |µ|

w

1+ |µ|1 |µ|argµ/ 2

(argµ + )/ 2

Re(z ) Re(w )

Im(z ) Im(w )

Fig. 3.1. How the Beltrami coefficient µ affects the quasiconformal map w(z) = z+µz. A diskfrom the source domain on the left (z-plane) is mapped onto an ellipse in the target domain on theright (w-plane) with a dilation given by K.

there is no confusion, because representing the Beltrami differential often requiresthe specification of a conformal local coordinate. For the ease of understanding, onemay simply assume that all maps are between complex planes, where the definitionof Beltrami coefficient is clear. In fact, in our algorithm, we treat each face of thetriangular mesh we consider as a coordinate patch and store the Beltrami differentialas the Beltrami coefficient with respect to such coordinate system on each face.

In order to compute the proper adjustment needed to obtain a new surface mapcorresponding to a perturbed Beltrami coefficient, we introduce the composition for-mula of Beltrami coefficients. We denote as fµ the function satisfying the Beltramiequation with Beltrami coefficient µ. Let µ, σ and τ be the Beltrami coefficients ofquasiconformal maps fµ, fσ and fτ , with fτ = fσ ◦(fµ)−1. The composition formulafor τ is given by

τ =

(σ − µ

1− µσ

1

θ

)◦ (fµ)−1, (3.5)

where θ = pp and p = ∂

∂z fµ(z). A proof of this formula can be found in [2]. With this

formula, we can compute the Beltrami coefficient τ required so that after composingwith fµ, we obtain a map with a Beltrami coefficient σ.

3.2. Finding the Surface Map with a Given Beltrami Differential. Inthis subsection, we illustrate how we can find the surface map with a given Beltramidifferential. We first look at how this problem can be solved for a sphere, which canbe parametrized by the extended complex plane C, defined as the complex plane Cplus a point at infinity. Motivated by this example, we define what we called theBeltrami flow for adjusting maps between arbitrary Riemann surfaces.

Consider solving the Beltrami equation on the extended complex plane C. It isknown as the generalized Riemann mapping theorem that given a Beltrami coefficientµ : C → C with ∥µ∥∞ < 1, there exist a unique homeomorphism f of C with f(0) = 0,f(1) = 1 and f(∞) = ∞ satisfying the Beltrami equation. Theoretically, the solutioncan be computed using the following perturbation formula.

Theorem 3.1. Let µt be the Beltrami coefficient µt(z) = µ(z)+tν(z) and f = fµ.Then fµt(w) = f(w) + tf(w) +O(t2), where

f(w) = − 1

π

∫∫ν(z)R(f(z), f(w))(fz(z))

2 dx dy, (3.6)

Page 6: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

6

with

R(z, w) :=1

z − w− w

z − 1+w − 1

z. (3.7)

We refer interested reader to [2] for a proof of the theorem. Using this formula, onemay start from the identity map Id with µ ≡ 0 and perturb its Beltrami coefficient ina small step at a time until the map with the required Beltrami coefficient is obtained.

Motivated by this theorem, it is observed that a flow f(w) can be defined andcomputed to adjust the Beltrami coefficient of a map between two surfaces, in thiscase, the Riemann sphere. If f is the identity map, we can define the flow V as thefollowing function:

V (z) := Pν(z) := − 1

π

∫∫ν(ζ)

(1

ζ − z+z − 1

ζ− z

ζ − 1

)dξ dη. (3.8)

In practice, computing the integral for V over the whole complex plane is infeasiblebecause it is not a compact domain. However, in [6], it is shown that the key propertyof V is that ∂

∂zV (z) = ν(z), which is equivalent to saying that the operator P inverts

the ∂-derivative. Therefore, if we can compute the flow properly by solving thisequation on a compact domain, we will be able to adjust the map between arbitrarycompact Riemann surfaces. We justify this claim for the complex plane C using thefollowing theorem. Similar result follows for arbitrary surface maps. Note that unlessotherwise specified, in all discussions from now on, all Beltrami coefficients µ andadjustments ν are only required to be measurable, and all PDEs are only requiredto be satisfied weakly. In practice, one may assume all Beltrami coefficients µ andadjustments ν to be piecewise constant on each face of triangular meshes, and allsurface maps to be piecewise linear.

Theorem 3.2. Let id : C → C be the identity map of the complex plane, withBeltrami coefficient µ ≡ 0. If V is a complex-valued function on C such that

∂zV (z) = ν(z) (3.9)

for a complex-valued function ν. Let ft(z) = id(z) + tV (z) and µt be the Beltramicoefficient of ft. Then for every z ∈ C and small t > 0, µt satisfies

µt(z) = tν(z) +O(t2). (3.10)

Proof. It suffices to show that for all z ∈ C, the Beltrami coefficient of ft at zhas a derivative equal to ν(z). For our application, it is sufficient to assume that Vis C1-continuous and that ∂

∂zV exists and is finite near z. Then we have

∂ft∂z

=∂f

∂z+ t

∂V

∂z= tν (3.11)

and

∂ft∂z

=∂f

∂z+ t

∂V

∂z= 1 + tVz. (3.12)

Then µt, the Beltrami coefficient of ft, is given by

µt = tν/(1 + tVz). (3.13)

Page 7: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 7

Differentiating µt with respect to t and taking its value at t = 0, we have

∂µt∂t

∣∣∣t=0

=(1 + tVz)ν − tνVz

(1 + tVz)2

∣∣∣t=0

= ν. (3.14)

Therefore µt satisfies (3.10) as required.To formulate (3.9) on an arbitrary Riemann surface, we generalize the definition

of V as a vector field on the surface and call it a Beltrami flow.Definition 3.3. Let ν(z)dzdz be a Beltrami differential on a surface M . We

define a Beltrami flow of M with respect to ν to be the vector field V ∂∂z on M if

under conformal local coordinates, we have

∂zV (z) = ν(z). (3.15)

With the result of Theorem 3.1, an example of Beltrami flow can be given for theextended complex plane C, which is homeomorphic to the Riemann sphere. Withoutloss of generality, by changing the 3 points fixed by the homeomorphism (0, 1 and ∞in Theorem 3.1) to 0, 1 and −1, for any Beltrami coefficient µ(z), there is a uniquehomeomorphism f : C → C with Beltrami coefficient µ(z) and satisfies f(0) = 0,f(1) = 1 and f(−1) = −1. As such, the Beltrami flow V (z) with respect to anyBeltrami coefficient adjustment ν(z) satisfies (3.15) and V (0) = V (1) = V (−1) = 0(since 0, 1 and −1 are fixed). Since V (z) is precisely given by (3.8), we have thefollowing example of a Beltrami flow:

Example 3.4. Define V (z) as in (3.8). Then V (z) is the unique Beltrami flow

on the unit sphere with respect to the Beltrami differential ν(z)dzdz satisfyig V (0) = 0,V (1) = 0 and V (−1) = 0, where the whole sphere is parametrized by a single conformalcoordinate patch using the standard stereographic projection.

From this example, it can be seen that the Beltrami flow or the quasiconformalmap with respect to a certain Beltrami differential may not be unique unless one ormore points are fixed. It is because there can be conformal diffeomorphism of thesurface that can be flowed from the identity map, such as the Mobius transformationfor a sphere. In other words, there can be flows from the identity map preserving theBeltrami differential, therefore causing the non-uniqueness. As we will explain, usingour least square approach, we can easily overcome this problem.

Another key idea in our approach is to define a proper vector field and flowintrinsically on the source or the target surfaces using a composition formula. In thisway, we avoid the use of any global parametrization and allow us to compute mapsfor any compact domains directly. The idea is to compose a surface map f : M →N between Riemann surfaces M and N with a homeomorphism of N induced bya Beltrami flow with respect to some Beltrami differential ν, so that the Beltramidifferential of f is adjusted in a specific way with the composition. The appropriate νcan be easily computed from the composition formula (3.5) to achieve the map witha desired Beltrami differential. To simplify the discussion, we assume that there is aglobal parametrization on every Riemann surface, although derivation of the formulacan be carried out in any local conformal coordinate in the same way. To adjust theBeltrami coefficient of a surface map f : M → N between two Riemann surfaces, ourapproach is to look for a homeomorphism g : N → N such that f ◦ g has the desiredBeltrami coefficient. Suppose that µ(z) is the Beltrami coefficient of f and our targetBeltrami coefficient is σ(z, t) = µ(z) + ν(z)t, where ν(z) is some adjustment to µ.

Page 8: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

8

Using the composition formula (3.5), the required Beltrami coefficient τ(z, t) of g isgiven by

τ(z, t) =

(νt

1− µ(µ+ νt)

1

θ

)◦ (fµ)−1. (3.16)

To compute the flow we need to construct g, we differentiate τ(z, t) with respect to tand obtain

∂τ

∂t(z, t)|t=0 =

1− |µ|21

θ

)◦ (fµ)−1. (3.17)

Define ρ to be the derivative above. The problem of adjusting the Beltrami differentialof f becomes the problem of computing a Beltrami flow of N with respect to ρ. Weconcretely express this into the following key theorem:

Theorem 3.5. Suppose f : M → N is a surface map between two Riemannsurfaces (parametrizable with one coordinate patch) with Beltrami coefficient µ(z).Define ρ to be the derivative in (3.17). Suppose V is a Beltrami flow on N withrespect to ρ, and g : N → N is a homeomorphism induced by V , i.e.,

g(z, t) := z + V (z)t. (3.18)

Then for small t > 0, g(f(z), t) is a surface map with Beltrami coefficient

σ(z, t) = µ(z) + ν(z)t+O(t2). (3.19)

Note that ideally, one wants the O(t2) to be small such that σ(z, 1) is close toµ(z) + ν(z), the required Beltrami coefficient. In our algorithms, we choose t ∈ (0, 1]such that it is as close to 1 as possible and makes σ(z, t)− µ(z)− ν(z)t smaller in L2

sense. As we approaches the desired Beltrami coefficient, O(t2) becomes negligibleas ν(z) becomes closer and closer to 0. Therefore, our algorithms converges despitechoosing t = 1 whenever possible.

4. Numerical Algorithms. In this section, we explain our numerical algo-rithms in detail for the computation of arbitrary surface maps. Our main focus ison the computation of discrete Beltrami flows on surfaces represented by triangularmeshes, where the vector field corresponding to a Beltrami flow is computed using aleast square approach. We first give a brief review of Tutte embedding, which can beused to create an initial map for simply connected surfaces with or without bound-ary. Then we discuss the computation of Beltrami flows for simply connected surfacewith boundary, which can be parametrized by a single coordinate patch. Finally, wegeneralize to other cases where more than one coordinate patches are required, whichinclude simply connected surfaces and surfaces of higher genus.

4.1. Initialization by Tutte Embedding for Simply Connected Surfaces.To compute a surface map f : M → N between arbitrary compact Riemann surfaceswith a desired Beltrami differential, our approach is to first start with an arbitraryinitial map f0 : M → N , and then adjust the Beltrami differential of f0 by composingit with a map g : N → N , where g is induced by a Beltrami flow with respect toa correct Beltrami differential given by the composition formula (3.5). For the easeof discussion, we may assume that f0 is a homeomorphism, or that it is onto and

Page 9: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 9

non-overlapping.1 Our algorithms also converge faster when it is initialized using ahomeomorphism.

For simply connected surfaces with boundary, we use the well-known Tutte em-bedding [17], which is widely used for mesh embedding and initialization problems.Consider the triangular mesh of the surface represented by a graph G = ⟨V,E, F ⟩, andits boundary ∂G to be embedded in the plane as a (not necessarily strictly) convexpolygon, the x and y coordinates of the embedding can be obtained by solving thefollowing systems of linear equations:

∑vj∈N(vi)

1

|N(vi)|xj = xi, i = 1, . . . , |V | − |∂G|, (4.1)

∑vj∈N(vi)

1

|N(vi)|yj = yi, i = 1, . . . , |V | − |∂G|, (4.2)

where {v1, . . . , v|V |−|∂G|} are all the interior points of G, N(vi) is the set of neighborsof vi, and |N(vi)| is the number of neighbors of vi. Under Tutte embedding, each pointof a graph is mapped onto the plane such that it is the barycenter of its neighbors.The mapped graph is always planar using this method and the mapping is easilysolved by the above linear systems. For simply connected closed surfaces, one mayfirst remove a triangle on the triangular mesh and apply Tutte embedding to get aplanar graph. Then the graph can be easily mapped onto a sphere by stereographicprojection from a plane, with the triangle put back to fill the hole. For other types ofsurfaces, one may first create an arbitrary map. As the results show, our algorithmscould work even when the initial map is overlapping.

4.2. Computing Beltrami Flows Using a Least Square Method. Thekey step in computing Beltrami flows is to solve the vector field V (z). We use leastsquare method to solve the first order PDE system (3.9) for planar domains or (3.15)on general Riemann surfaces rather than solving a second order PDE for the realor imaginary component separately. Advantages of using this approach include (1)numerical approximation of lower order differentials, (2) no subtle boundary condi-tions coupling the real and imaginary part when computing quasiconformal maps fordomains with boundary, which will be discussed in more details later, (3) providing agood approximation when the exact solution may not exist, e.g. when there are toomany constraints, or difficult to approximate discretely in practice. In this subsection,we consider the problem of computing a Beltrami flow to adjust a map between plan-ner domains. Once we establish the problem for planar domains, it can be directlygeneralized to arbitrary surface maps.

In order to compute a Beltrami flow for a Riemann surface with respect tosome Beltrami differential ν, consider solving the problem on a Riemann surfaceS parametrized by a single conformal coordinate patch D ⊂ C, and ν is the adjust-ment to the Beltrami coefficient on D. Let ψ : S → D be the parametrization. Thenthe Beltrami flow can be defined as a complex-valued function on D that satisfies∂∂zV (z) = ν(z). Suppose ν(z) = a(z) +

√−1 · b(z) and V (z) = u(z) +

√−1 · v(z),

where a, b and u, v are real-valued functions representing the real and imaginary parts

1Otherwise the Beltrami flow inducing g will be a vector field on N with source domain M , whichcan be handled similarly but makes the notation more cumbersome.

Page 10: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

10

of ν and V respectively, then u, v satisfies the system

ux − vy = 2a,

vx + uy = 2b. (4.3)

Using a least square approach, we minimize a least square integral of ∂∂zV (z)−ν(z)

weighted according to the area of the original patch S. Since the real and imaginaryparts are given by the above system, the energy to minimize becomes∫

S

{[(ux − vy − 2a)2 + (vx + uy − 2b)2

]◦ ψ

}dA. (4.4)

The original problem of finding V becomes a standard least square problem, whichcan be solved easily. When V is computed numerically on a triangular mesh, we callthe discrete flow computed using the above method a discrete Beltrami flow.

When the surface S cannot be parametrized using a single patch, we can write theleast square using a number of patches. SupposeM is the union of ofN1, N2, . . . , Nk ⊂M with disjoint interior and each can be parametrized by ψ1, ψ2, . . . , ψk onto closedsimply connected domains D1, D2, . . . , Dk ⊂ C respectively, and ν1, ν2, . . . , νk are theadjustments to the Beltrami coefficients on D1, D2, . . . , Dk respectively. Suppose foreach i = 1, 2, . . . , k, νi(z) = ai(z)+

√−1 · bi(z) and Vi(z) = ui(z)+

√−1 · vi(z), where

ai’s, bi’s and ui’s, vi’s are real-valued functions representing the real and imaginaryparts of νi’s and Vi’s respectively. The least square energy (4.4) generalizes as

k∑i=1

∫Ni

{[(uix − viy − 2ai)

2 + (vix + uiy − 2bi)2]◦ ψi

}dA. (4.5)

If ∂Di and ∂Dj intersect, then for all p ∈ ∂Di ∩ ∂Di, Vi and Vj have to satisfy acompatibility condition given by

Vj(ψj(p)) = Jij(p)Vi(ψi(p)), (4.6)

where Jij(p) is the Jacobian matrix of ψj ◦ ψ−1i , and Vi, Vj are considered as vectors

in R2. With these compatibility conditions, (4.5) becomes a constrained least squareproblem. This is helpful when one already has a parametrization for the surface. Ingeneral, all least square problems above can be formulated as an intrinsic integral onthe surface, as we show in the later subsections.

When the surface considered has boundaries, one restricts the direction of flow tobe along the tangential direction of the boundary. In this case, the above problemsalso become constrained least square problems. Sometimes it is also necessary to fixthe flow to be 0 at a few points. For example, as shown in Example 3.4, 3 points haveto be fixed for the case of a sphere. It is also possible to enforce more constraints asrequired, making the least square approach more flexible.

4.3. Discretization of Beltrami Differentials. On a general Riemann sur-face, a Beltrami differential is a (1,−1)-tensor specifying the direction and magnitudeof the distortion. The Beltrami differential can be written as a Beltrami coefficientonly if a local coordinate is given. As our algorithms work on discrete triangularmeshes, in this subsection, we illustrate how we can represent Beltrami differentialsas Beltrami coefficient on each face of a triangular mesh.

On each face of a triangular mesh determined by 3 points p1, p2 and p3, a naturalway to specify a local coordinate system is to identify −−→p1p2 as the positive real direction

Page 11: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 11

and the direction perpendicular to it as the positive imaginary direction. For example,if p1, p2 and p3 are mapped to q1, q2 and q3 respectively, we may map p1, p2, p3conformally to (0, 0), (a1, 0), (a2, a3) and q1, q2, q3 conformally to (0, 0), (b1, 0),(b2, b3). Denote this linear map from R2 to R2 as f(z) = u(x, y) +

√−1 · v(x, y),

where z = x+√−1 · y. Then we have(

ux uyvx vy

)(a1 a20 a3

)=

(b1 b20 b3

). (4.7)

Therefore, the constants ux, uy, vx and vy can be solved as(ux uyvx vy

)=

(b1 b20 b3

)(a1 a20 a3

)−1

. (4.8)

The Beltrami coefficient of the face can then be computed using the formula

µ =ux − vy +

√−1 · (vx + uy)

ux + vy +√−1 · (vx − uy)

. (4.9)

In our algorithms, all Beltrami differentials are represented as a Beltrami coeffi-cient on each face of a triangular mesh in the form described above.

4.4. Computing Discrete Beltrami Flows on Simply Connected Sur-faces with Boundary. In the simplest case, the surface M to be considered is asimply connected open surface, where only a single patch is necessary. We may mapM conformally onto a domain D ⊂ R2. We may also assume that the required Bel-trami coefficient ν is specified on D, i.e., ν is a complex-valued function on D. Thenthe problem reduces to computing the discrete Beltrami flow V on D such that

∂zV (z) = ν(z). (4.10)

As shown in Subsection 4.2, if we write V (z) = u(z) +√−1 · v(z), and ν(z) =

a(z) +√−1 · b(z), then the above PDE can be solved by minimizing the energy

functional (4.4) ∫S

{[(ux − vy − 2a)2 + (vx + uy − 2b)2

]◦ ψ

}dA. (4.11)

In the Appendix, a detailed description is given on how to formulate a least squareproblem on a triangular mesh for solving for u and v. As discussed in Subsection 4.2,along the boundary, u and v is restricted by a linear relation to keep the flow alongthe tangential direction of the boundary. Once the discrete Beltrami flow V is solved,the perturbed map

f(z, t) = z + tV (z) (4.12)

has the desired Beltrami coefficient µt(z) = tν(z) for small t > 0. Then we chooset ∈ (0, 1] such that it is as close to 1 as possible and decreases σ(z, t)−µ(z)− ν(z)t inL2 sense and adjust f according to the flow V and time step t. After the adjustment,we project the boundary points back onto the boundary and interpolate the projectionmovement to adjust the interior points. This completes one step of adjustment usingdiscrete Beltrami flow.

Page 12: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

12

4.5. Computing Discrete Beltrami Flow on General Surfaces. For gen-eral Riemann surfaces, since there may not be a global conformal parametrizationas above, we have to model V as a vector field lying on the tangent plane at eachpoint of the surface. To compute the discrete Beltrami flow on general surfaces, weassume that we are given a triangular mesh {P, T} with the desired discrete Beltramidifferential µ of the quasiconformal map ϕ to be computed onto a surface S. SupposeP = {p1, . . . , pn} ⊂ R3 and T = {[p11, p12, p13], . . . , [pm1, pm2, pm3]}. Assume thatinitially ϕ maps pi to qi := ϕ(pi) ∈ S. We need to adjust ϕ by a vector field V on Swith P as its domain so that ϕ(pi) can be perturbed to ϕ(pi) + αV (pi), where α isthe step size. Since there is no standard parametrization of tangent spaces in S, wecompute V discretely by specifying the displacement ui, vi for each i with respect toa positively oriented basis of the tangent space at qi. Denote the outward normal atqi by ni for i = 1, 2, . . . , n. For each i, we also compute ui, vi such that {ni,ui,vi}is a positively oriented orthonormal basis. Then the required vector field V becomes

V (pi) = uiui + vivi, (4.13)

for i = 1, 2, . . . , n.Note that for each point pi in P , V (pi) lies on the tangent plane at ϕ(pi). To

generalize the least square energy (4.4), one integrates on each face of the triangularmesh {ϕ(P ), T} instead of on the plane. For each triangle Ti = [pi1, pi2, pi3], we mapthe image ϕ(Ti) = [ϕ(pi1), ϕ(pi2), ϕ(pi3)] of it isometrically onto an (r, s)-coordinateplane local to the triangle using a conformal map ψi. With this coordinate system, weimmediately have a basis {ri, si} ⊂ R3 spanning the plane of ϕ(Ti). Then we projectV onto the face ϕ(Ti) to obtain the corresponding value of V in terms of ri and si,i.e.,

V (pij) = rijri + sijsi, (4.14)

for i = 1, 2, . . . , n and j = 1, 2, 3. On triangle Ti, by writing a point as an (x, y)-coordinate and its image point as an (r, s)-coordinate, V may be regarded as a linearmap in R2. Write V (x, y) = r(x, y) +

√−1 · s(x, y). Then the integrand in (4.4) can

be generalized as

m∑i=1

∫∫ψi(Ti)

(rx − sy − 2a)2 + (rx + sy − 2b)2, (4.15)

where the desired Beltrami differential satisfied by V is written as a Beltrami coeffi-cient on triangle ψi(Ti) as a+

√−1 · b ∈ C.

It is obvious that on every image ψ(Ti), the derivatives rx, ry, sx and sy areconstant and can be expressed as a linear expression of ui1, ui2, ui3 and vi1, vi2, vi3.Therefore the energy functional for the least square problem is quadratic in termsui’s and vi’s. A detailed description is given in the Appendix for the precise leastsquare problem to solve. For boundary points pi, we may choose ui to point in thetangential direction of the boundary and constrain vi to be 0 in the quadratic mini-mization problem. Then the resulting flow is automatically a valid flow for adjustinghomeomorphisms on S. We choose the time step t in a way similar to that of simplyconnected surfaces with boundary discussed in the previous subsection. After adjust-ing the surface map according to V , we project the resulting points back onto S andthe resulting boundary points back on ∂S. This completes one step of adjustmentusing discrete Beltrami flow.

Page 13: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 13

Level Number of Faces Number of Steps Error (sup-norm) Error (L2-norm)0 4 4 0.2000 0.08001 16 12 0.2795 0.08132 64 12 0.2251 0.04583 256 13 0.1767 0.01764 1024 12 0.1060 0.00525 4096 10 0.0582 0.00136 16384 9 0.0306 0.341× 10−4

7 65536 9 0.0157 0.855× 10−5

Table 5.1Results for computing a diffeomorphism of the unit disk with µ(z) = 0.6z with tolerance 10−8.

5. Numerical Tests. In this section, we present various numerical tests todemonstrate efficiency, accuracy and robustness of our proposed method. Our com-putations are all implemented in MATLAB using vectorized scripts on a quad-coremobile system with 2.6GHz CPU (boosts up to 3.6GHz) and 8GB of 1600GHz mem-ory.

5.1. Validation Using Synthetic Examples. In this subsection, we validateour algorithm by computing the solution of a given Beltrami equation and showconvergence as the mesh size gets refined.

We first test our algorithm by constructing diffeomorphisms with various Beltramicoefficients on the unit disk D = {x +

√−1 · y|x2 + y2 <= 1}. It is known that if

we fix 0 and 1, i.e. enforcing the constraint that f(0) = 0 and f(1) = 1, then thesolution of the Beltrami coefficient for an arbitrary µ with ∥µ∥∞ < 1 is unique. Toapply discrete Beltrami flow algorithm for simply connected surfaces with boundary,we initialize the map with the identity map of the disk. In each step, we computethe discrete Beltrami flow with the required Beltrami coefficient fixing 0 and 1, wherethe flow is constrained in tangential direction along the boundary. The time step tis chosen in [0, 1] using a method analogous to bisection such that it is as close to1 as possible without causing overlapping. Then the map is updated by the flow toapproximate the map with the target Beltrami coefficient. The convergence criterionwas determined by if the sup-norm of the adjustment of the surface map in R2 issmaller than 10−8.

We test the accuracy of the algorithm by computing the diffeomorphism on theunit disk with µ(z) = 0.6z. The complexity of the triangular meshes for the disk variesfrom level 0 (4 faces) to level 7 (47+1 = 65536 faces), where each higher complexitylevel is obtained by subdividing the triangular mesh of the previous level. The numberof steps used and the error in sup-norm and L2-norm is shown in Table 5.1. We observethat except at level 0, the number of steps required tends to decrease mildly as themesh complexity grows. This could be attributed to the more accurate computed flowas the mesh becomes more complex, decreasing the number of steps required.

A plot of the logarithm of the sup-norm and L2-norm errors against the logarithmof the number of faces is shown in Figure 5.1. As can be seen, both errors decreaseas the mesh is refined. Since the map in some regions is highly distorted, the sup-norm will be larger in those regions. An adaptive mesh will produce better results.However, the numerical result shows that the convergence in L2-norm is second order.A plot of the resulting diffeomorphism for 65536 faces is shown in Figure 5.2.

Similar results can be observed for computing diffeomorphisms of the unit sphere.In this test, we compute a diffeomorphism with µ(z) ≡ 0.3 +

√−1 · 0.3, where z

Page 14: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

14

0 1 2 3 4 5 6 7−10

−9

−8

−7

−6

−5

−4

−3

−2

−1

Complexity

Err

or

Plot of log of sup−norm and L2−norm errors against complexity

Fig. 5.1. The sup-norm (red) and L2-norm (blue) error of the discrete Beltrami flow methodon the unit disk.

(a) (b)

Fig. 5.2. The result of our algorithm for finding a diffeomorphism of the unit disk with µ(z) =0.6z and keeping 0 and 1 fixed. (a) shows a unit disk with a checkerboard pattern. (b) shows howthe original checkerboard pattern is mapped onto the unit disk under the computed diffeomorphism.

is the parametrization by stereographic projection of the sphere onto C. We showconvergence for triangular meshes on a sphere with complexity from level 0 (8 faces)to level 6 (8 · 46 = 32768 faces), where each higher complexity level is obtained bymesh refinement of the previous level. The convergence criterion was determined byif the sup-norm of the adjustment of the surface map in R2 is smaller than 10−5. Thenumber of steps required, and the error in L2-norm is shown in Table 5.2. Again, weobserve that except at level 0, the number of steps required tends to decrease mildlyas the mesh complexity grows. This could also be attributed to the more accuratecomputed flow as the mesh becomes more complex, decreasing the number of stepsrequired.

A plot of the logarithm of the L2-norm error against the logarithm of the numberof faces is shown in Figure 5.3, which also demonstrates a second order convergencein L2-norm. A plot of the resulting diffeomorphism for 32768 faces is shown in Figure5.4.

5.2. Simply Connected General Surfaces. Since using Beltrami flow needsto start from an initial map, we demonstrate that our numerical algorithm is quiterobust with respect to the initial map. In Figure 5.5 and Figure 5.6, we computed theconformal map of a fandisk and a hippocampus mesh by following the Beltrami flow

Page 15: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 15

Level Number of Faces Number of Steps Error (L2-norm)0 8 9 0.12461 32 13 0.38922 128 14 0.26923 512 14 0.11454 2048 12 0.04125 8192 11 0.01386 32768 10 0.0044

Table 5.2Results for computing a diffeomorphism of the unit sphere with µ(z) ≡ 0.3 +

√−1 · 0.3 with

tolerance 10−5.

0 1 2 3 4 5 6−5.5

−5

−4.5

−4

−3.5

−3

−2.5

−2

−1.5

−1

−0.5

Complexity

Err

or

Plot of log of L2−norm error against complexity

Fig. 5.3. The L2-norm error of the discrete Beltrami flow algorithm on the unit sphere. Theerror decreases steadily as complexity increases, justifying the O(h2) error bound of our algorithm.

that minimizes∫|µ|2. To get the initial map, we simply projecting them onto a unit

sphere centered at an interior point. For both cases, the magnitude of initial Beltramicoefficients are very close to 1 and even bigger than 1 at some places, indicating strongdistortion and even overlapping of the initial maps. Using our algorithm, both of thesemeshes converge to the desired conformal maps.

In general, convergence for the Beltrami flow may not be always possible due tothe highly non-convex nature of the least square energy in terms of the map. However,in our tests, our algorithm always converges if the initial map from the mesh onto thetarget domain is not overlapping. Fortunately, Tutte embedding [17] can be used toproduce a one-to-one map from any triangulated surface to the complex plane, whichcan be used as the initial map when necessary. To demonstrate the effectiveness ofthis initialization, we show the examples of a fish and a cortical surface in Figure 5.7and Figure 5.8 respectively, where convergence was not achieved if the initial mapswere simple projections.

5.3. Multiply Connected Domains and Surface Maps with Hard Con-straints. Our algorithms also work on multiply connected surfaces with more thanone boundary. Just like the Beltrami flow needs to lie on the tangent plane of thetarget surface, when we compute a Beltrami flow for a multiply connected surface, werestrict the direction of the flow to the direction of the tangent line at a point of theboundary. As such, the least square problem becomes a constrained energy minimiza-tion problem, whose linear system is still sparse and easy to solve. In Figure 5.9(b),a homemorphism of an annulus with inner radius 0.4 and outer radius 1, centered at

Page 16: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

16

(a) (b)

Fig. 5.4. The result of our algorithm for finding a diffeomorphism of the unit sphere withµ(z) = 0.3 +

√−1 · 0.3 and keeping 0, 1 and ∞ (as in stereographic projection) fixed. (a) shows a

unit sphere with a color disk pattern. (b) shows how the original color disk pattern is mapped ontothe unit sphere under the computed diffeomorphism.

(a) (b) (c)

Fig. 5.5. Computing a conformal map from a fandisk onto the unit sphere. (a) shows theoriginal fandisk mesh. (b) shows the overlapping initial map constructed by projecting vertices ofthe mesh onto a unit disk centered at an interior point of the mesh. (c) shows the final map afterthe Beltrami flow algorithm is used to minimize the Beltrami coefficient in least square sense. Allmeshes are textured consistently with correspondence from a stereographic projection of the unitsphere in (c).

0, is computed with Beltrami coefficient µ(z) = 0.6z3 and keeping the point z = 1fixed. As can be observed, our algorithm is able to keep its boundaries fixed and finda homemorphism with the required distortion.

Using the same technique, our algorithm also works on surface maps with hardconstraints. For example, we may force some curves on the source surface to bemapped onto some fixed curves on the target surface and adjust the map fixing theseconstraints. This is demonstrated in Figure 5.10 by mapping the Stanford Bunnyonto a sphere with a single curve constraint. To get an initial map for this example,observe that if we cut open the Stanford Bunny along the curve, the surface becomesa simply connected open surface and can be easily mapped onto a disk by Tutteembedding. After that, it can be further mapped onto a sphere with the 2 sides of thecut identified along a fixed curve. We test our algorithm by computing a map witha minimized L2-norm of µ while keeping a single curve fixed. The resulting map issmooth and shows very low angular distortions. The curve on Bunny is also mappedonto the desired target curve.

We can also compute a mapping with more than one curve constraint. In medical

Page 17: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 17

(a) (b) (c)

Fig. 5.6. Computing a conformal map from a hippocampus onto the unit sphere. (a) shows theoriginal hippocampal mesh. (b) shows the overlapping initial map constructed by projecting verticesof the mesh onto a unit disk centered at an interior point of the mesh. (c) shows the final map afterthe Beltrami flow algorithm is used to minimize the Beltrami coefficient in the least square sense.All meshes are textured consistently with correspondence from a stereographic projection of the unitsphere in (c).

(a) (b) (c)

Fig. 5.7. Computing a conformal map from a fish onto the unit sphere using discrete Beltramiflow with Tutte embedding. (a) shows the original fish mesh. (b) shows the initialization by Tutteembedding. (c) shows the final map after the Beltrami flow algorithm is used to minimize theBeltrami coefficient in least square sense. All meshes are textured consistently with correspondencefrom a stereographic projection of the unit sphere in (c).

imaging, it is often necessary to register the same class of surfaces (e.g. corticalsurfaces) onto a canonical domain, where feature curves are mapped onto consistentlocations. In this example, we label 3 feature curves on a cortical surface, as shown inFigure 5.11(a), which are to be mapped onto 3 geodesics on the sphere. Initially, thecortical surface is mapped onto the sphere using Tutte’s embedding. As seen in Figure5.11(b), the feature curves are not mapped onto geodesics. Using our algorithm, wecompute a flow that minimizes the L2-norm of the Beltrami differential. At the sametime, we enforce the vector field along the feature curves to point towards the targetgeodesics. When our algorithm converges, the feature curves are all mapped ontogeodesics, as can be seen in Figure 5.11(c), with the distortion spread evenly overthe whole sphere. This shows that our algorithm can easily handle more complicatedconstraints without any modifications.

5.4. Results for General Meshes with Non-Trivial Topology. In this sub-section, we test our algorithm on general meshes with non-trivial topology to demon-strate the extra procedures needed using genus one examples. The same procedurescan be applied to surfaces with higher genus.

Page 18: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

18

(a) (b) (c)

Fig. 5.8. Computing a conformal map from a cortical surface onto the unit sphere using discreteBeltrami flow with Tutte embedding. (a) shows the original cortical surface mesh. (b) shows theinitialization by Tutte embedding. (c) shows the final map after the Beltrami flow algorithm is usedto minimize the Beltrami coefficient in the least square sense. All meshes are textured consistentlywith correspondence from a stereographic projection of the unit sphere in (c).

(a) (b)

Fig. 5.9. The result of our algorithm for finding a diffeomorphism of an annulus with µ(z) =0.6z3 and keeping the point z = 1 fixed. (a) shows an annulus with inner radius 0.4, outer radius1, centered at 0 and textured with a checkerboard pattern. (b) shows how the original checkerboardpattern is mapped onto the annulus under the computed diffeomorphism.

The main procedure involved for two triangulated surfaces is the computation ofan initial bijective map from the source mesh onto the target mesh, based on Tutteembedding, and later evolved bijective maps, based on discrete Beltrami flow, fromthe target mesh onto itself. In the general discrete setting, vertices are most likelymapped inside triangles of the mesh. To construct an initial bijective map for genusone surfaces, we can construct 2 loops across a particular vertex to cut the mesh intoan open surface. Then Tutte embedding can be used to map each surface onto [0, 1]2.Once the embeddings for both surfaces are computed, a correspondence between thesource and target meshes can be established and the intermediate mapping can bediscarded. For two triangulated surfaces with genus g > 1, one can construct an initialmap by mapping each surface onto a fundamental polygon in the standard hyperbolicdisc after cutting the surface open along 2g homotopically different loops at a vertexfollowing the procedure proposed in [19]. To explicitly represent the correspondenceof the two meshes, we need to find the mapped locations of the vertices of the sourcemesh, e.g., inside which triangle of the target mesh. For the initial map, after eachtriangulated surface is mapped to [0, 1]2, we first perform a search using a kd-treeto determine a set of closest neighboring vertices of the target mesh for each source

Page 19: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 19

(a) (b)

(c) (d) (e)

Fig. 5.10. Computing a map with a minimized L2-norm of µ from the Stanford Bunny ontoa sphere, with a single curve constraint. (a) shows the Stanford Bunny with a curve marked. (b)shows a sphere with the target curve constraint. (c) shows the Stanford Bunny textured accordingto the final map. (d) shows the initial map constructed by a modified Tutte embedding onto thesphere. (e) shows the final map after the Beltrami flow algorithm is used to minimize the Beltramicoefficient in the least square sense. All meshes are textured consistently with correspondence froma stereographic projection of the unit sphere in (e).

(a) (b) (c)

Fig. 5.11. Computing a map with a minimized L2-norm of µ from a cortical surface onto asphere, with 3 curve constraints. (a) shows the cortical surface with 3 feature curves marked. (b)shows an initial map constructed by Tutte embedding. (c) shows the final map after the Beltramiflow algorithm is used to minimize the Beltrami coefficient in the least square sense. The featurecurves are now mapped onto geodesics by enforcing the direction of their flows.

vertex, then perform a linear search on the set of their neighboring triangles of thetarget surface to locate the triangle containing the source vertex. Then the locationof the source vertex is represented by its barycentric coordinates in the triangle. Thetangent and normal vectors at the mapped source vertex are then computed from thetriangle. After one step of Beltrami flow, each mapped vertex of the source mesh hasevolved to a new location in the tangent plane of the target mesh, we then project the

Page 20: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

20

(a) (b) (c)

Fig. 5.12. Computing a map minimizing the L3-norm of the Beltrami differential between twotriangulated surfaces: the kitten and a modified torus. (a) shows the kitten surface with a conformaltexture. (b) shows the initial map of the kitten onto the modified torus. (c) shows the optimizedmap of the kitten onto the modified torus. Conformality is well restored by the discrete Beltramiflow algorithm.

new location to the original target mesh. This can be done using the same procedureas before by projecting all the neighboring triangles onto the tangent plane and findthe triangle which contains the new point.

We illustrate our algorithms with a few examples. First we consider mapping thekitten mesh, which is a genus one triangular mesh, onto a modified torus parametrizedby (x, y, z) = ϕ1(u, v) for (u, v) ∈ [0, 1]2, where

x = cos 2πu · [r1 + r2 cos 2πv + r3 cos 6π(u+ v)]

y = sin 2πu · [r1 + r2 cos 2πv + r3 cos 6π(u+ v)]

z = r2 sin 2πv,

where we have chosen r1 = 4, r2 = 1.7 and r3 = 0.3. To show the flexibility of ourmethod, we use Beltrami flow to minimize the L3-norm (instead of L2-norm) of theBeltrami differential of this mapping. Initially, the kitten surface is cut open to forma simply connected open surface and mapped onto the parametrization domain [0, 1]2.Using a kd-tree, we compute the barycentric coordinates for each mapped vertex ofthe kitten surface into some triangle of the modified torus . The discrete Beltrami flowis carried out and the new location of each mapped source vertex after adjustmentis projected onto the modified torus using the procedure we described above untilnumerical convergence is achieved. Both initial and final mapping between the twotriangulated meshes are illustrated in Figure 5.12.

For the second example, we compute the mapping optimizing the L4-norm of theBeltrami differential of the mapping from the kitten surface onto another modifiedtorus parametrized by (x, y, z) = ϕ2(u, v) for (u, v) ∈ [0, 1]2, where

x = cos 2πu · [r1 + cos 2πv · (r2 + r3 cos 10πu)]

y = sin 2πu · [r1 + cos 2πv · (r2 + r3 cos 10πu)]

z = sin 2πv · (r2 + r3 cos 10πu),

where we have chosen r1 = 4, r2 = 1.5 and r3 = 0.4. We apply Beltrami flowto minimize the L4-norm of the Beltrami differential of this mapping. Using thesame algorithm, the discrete Beltrami flow successfully converges to the final mappingnumerically. Both initial and final mapping between the two triangulated meshes are

Page 21: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 21

(a) (b) (c)

Fig. 5.13. Computing a map minimizing the L4-norm of the Beltrami differential between twotriangulated surfaces: the kitten and a modified torus. (a) shows the kitten surface with a conformaltexture. (b) shows the initial map of the kitten onto the modified torus. (c) shows the optimizedmap of the kitten onto the modified torus. Conformality is well restored by the discrete Beltramiflow algorithm.

Perturbation formula# of vertices # of iterations Time (seconds) Error (L2-norm)

332 26 23.8087 3.0506× 10−3

652 14 182.7729 1.0382× 10−2

1292 12 2351.7488 5.4955× 10−3

2572 Impractical to computeBeltrami flow

# of vertices # of iterations Time (seconds) Error (L2-norm)332 9 0.459429 8.6697× 10−10

652 7 1.1837 2.5620× 10−8

1292 7 4.0143 1.3582× 10−6

2572 7 19.1423 6.5365× 10−7

Table 5.3Comparison for the reconstruction of a diffeomorphism of the square [−1, 1]2 using the method

proposed in [13] and our method, both with convergence tolerance of 10−3.

illustrated in Figure 5.13. In both examples, the distortions in the initial mappingsare minimized by our algorithm although different energy functional is used. Thisshows that our algorithm is able to work for general meshes, and the user is flexibleto choose different energy to minimize to achieve desirable results.

5.5. Efficiency and Comparison with the Perturbation Approach. Ouralgorithm is also very efficient because the sparse linear system obtained from theleast square problem can be solved easily. The discrete Beltrami flows on triangularmeshes with 100K faces can be easily computed in less than 3 seconds per step.Further improvement can be achieved by using more efficient solvers for least squareproblems.

We also compare our algorithm with another approach of computing the flowusing the purturbation formula (3.6). The method was proposed in [13] and applied tosurface registration and compression of surface diffeomorphisms in [12] and [11]. Thelimitation of the algorithm is that the target domain has to be globally parametrizedand simply connected, such as the plane and the sphere. We apply both algorithmsto the reconstruction of a highly distorted diffeomorphism on a square [−1, 1]2, shownin Figure 5.14. The results of both algorithms are shown in Table 5.3.

As we can see, our proposed algorithm is much more efficient than the algorithm

Page 22: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

22

(a) (b)

Fig. 5.14. A highly distorted diffeomorphism of a square. (a) shows a square textured with acheckerboard pattern. (b) shows how the checkerboard pattern is mapped by the diffeomorphism ontothe target square. This highly distorted diffeomorphism is used to compare the performance of ouralgorithm with the algorithm proposed in [13].

using the integration formula, both in terms of the computational speed, numberof iterations required, and the accuracy of the converged mapping. Moreover, ouralgorithm also works on general surfaces with arbitrary topology. This demonstratesseveral advantages of our algorithm for surface mapping.

6. Conclusion. In this paper, we propose a computational framework for intrin-sic Beltrami flow that can effectively adjust the Beltrami coefficient of diffeomorphismsbetween arbitrary Riemann surfaces without the need of a global parametrization. Byusing a least square approach, we developed a straight forward algorithm that canbe implemented easily and efficiently. We demonstrate the accuracy, robustness andflexibility of our method using extensive tests.

Appendix. We illustrate the detailed computation involved to compute the leastsquare energy for discrete Beltrami flow on both a plane and in arbitrary Riemannsurfaces with or without boundaries.

Computing the Least Square Beltrami Flow Energy on a Plane. Givena triangular mesh on the plane, we compute its Beltrami flow energy function andexpress it as a quadratic function of the coordinates. Assuming a single patch, wewant to minimize

E(u,v) =∑Ti∈T

ATi · ((ux − vy − 2ai)2 + (vx + uy − 2bi)

2), (6.1)

where u and v are vectors representing the real and imaginary parts of the flow ateach vertex, ATi is the area of triangle Ti, and the derivatives ux, uy, vx and vy aretaken on Ti. The first step in the discrete algorithm is to computed ux, uy, vx and vyon each face from the position and the images of the vertices. Let Ti = [pi1, pi2, pi3],and uij = u(pij) for j = 1, 2, 3, we may express ux and uy on Ti in terms of ui1, ui2and ui3 as

(uxuy

)= Ni

ui1ui2ui3

, (6.2)

Page 23: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 23

where Ni is a 3 by 1 matrix. Similarly, let vij = v(pij) for j = 1, 2, 3, we have

(vxvy

)= Ni

vi1vi2vi3

. (6.3)

Let pi1 = (xi1, yi1), pi2 = (xi2, yi2), pi3 = (xi3, yi3). It is easy to see that ui2 − ui1 =(xi2 − xi1)ux + (yi2 − yi1)uy and ui3 − ui2 = (xi3 − xi2)ux + (yi3 − yi2)uy. Thus wehave the system

(xi2 − xi1 yi2 − yi1xi3 − xi1 yi2 − yi1

)(uxuy

)=

(−1 1 0−1 0 1

)ui1ui2ui3

. (6.4)

Therefore Ni is given by

Ni =

(xi2 − xi1 yi2 − yi1xi3 − xi1 yi2 − yi1

)−1 (−1 1 0−1 0 1

). (6.5)

Write Ni as

(NixNiy

). Then (6.1) can be written as

E(u,v) =∑Ti∈T

ATi · ((Nixui −Niyvi − 2ai)2 + (Nixvi +Niyui − 2bi)

2), (6.6)

where ui =

ui1ui2ui3

and vi =

vi1vi2vi3

. The gradient of the least square energy can

then be taken to get a linear system for solving u and v.

Computing the Least Square Beltrami Flow Energy on Arbitrary Rie-mann Surfaces. For the least square energy on arbitrary Riemann surfaces, thesituation is similar, except that now u and v represents the direction of the flow asthe coefficients in terms of the basis ui and vi of each tangent plane at vertex pi.Mathematically, for each point pi mapped to ϕ(pi) on the target surface S, we cancompute an orthonormal basis {ni,ui,vi} at ϕ(pi) such that ni is the positive oroutward normal. Since Vi is written in terms of ui and Vi for each i but the leastsquare energy is an integral computed on each face ϕ(Ti), one needs to express V interms of the local isometric coordinates (r, s) on each ϕ(Ti) such that the integral canbe computed. We discuss the detail of this procedure in this section.

Since the least square energy functional is a sum of the integrals on all faces,we may consider the case for a face Ti. Assume that we have mapped it onto R2

isometrically and let {ri, si} be a positively ordered orthonormal basis on ψi(Ti).Then it can be seen that

rij = uijui · ri + vijvi · ri (6.7)

and

sij = uijui · si + vijvi · si (6.8)

for j = 1, 2, 3.

Page 24: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

24

Again we can use Ni defined in the previous section to compute rx, ry, sx andsy. Therefore we have∫∫

ψi(Ti)

(rx − sy − 2ai)2 + (rx + sy − 2bi)

2

= Aψi(Ti) · ((Nixri −Niysi − 2ai)2 + (Nixsi +Niyri − 2bi)

2). (6.9)

Summing up the above expression for each face ψi(Ti), we obtain the required leastsquare energy function quadratic in terms of coordinates of ϕ(pi1), ϕ(pi2) and ϕ(pi3).

REFERENCES

[1] Yonathan Aflalo, Ron Kimmel, and Michael Zibulevsky, Conformal mapping with asuniform as possible conformal factor, SIAM J. Imaging Sciences, (2013), pp. 78–101.

[2] Lars V. Ahlfors, Lectures on Quasiconformal Mapping, vol. 38 of University Lecture Series,American Mathematical Society, 2006.

[3] Charles R. Collins and Kenneth Stephenson, A circle packing algorithm, Comput. Geom.Theory Appl., 25 (2003), pp. 233–256.

[4] Prabir Daripa, A fast algorithm to solve the beltrami equation with applications to quasicon-formal mappings., Journal of Computational Physics, 106 (1993), pp. 355–365.

[5] Prabir Daripa and Daoud Mashat, An efficient and novel numerical method for quasiconfor-mal mappings of doubly connected domains., Numer. Algorithms, 18 (1998), pp. 159–175.

[6] Frederick P. Gardiner and Nikola Lakic, Quasiconformal Teichmller Theory, vol. 76 ofMathematical Surveys and Monographs, American Mathematical Society, 1999.

[7] Zheng-Xu He, Solving beltrami equations by circle packing., Trans. Am. Math. Soc., 322 (1990),pp. 657–670.

[8] Vladimir Kim, Yaron Lipman, and Thomas Funkhouser, Blended intrinsic maps, ACMTransactions on Graphics (Proc. SIGGRAPH), 30 (2011).

[9] Yaron Lipman, Vladimir G. Kim, and Thomas A. Funkhouser, Simple formulas for quasi-conformal plane deformations., ACM Trans. Graph., 28 (2009).

[10] Lok Ming Lui, Yalin Wang, Tony F. Chan, and Paul Thompson, Landmark constrainedgenus zero surface conformal mapping and its application to brain mapping research, Appl.Numer. Math., 57 (2007), pp. 847–858.

[11] Lok Ming Lui, Tsz Wai Wong, Paul M. Thompson, Tony F. Chan, Xianfeng Gu, andShing-Tung Yau, Compression of surface registrations using beltrami coefficients, in TheTwenty-Third IEEE Conference on Computer Vision and Pattern Recognition, CVPR2010, San Francisco, CA, USA, 13-18 June 2010, IEEE, 2010, pp. 2839–2846.

[12] , Shape-based diffeomorphic registration on hippocampal surfaces using beltrami holomor-phic flow, in Medical Image Computing and Computer-Assisted Intervention - MICCAI2010, 13th International Conference, Beijing, China, September 20-24, 2010, Proceedings,Part II, Tianzi Jiang, Nassir Navab, Josien P. W. Pluim, and Max A. Viergever, eds.,vol. 6362 of Lecture Notes in Computer Science, Springer, 2010, pp. 323–330.

[13] Lok Ming Lui, Tsz Wai Wong, Wei Zeng, Xianfeng Gu, Paul M. Thompson, Tony F.Chan, and Shing-Tung Yau, Optimization of surface registrations using beltrami holo-morphic flow, J. Sci. Comput., 50 (2012), pp. 557–585.

[14] Bruno Lvy, Sylvain Petitjean, Nicolas Ray, and Jrme Maillot, Least squares conformalmaps for automatic texture atlas generation, in SIGGRAPH 2002, 2002, pp. 362–371.

[15] C. Wayne Mastin and Joe F. Thompson, Discrete quasiconformal mappings, Zeitschrift FurAngewandte Mathematik Und Physik, 29 (1978), pp. 1–11.

[16] W.P. Thurston, The geometry and topology of three-manifolds, Princeton University, 1988.[17] W. T. Tutte, How to draw a graph, Proc Lond Math Soc, 13 (1963), pp. 743–767.[18] T.W. Wong, X.F. Gu, T.F. Chan, and L.M. Lui, Parallelizable inpainting and refinement of

diffeomorphisms using beltrami holomorphic flow, in ICCV11, 2011, pp. 2383–2390.[19] Tsz Wai Wong and Hongkai Zhao, Computing surface uniformization using discrete beltrami

flow, to be appeared in SIAM Journal of Scientific Computing, (2014).[20] Xiaotian Yin, Miao Jin, Feng Luo, and Xianfeng David Gu, Emerging trends in visual

computing, Springer-Verlag, Berlin, Heidelberg, 2009, pp. 38–74.[21] Wei Zeng, Feng Luo 0002, Shing-Tung Yau, and Xianfeng David Gu, Surface quasi-

conformal mapping by solving beltrami equations, in Mathematics of Surfaces XIII, 13thIMA International Conference, York, UK, September 7-9, 2009, Proceedings, Edwin R.

Page 25: COMPUTATION OF QUASICONFORMAL SURFACE MAPS USING …zhao/homepage/research_files/l... · 2018-05-12 · conformal maps, which aim at eliminating angular distortions, quasiconformal

COMPUTING QC MAPS USING DISCRETE BELTRAMI FLOW 25

Hancock, Ralph R. Martin, and Malcolm A. Sabin, eds., vol. 5654 of Lecture Notes inComputer Science, Springer, 2009, pp. 391–408.

[22] Wei Zeng, Lok Ming Lui, Feng Luo, Tony Fan-Cheong Chan, Shing-Tung Yau, andDavid Xianfeng Gu, Computing quasiconformal maps using an auxiliary metric anddiscrete curvature flow, Numer. Math., 121 (2012), pp. 671–703.