Tutorial on Surface Ricci Flow, Theory, Algorithm and Application 1 1 Department of Computer Science University of New York at Stony Brook Graduate Summer School: Computer Vision, IPAM, UCLA
Collaborators The work is collaborated with Shing-Tung Yau, Feng Luo, Ronald Lok Ming Lui and many other mathematicians, computer scientists and medical doctors.
Books The theory, algorithms and sample code can be found in the following books. You can find them in the book store. Ricci Flow for Shape Analysis and Surface Registration - Theories, Algorithms and Applications, Springer, 2013.
Lecture Notes 1 Detailed lecture notes can be found at: http://www.cs.sunysb.edu/ gu/lectures/index.html 2 Binary code and demos can be found at: http://www.cs.sunysb.edu/ gu/software/index.html 3 Source code and data sets: http://www.cs.sunysb.edu/ gu/software/index.html
Conformal Mapping Definition (Conformal Mapping) Suppose (S 1,g 1 ) and (S 2,g 2 ) are two surfaces with Riemannian metrics. A conformal mapping φ : S 1 S 2 is a diffeomorphism, such that φ g 2 = e 2λ g 1.
Conformal Mapping Properties Conformal mappings preserve infinitesimal circles, and preserve angles.
Uniformization Theorem (Poincaré Uniformization Theorem) Let (Σ, g) be a compact 2-dimensional Riemannian manifold. Then there is a metric g=e 2λ g conformal to g which has constant Gauss curvature. Spherical Euclidean Hyperbolic
Uniformization Theorem (Poincaré Uniformization Theorem) Let (Σ, g) be a compact 2-dimensional Riemannian manifold with finite number of boundary components. Then there is a metric g conformal to g which has constant Gauss curvature, and constant geodesic curvature.
Yamabe Problem
Isothermal Coordinates Relation between conformal structure and Riemannian metric Isothermal Coordinates A surface M with a Riemannian metric g, a local coordinate system (u,v) is an isothermal coordinate system, if g=e 2λ(u,v) (du 2 + dv 2 ).
Gaussian Curvature Gaussian Curvature Suppose ḡ=e 2λ g is a conformal metric on the surface, then the Gaussian curvature on interior points are K = Δ g λ = 1 e 2λΔλ, where Δ= 2 u 2 + 2 v 2
Conformal Metric Deformation Definition Suppose M is a surface with a Riemannian metric, ( ) g11 g g= 12 g 21 g 22 Suppose λ :Σ R is a function defined on the surface, then e 2λ g is also a Riemannian metric on Σ and called a conformal metric. λ is called the conformal factor. g e 2λ g Angles are invariant measured by conformal metrics. Conformal metric deformation.
Curvature and Metric Relations Yamabi Equation Suppose ḡ=e 2λ g is a conformal metric on the surface, then the Gaussian curvature on interior points are K = e 2λ ( Δ g λ + K), geodesic curvature on the boundary k g = e λ ( n λ + k g ).
Surface Ricci Flow
Surface Ricci Flow Key Idea Because K = Δ g λ, Let then dk dt dλ dt = K, =Δ g K + 2K 2 Nonlinear heat equation! When t, K( ) constant.
Surface Ricci Flow Definition (Hamilton s Normalized Surface Ricci Flow) A closed surface S with a Riemannian metric g, the Ricci flow on it is defined as dg ij dt = 4πχ(S) A(0) 2Kg ij. where χ(s) is the Euler characteristic number of the surface S, A(0) is the total area at time 0. The total area of the surface is preserved during the normalized Ricci flow flow. The Ricci flow will converge to a metric such that the Gaussian curvature is constant every where, K( ) 2πχ(S). A(0)
Surface Ricci Flow Furthermore, the normalized surface Ricci flow dg ij dt = 4πχ(S) A(0) 2Kg ij. is conformal, g(t)=e 2u(t) g(0), where u(t):s R is a the conformal factor function, and the normalized Surface Ricci flow can be written as for every point p S. du(p, t) dt = 2πχ(S) A(0) K(p,t),
Ricci Flow Theorem (Hamilton 1982) For a closed surface of non-positive Euler characteristic, if the total area of the surface is preserved during the flow, the Ricci flow will converge to a metric such that the Gaussian curvature is constant (equals to K ) every where. Theorem (Bennett Chow) For a closed surface of positive Euler characteristic, if the total area of the surface is preserved during the flow, the Ricci flow will converge to a metric such that the Gaussian curvature is constant (equals to K ) every where.
Summary Surface Ricci Flow Conformal metric deformation g e 2u g Curvature Change - heat diffusion dk dt =Δ g K + 2K 2 Ricci flow du dt = K K.
Discrete Surface Ricci Flow
Generic Surface Model - Triangular Mesh Surfaces are represented as polyhedron triangular meshes. Isometric gluing of triangles in E 2. Isometric gluing of triangles in H 2,S 2.
Generic Surface Model - Triangular Mesh Surfaces are represented as polyhedron triangular meshes. Isometric gluing of triangles in E 2. Isometric gluing of triangles in H 2,S 2.
Generic Surface Model - Triangular Mesh Surfaces are represented as polyhedron triangular meshes. Isometric gluing of triangles in E 2. Isometric gluing of triangles in H 2,S 2.
Discrete Generalization Concepts 1 Discrete Riemannian Metric 2 Discrete Curvature 3 Discrete Conformal Metric Deformation
Discrete Metrics Definition (Discrete Metric) A Discrete Metric on a triangular mesh is a function defined on the vertices, l : E ={all edges} R +, satisfies triangular inequality. A mesh has infinite metrics.
Discrete Curvature Definition (Discrete Curvature) Discrete curvature: K : V ={vertices} R 1. K(v)=2π i α i,v M;K(v)=π α i,v M i Theorem (Discrete Gauss-Bonnet theorem) K(v)+ K(v)=2πχ(M). v M v M v α 1 α 2 α 3 α 1 α2 v
Discrete Metrics Determines the Curvatures l j θ i v i cosine laws v k v k θ k l i lj θ l j k li θ θ i θ j j v i l k v l j v k i v j θ i θ k θ j R 2 H2 S 2 l k v k l i v j cosl i = cosθ i + cosθ j cosθ k sinθ j sinθ k (1) coshl i = coshθ i+ coshθ j coshθ k sinhθ j sinhθ k (2) 1 = cosθ i + cosθ j cosθ k sinθ j sinθ k (3)
Discrete Conformal Metric Deformation Conformal maps Properties transform infinitesimal circles to infinitesimal circles. preserve the intersection angles among circles. Idea - Approximate conformal metric deformation Replace infinitesimal circles by circles with finite radii.
Discrete Conformal Metric Deformation vs CP
Circle Packing Metric CP Metric We associate each vertex v i with a circle with radius γ i. On edge e ij, the two circles intersect at the angle of Φ ij. The edge lengths are φ12 φ r 1 v 31 1 e 12 e 31 e23 v 2 v 3 r 2 φ 23 r 3 l 2 ij = γ 2 i + γ 2 j + 2γ i γ j cosφ ij CP Metric (Σ,Γ,Φ), Σ triangulation, Γ={γ i v i },Φ={φ ij e ij }
Discrete Conformal Factor Conformal Factor Defined on each vertex u:v R, logγ i R 2 u i = logtanh γ i 2 H 2 logtan γ i 2 S 2 Properties Symmetry Discrete Laplace Equation K i u j = K j u i dk=δdu, Δ is a discrete Lapalce-Beltrami operator.
Unified Framework of Discrete Curvature Flow Analogy Curvature flow Energy E(u)= Hessian of E denoted as Δ, du dt = K K, ( K i K i )du i, i dk=δdu.
Criteria for Discretization Key Points Convexity of the energy E(u) Convexity of the metric space (u-space) Admissible curvature space (K-space) Preserving or reflecting richer structures Conformality
Hyperbolic Ricci Flow
Hyperbolic Yamabe Flow a 2 b1 a 1 1 a1 b 1 b 1 1 b 1 2 b 2 a 1 a2 a 1 2 b2
Convergence and Uniqueness of discrete Ricci flow
Cosine law v k l j θ k l i 2l j l k cosθ i = lj 2 + lk 2 l2 i θ i θ j dθ 2l j l k sinθ i i dl i = 2l i v i l k A=l j l k sinθ i v j dθ i dl i = l i A
Cosine law v k 2l j l k cosθ i = lj 2 + lk 2 l2 i 2l j = 2l k cosθ i l j θ k l i 2l j l k sin θ i dθ i dl j v i θ i l k θ j v j dθ i dl j = l k cosθ i l j A l j = l i cosθ k + l k cosθ i = l i cosθ k A = dθ i dl i cosθ k
Cosine law τ ki v i l j θ i θ k v k l k τ ij l i θ j τ jk l 2 k = r 2 i + r 2 j + 2cosτ ij r i r j v j 2l i dl i dr j l 2 i = r 2 j + r 2 k + 2r jr k cosτ jk = 2r j + 2r k cosτ jk dl i = 2r j 2 + 2r j r k cosτ jk dr j 2l i r j = r j 2 + rk 2+ 2r jr k cosτ jk + rj 2 2l i r j = l2 i + r 2 j r 2 k 2l i r j
Cosine law Let u i = logr i, then dθ 1 dθ 2 dθ 3 0 = 1 A l 1 0 0 0 l 2 0 0 0 l 3 l1 2+r 2 2 r 3 2 l1 2+r 3 2 r 2 2 2l 1 r 2 2l 1 r 3 l2 2+r 1 2 r 3 2 2l 2 r 1 0 l3 2+r 1 2 r 2 2 l3 2+r 2 2 r 1 2 2l 3 r 1 2l 3 r 2 0 l 2 2 +r 2 3 r 2 1 2l 2 r 3 1 cosθ 3 cosθ 2 cosθ 3 1 cosθ 1 cosθ 2 cosθ 1 1 r 1 0 0 0 r 2 0 0 0 r 3 du 1 du 2 du 3
Cosine law τ ki v i l j θ i v k θ k w k l k τ jk l i θ φ j ji d ji v j 2l k dl k dr j = 2r j + 2r i cosτ ij dl r k j = 2r j 2 + 2r i r j cosτ ij dr j 2l k = l2 k + r j 2 ri 2 2l k In triangle [v i,v j,w k ], τ ij l 2 k = r 2 i + r 2 j + 2cosτ ij r i r j dl k = 2 l kr j cosφ ji = r j cosφ ji = d ji du j 2l k
Cosine law τ ki v i l j θ i h j There is a unique circle orthogonal to three circles (v i,r i ), the center is o, the distance from o to edge [v i,v j ] is h k. θ k v k τ ij l k h i o h k l i τ jk θ j v j Theorem dθ i du j dθ j du k dθ k du i = dθ j du i = h k l k = dθ k du j = h i l i = dθ i du k = h j l j
Cosine law Proof. τ ki l j v k θ k h i o l i d τ jk d jk θ i u j = θ i l i l i u j + θ i l k l k u j = θ i l i ( l i u j l k u j cosθ j ) v i θ i h k θ j l k d ji θ j v j = l i A (d jk d ji cosθ j ) dl = i l i l k sinθ j τ ij dθ i du j = h k l k = h k sinθ j l k sin θ j = h k l k
Cosine law v j v i,v j v i u j = 2 v j u j,v j v i τ ki v i l j θ i v k θ k h k l k h i o τ jk l i d jk θ j d ji v j l 2 k u j l k u j d ji = 2 v j u j,v j v i = v j u j, v j v i l k = v j u j, v j v i l k τ ij Similarly v j u j = v j o So v j u j = v j 0. d jk = v j u j, v j v k l i
Metric Space τki vk τjk Lemma For any three obtuse angles τ ij,τ jk,τ ki [0, π 2 ) and any three positive numbers r 1,r 2 and r 3, there is a configuration of 3 circles in Euclidean geometry, unique upto isometry, having radii r i and meeting in angles τ ij. lj hj θk hi o li Proof. θi hk θj vi lk vj max{r 2 i,r 2 j }<r 2 i +r 2 j +2r i r j cosτ ij (r i +r j ) 2 τij so max{r 2 i,r 2 j }<l k r i + r j l k r i + r j < l i + l j.
Discrete Ricci Energy Lemma ω is closed 1-form in Ω:={(u 1,u 2,u 3 ) R 3 }. τki vi vk θk hi lj hj o hk θi lk τjk li θj vj Because θ i u j dω = θ j u i, so = ( θ i u j θ j u i )du j du i + τij ( θ j u k θ k u j )du k du j + ω = θ i du i +θ j du j +θ k du j ( θ k θ i )du i du k u i u k = 0.
Discrete Ricci Energy τki vi lj θi hj θk vk lk hi o hk li τjk θj vj Lemma The Ricci energy E(u 1,u 2,u 3 ) is well defined. Because Ω=R 3 is convex, closed 1-form is exact, therefore E(u 1,u 2,u 3 ) is well defined. τij (u1,u 2,u 3 ) E(u 1,u 2,u 3 )= ω (0,0,0)
Discrete Ricci Energy τki vi lj θi hj θk vk τij (u1,u 2,u 3 ) E(u 1,u 2,u 3 )= ω (0,0,0) lk hi o hk li τjk θj vj Lemma The Ricci energy E(u 1,u 2,u 3 ) is strictly concave on the subspace u 1 + u 2 + u 3 = 0. The gradient E =(θ 1,θ 2,θ 3 ), the Hessian matrix is H = θ 1 u 1 θ 1 u 2 θ 1 u 3 θ 2 u 1 θ 2 u 2 θ 2 u 3 θ 3 u 1 θ 3 u 2 θ 3 u 3 because of θ 1 + θ 2 + θ 3 = π, θ i u i = θ i u j θ i u k = θ j u i θ k u i
Ricci energy Proof. H = h 3 l3 + h 2 l2 h 3 l3 h 2 l2 h 3 h 3 l3 l3 + h 1 l1 h 1 l1 h 2 l2 h 1 h 2 l1 l2 + h 1 l1 H is diagonal dominant, it has null space (1, 1, 1), on the subspace u 1 + u 2 + u 3 = 0, it is strictly negative definite. Therefore the discrete Ricci energy E(u 1,u 2,u 3 ) is strictly concave.
Discrete Ricci Energy Lemma The Ricci energy E(u) is strictly convex on the subspace vi M u i = 0. ω = K i du i v i M E(u)= M u 0 ω. M The gradient E =(K 1,K 2,,K n ). The Ricci energy E(u)=2π v i M u i [v i,v j,v k ] M E ijk (u i,u j,u k ) where E ijk is the ricci energy defined on the face [v i,v j,v k ]. The linear term won t affect the convexity of the energy. The null space of the Hessian is (1,1,,1). In the subspace u i = 0, the energy is strictly convex.
Uniqueness Lemma Suppose Ω R n is a convex domain, f :Ω R is a strictly convex function, then the map is one-to-one. Proof. x f(x) Suppose x 1 = x 2, f(x 1 )= f(x 2 ). Because Ω is convex, the line segment (1 t)x 1 + tx 2 is contained in Ω. construct a convex function g(t)=f((1 t)x 1 + tx 2 ), then g (t) is monotonous. But g (0)= f(x 1 ),x 2 x 1 = f(x 2 ),x 2 x 1 =g (1), contradiction.
Uniqueness x f(x) f(x) f(x) x 2 x 1 Ω Lemma Suppose Ω R n is a convex domain, f :Ω R is a strictly convex function, then the map x f(x) is one-to-one.
Uniqueness Theorem Suppose M is a mesh, with circle packing metric, all edge intersection angles are non-obtuse. Given the target curvature (K 1,K 2,,K n ), i K i = 2πχ(M). If the solution (u 1,u 2,,u n ) Ω(M), i u i = 0 exists, then it is unique. Proof. The discrete Ricci energy E on Ω { i u i = 0} is convex, E(u 1,u 2,,u n )=(K 1,K 2, K n ). Use previous lemma.
Thurston s Circle Packing Metric CP Metric We associate each vertex v i with a circle with radius γ i. On edge e ij, the two circles intersect at the angle of Φ ij. The edge lengths are vk dki wj Ck dkj wi hi C0 l 2 ij = γ 2 i + γ 2 j + 2γ i γ j η ij Ci dik vi hj dij o hk wk djk dji vj Cj CP Metric (Σ,Γ,η), Σ triangulation, lij Γ={γ i v i },η ={η ij < 1 e ij }
Tangential Circle Packing Metric Tangential CP Metric equivalently l 2 ij = γ 2 i + γ 2 j + 2γ i γ j, w j d h j ik C 0 d ij η ij 1. C i v i v j r i d ki v k o h i h k r k d kj w k d ji C k w i d jk r j C
Inversive Distance Circle Packing Metric Tangential CP Metric v k C k l 2 ij = γ 2 i + γ 2 j + 2η ij γ i γ j, equivalently d η ij > 1. v ij d ji i v j C i d ik w j d ki h j h k d kj o w k l ij h i w i d jk C 0 C
Yamabe Flow v k d ki d kj C 0 Yamabe Flow l 2 ij = η ij γ i γ j, w j d ik v i h j d ij o h i h k w k w i d ji d jk v
Imaginary Radius Circle Packing Metric Imaginary Radius Circle Packing Metric l 2 ij = γ 2 i γ 2 j + 2η ij γ i γ j, v i r i d ki w j r k v k h j d ki o h i d ij d kj hk w k w i d ji d jk r j v j C
Mixed Type v k Mixed Circle Packing l 2 ij = α i γ 2 i + α j γ 2 j + 2η ij γ i γ j, (α i,α j,α k )=(+1, 1,0) v i v j d ik d ij l j d ki h j h k l k o h i d kj d ji l i d jk
Geometric Interpretation - Discrete Entropy Energy Ck vk dki dkj wj hi wi C0 Ci dik hj o hk djk vi dij wk dji vj Cj lij
Geometric Interpretation - Discrete Entropy Energy Ck vk dki dkj wj hi wi C0 Ci dik hj o hk djk vi dij wk dji vj Cj lij
Geometric Interpretation - Discrete Entropy Energy Ck vk rk dki dkj ri wj hj dik C0 o hi hk wi djk rj Ci vi dij wk dji vj Cj
Geometric Interpretation - Discrete Entropy Energy Ck vk rk dki dkj ri wj hj dik C0 o hi hk wi djk rj Ci vi dij wk dji vj Cj
Geometric Interpretation - Discrete Entropy Energy v k θ jk θ ki α k θ ki θ jk α i α j v i θ ij θ ij v j
Geometric Interpretation - Discrete Entropy Energy v k θ jk θ ki α k θ ki θ jk α i α j v i θ ij θ ij v j
Geometric Interpretation - Discrete Entropy Energy v k θ ki θ jk α k θ ki v i α i θ ij θ jk α j θ ij v j
Geometric Interpretation - Discrete Entropy Energy v k θ ki θ jk α k θ ki v i α i θ ij θ jk α j θ ij v j
Geometric Interpretation - Discrete Entropy Energy θ jk θ ki v k α k θ ij v i α i α j v j θ ij θ ki θ jk
Geometric Interpretation - Discrete Entropy Energy θ jk θ ki v k α k θ ij v i α i α j v j θ ij θ ki θ jk
Ricci Flow Algorithm
Ricci Flow Algorithm Use Newton s method to minimize the discrete Ricci energy, E(u 1,u 2,,u n )= The gradient of the energy is n i=1 u K i u i E(u)= K K(u), The Hessian matrix is given by H =(h ij ), h ij = 0 n i=1 w ij [v i,v j ] M k w ik i = j 0 otherwise K i du i,
Ricci Flow Algorithm 1 Compute initial circle packing metric, determine the circle radii γ i for each vertex v i and intersection angles ϕ ij for each edge [v i,v j ]. 2 Determine the target curvature K i for each vertex, 3 Compute the discrete metric (edge length) 4 Compute the discrete curvature K i 5 Compute the power circle of each face, compute the Hessian matrix H 6 Solve linear system K K=Hδu 7 Update the vertex radii γ i +=δu i 8 Repeat step 2 through 7, until the curvature is close enough to the target curvature.
Ricci Flow Algorithm Topological Quadrilateral p 4 p 3 p 1 p 2 Target curvatures at the corners: π 2, and 0 everywhere else.
Conformal Canonical Forms Topological Quadrilateral p 4 p 3 p 1 p 2 p 4 p 3 p 1 p 2
Topological Annulus Target curvature to be zeros everywhere, composed with e z
Topological Disk Punch a hole to an annulus
Multiply Connected Domains Zero interior curvature, constant boundary curvature
Multiply Connected Domains Total curvature for inner boundary is 2π
Conformal Canonical Forms Multiply Connected Domains
Topological Torus Zero target curvature everywhere
Topological Torus with holes constant boundary curvature with total 2π
High genus surfaces Zero Target Curvature Everywhere using hyperbolic Ricci flow a 2 b1 a 1 1 a1 b 1 b 1 1 b 1 2 b 2 a 1 a2 a2 1 b2
High Genus Surface with holes Zero interior curvature, constant boundary curvature
Topological Pants Genus 0 surface with 3 boundaries. The double covered surface is of genus 2. The boundaries are mapped to hyperbolic lines.
Conformal Module Topological Pants - 3D γ 1 γ 2 γ 0 γ 0 τ 2 γ 0 2 τ0 γ1 2 γ1 τ0 γ 1 2 τ 1 τ 22 γ2 2 τ1 τ2 2 γ2 2 τ1 τ 0 τ 22 γ0 2 γ0 2 γ 1 2 τ 1 τ 2 γ 0 2
Quasi-Conformal Maps
Quasi-Conformal Map Most homeomorphisms are quasi-conformal, which maps infinitesimal circles to ellipses.
Beltrami-Equation Beltrami Coefficient Let φ : S 1 S 2 be the map, z,w are isothermal coordinates of S 1, S 2, Beltrami equation is defined as µ < 1 φ z = µ(z) φ z
Solving Beltrami Equation The problem of computing Quasi-conformal map is converted to compute a conformal map. Solveing Beltrami Equation Given metric surfaces (S 1,g 1 ) and (S 2,g 2 ), let z,w be isothermal coordinates of S 1,S 2,w = φ(z). Then g 1 = e 2u 1 dzd z (4) g 2 = e 2u 2 dwd w, (5) φ :(S 1,g 1 ) (S 2,g 2 ), quasi-conformal with Beltrami coefficient µ. φ :(S 1,φ g 2 ) (S 2,g 2 ) is isometric φ g 2 = e u 2 dw 2 = e u 2 dz+ µddz 2. φ :(S 1, dz+ µd z 2 ) (S 2,g 2 ) is conformal.
Quasi-Conformal Map Examples D3 D2 D0 p q p q D1 D3 D2 D0 p q D1
Quasi-Conformal Map Examples
Solving Beltrami Equation
Summary Theory of discrete surface Ricci flow Algorithm for discrete surface Ricci flow Application for surface uniformization
Thanks For more information, please email to gu@cs.sunysb.edu. Thank you!