Varifolds and Surface Approximation

Blanche Buet joint work with Gian Paolo Leonardi (Modena), Simon Masnou (Lyon) and Martin Rumpf (Bonn)

Laboratoire de math´ematiquesd’Orsay, Paris Sud

7 february 2019

The of imaging, Paris Why varifolds ?

I flexible: you can endow both discrete and continuous objects with a varifold structure.

I encode order 1 information (tangent bundle): unoriented objects.

I provide weak notion of curvatures.

I natural distances to compare varifolds. Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arc length parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arclength parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). 2 1 Let ϕ : R → R be C : Z L d ϕ(γ(t))γ0(t) dt 0 dt Z L  0 L 00 = ϕ(γ(t))γ (t) t=0 − ϕ(γ(t)) γ (t) dt |{z} | {z } 0 | {z } by parts =0 κ(γ(t)) We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arclength parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). 2 1 Let ϕ : R → R be C : Z L d Z ϕ(γ(t))γ0(t) dt = − ϕ(x)κ(x) 0 dt Γ We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arclength parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). 2 1 Let ϕ : R → R be C : Z L d Z ϕ(γ(t))γ0(t) dt = − ϕ(x)κ(x) 0 dt Γ Z L d Z L ϕ(γ(t))γ0(t) dt = ∇ϕ(γ(t)) · γ0(t) γ0(t) dt 0 dt 0 Z Z = (∇ϕ(x) · τ(x)) τ = Πθ(x) (∇ϕ(x)) Γ Γ We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arclength parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). 2 1 Let ϕ : R → R be C : Z Z ϕ(x)κ(x) = − Πθ(x) (∇ϕ(x)) Γ Γ

 We start with 2 2 I Γ ⊂ R a C closed curve, 2 I γ : [0,L] → R an injective (0 ∼ L) arclength parametrization of Γ. 0 I unit tangent vector τ: for x = γ(t) ∈ Γ, τ(x) = γ (t) and θ(x) the angle between τ(x) and the horizontal. 00 I curvature vector κ: for x = γ(t) ∈ Γ, κ(x) = γ (t). 2 1 Let ϕ : R → R be C : Z Z ϕ(x)κ(x) = − Πθ(x) (∇ϕ(x)) Γ Γ

 I weak formulation of curvature,

I relies only on the knowledge of Z 2  ψ : R × R → R continuous ψ(x, θ(x)) 2 . Γ ∀x ∈ R , ω 7→ ψ(x, ω) is π–periodic Our first varifold

 2  ψ : R × R → R ψ continuous and π–periodic C = . (x, ω) 7→ ψ(x, ω) w.r.t. ω

The continuous linear form  VΓ : C → R  Z  ψ 7→ ψ(x, θ(x)) Γ is the 1–varifold naturally associated with Γ. Our first varifold

 2  ψ : R × R → R ψ continuous and π–periodic C = . (x, ω) 7→ ψ(x, ω) w.r.t. ω

The continuous linear form on C  VΓ : C → R  Z  ψ 7→ ψ(x, θ(x)) Γ is the 1–varifold naturally associated with Γ. Z With ψ(x, ω) = Πω∇ϕ(x), ϕ(x)κ(x) = −VΓ(ψ) and Γ

I Knowing VΓ is enough to recover the curvature κ. I Conversely, it is possible to define a notion of generalized curvature for any continuous linear form on C, that is for 2 ANY 1–varifold in R . Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form Varifolds ?

Generalized surface : couples a weighted spatial information and a non oriented direction information. Introduced by Almgren in the 60’ : weak notion of surface allowing good compactness properties.

n A d–varifold is a Radon in R × Gd,n. The

Grassmannian of d–planes :

n Gd,n = {d–vector sub-spaces of R }.

non-oriented d–planes.

We identify P ∈ Gd,n with the orthogonal projector ΠP onto P , so that Gd,n can be seen as a compact subset of Mn(R) :

 2  A = A  T  Gd,n ' A ∈ Mn(R) A = A

 Trace(A) = d 

Distance on Gd,n : d(P,Q) = kΠP − ΠQk.

n n X = R , X = R × Gd,n. A Radon measure in X will equivalently be (thanks to Riesz theorem) :

I a Borel mesure on X that takes finite values on compact sets.

I a positive linear form on Cc(X). Weak star convergence:

∗ Z Z µi −* µ ⇔ ∀ϕ ∈ Cc(X), ϕ dµi → ϕ dµ . X X locally metrized for instance by the flat distance : Z Z  ϕ is 1–Lipschitz ∆(µ, ν) = sup ϕ dµ − ϕ dν X X supX |ϕ| ≤ 1 About ∆

• Condition sup |ϕ| ≤ 1 : for ε > 0 and µ = (1 + ε)δ0, ν = δ0, Z Z

ϕ dµ − ϕ dν = ε |ϕ(0)| −−−−−−→ +∞ . ϕ(0)→+∞

• Condition ϕ 1–Lipschitz: for ε > 0 and µ = δε, ν = δ0, Z Z

ϕ dµ − ϕ dν = |ϕ(ε) − ϕ(0)| = 2 .

with ϕ(ε) = 1 and ϕ(0) = −1. n • Localized version : B ⊂ R   Z Z ϕ is 1–Lipschitz     ∆B(µ, ν) = sup ϕ dµ − ϕ dν sup |ϕ| ≤ 1 X  X X spt ϕ ⊂ B 

  First examples 1–Varifold associated with n I a segment S ⊂ R whose direction is P ∈ G1,n :

1 V = H|S ⊗ δP ,

I a union of segments 8 M = ∪i=1Si ,

Si of direction Pi ∈ G1,n:

8 X V = H1 ⊗ δ . |Si Pi i=1 [ 2–Varifold associated with a triangulated surface M = T , where T has direction PT ∈ G2,n : T ∈T

X 2 V = L|T ⊗ δPT . T ∈T Point cloud varifolds

n d–Varifold associated with a point cloud in R , that is N n I a finite set of points {xi}i=1 ⊂ R , N ∗ I weighted by masses {mi}i=1 ⊂ R+, N I provided with directions {Pi}i=1 ⊂ Gd,n.

N X V = miδxi ⊗ δPi . i=1 Regular varifolds

n When M ⊂ R is a d–sub- (or a d–rectifiable set) : n d 1. µ measure in R supported in M : µ = H|M . x x 2. a family (ν )x∈M of probabilities in Gd,n : ν = δTxM . x n Then define V = µ ⊗ ν Radon measure in R × Gd,n n in the sense: for ψ ∈x Cc(R × Gd,n), Z Z Z V (ψ) = ψ dV = ψ(x, P ) dνx(P ) dµ(x) n x∈R P ∈Gd,n Z d = ψ(x, TxM) dH (x) M Regular varifolds

n When M ⊂ R is a d–sub-manifold (or a d–rectifiable set) : n d 1. µ measure in R supported in M : µ = H|M . x x 2. a family (ν )x∈M of probabilities in Gd,n : ν = δTxM . x n Then define V = µ ⊗ ν Radon measure in R × Gd,n n in the sense: for ψ ∈ Cc(R × Gd,n), Z Z Z V (ψ) = ψ dV = ψ(x, P ) dνx(P ) dµ(x) n x∈R P ∈Gd,n Z d = ψ(x, TxM) dH (x) M Z Remember, for Γ: VΓ(ψ) = ψ(x, θ(x)) . Γ Disintegration

n Mass of a varifold V : it’s the Radon measure kV k in R defined as

kV k(A) = V (A × Gd,n) .

Disintegration : a d–varifold V can be decomposed as

V = µ ⊗ νx with µ = kV k

where for kV k–a.e. x, νx is a probability measure in Gd,n. More varifolds ...

Point cloud Volumic approx Rectifiable X X n d mjδxj ⊗ δPj mK L|K ⊗ δPK θ(x)H|M ⊗ δTxM j K∈K X X n d kV k = mjδxj kV k = mK L|K kV k = θ(x)H|M j K∈K Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form Divergence theorem

1 n n • X ∈ Cc (R , R ), n X • For P ∈ Gd,n, divPX = (ΠP∇Xk) · ek, k=1 n 2 • M ⊂ R closed d–sub-manifold C with mean curvature vector H,

Z Z d d  divTxMX dH = − H · X dH . M M

 d For V = H|M ⊗ δTxM the d–varifold associated with M : Z Z divPX(x) dV(x, P) = − H · X dkVk . n n R ×Gd,n R −→ distributional definition of mean curvature. First variation of a varifold First variation of V

Z 1 n n δV : X ∈ Cc (R , R ) 7−→ divP X(x) dV (x, P ) . n R ×Gd,n δV is a distribution of order 1. d 2 V = H|M ⊗ δTxM associated with M (C closed): Z δV (X) = − X · H dHd M

d thus §δV = −H H|M = −HkV k ¤order 0. When δV is of order 0, • Riesz¦ : δV is a vector mesure de¥ Radon. • Radon Nikodym : we decompose δV with respect to kV k : δV = −H kV k + (δV ) , § sing ¤ H ∈ L1(kV k) generalized curvature. ¦ ¥ Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form Regularization of the first variation 1 x ρ ∈ C∞(B (0)) radial ≥ 0, R ρ = 1 and ρ (x) = ρ . c 1 ε εn ε Regularized first variation 1 Z y − x δV ∗ ρε(x) = n+1 ∇S ρ dV (y, S) . ε Bε(x)×Gd,n ε Well-defined for any varifold.

N X Case of a point cloud : V = miδ(xi,Pi), i=1

N   1 X |xi − x| ΠP (xi − x)  m ρ0 i .  ε i ε |x − x| i=1 i

−→ explicit expression “easy” to implement numerically. Approximate curvature

Radon-Nikodym derivative of δV ∗ ρε with respect to kV k ∗ ξε :

δV ∗ ρε = −Hε(x, V ) kV k ∗ ξε with

δV ∗ ρε(x) Hε(x, V ) = − . kV k ∗ ξε(x)

• Choice of ρ, ξ. For V associated with M smooth, the leading term in the expansion of |CHε − H| around a point is proportional to Z 1 0 0 0 d−1 sρ (s) sρ (s) (sρ (s) + dCξ(s))s ds = 0 ξ(s) = − = − ¨. 0 |{z} dC n by PI © Convergence

d Let V = θH|M ⊗ δTxM be a rectifiable d–varifold s.t. δV = −HkV k + (δV )sing. is a measure. d • Consistency C = Cρ,ξ > 0 constant, for H –a.e. x ∈ M, δV CHε(x, V ) −−−→ H(x) = − (x) ε→0 kV k • Stability :

I x ∈ sptkV k and zi −−−→ 0 i→∞

I (Vi)i sequence of d–varifolds weak–∗ converges to V with a localized flat distance around x controlled by di ↓ 0. Then, for d + |z − x| i i εi ↓ 0 satisfying 2 −−−→ 0 , εi i→∞    di + |zi − x| |Hεi (zi,Vi) − Hεi (x, V )| = Oi→∞ 2 εi Case of a point cloud varifold

N X Let V = miδ(xi,Pi), i=1

N   1 X |xi − x| ΠP (xi − x) ' m ρ0 i $ ε i ε |x − x| i=1 i Hε(x, V ) = − . N   X |xi − x| m ξ i ε i=1

& % Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form Mean curvature Code C++ using nanoflann library.

Figure: Intensity of mean curvature from blue (zero) to red through white ε = 0.007 for a diameter 1 Mean curvature Code C++ using nanoflann library.

Figure: Intensity of mean curvature from blue (zero) to red through white ε = 0.007 for a diameter 1 Gaussian curvature

Figure: Gaussian curvature, negative (blue), zero (white), positive (red) Sharp features

Figure: |k1| + |k2| from blue (zero) to red (high) through white (a) (b)

(c) (d)

Figure: Left: Gaussian curvature, Right: |k1| + |k2|, Top: without noise, Bottom: with white noise 0 0 1.2 100 1.2 100 200 200 300 300 400 400 600 600 700 1000 1000 1500 1500 3000 0.8 2000 0.8

0.4 0.4

0.0 0.0

0.0 0.4 0.8 1.2 0.0 0.4 0.8 1.2

(a) (b) 0.8

0.4

0.0

0.4

0.8

0.8 0.4 0.0 0.4 0.8

(c) (a) Step 1 (b) Step 101

(c) Step 13 (d) Step 25 (e) Step 37 (f) Step 49

(g) Step 61 (h) Step 73 (i) Step 85 (j) Step 97 Figure: Evolution of a tetrahedron whose edges are fixed, discretized with N = 6052 points and for a time–step τ = 0.005. (a) Step 1 (b) Step 2701

(c) Step 401 (d) Step 801 (e) Step 1201 (f) Step 1601

(g) Step 2001 (h) Step 2401 (i) Step 2701 (j) Step 2701 Figure: Evolution of a cube whose edges are fixed, discretized with N = 18600 points and for a time–step τ = 0.01. Thanks for your attention ! Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form A` propos des varifolds

W. K. Allard. On the first variation of a varifold. Annals of Mathematics, 95:417–491, 1972. J. Almgren. Theory of Varifolds. Mimeographed lecture notes, 1965. K.A. Brakke. The motion of a surface by its mean curvature. Mathematical notes (20), Princeton University Press, 1978. N. Charon, A. Trouv´e. The varifold representation of nonoriented shapes for diffeomorphic registration. SIAM Journal on Imaging Sciences, 6(4):2547–2580, 2013. J.E. Hutchinson. Second Fundamental Form for Varifolds and the Existence of Surfaces Minimising Curvature. Indiana Univ. Math. J., (35)1, 1986. U. Menne. The Concept of Varifold. Notices Amer. Math. Soc., 64(10):1148–1152, 2017. L. Simon. Lectures on . Proceedings of the Centre for Mathematical Analysis, Australian National University, volume 3, 1983. A` propos de courbure discr`ete

N. Amenta, Y.-J. Kil. Defining Point-set Surfaces. ACM SIGGRAPH 2004 Papers, 264–270, 2004. F. Chazal, D. Cohen-Steiner, A. Lieutier, B. Thibert. Stability of Curvature Measures. Comput. Graph. Forum, 28(5), 2009. U. Clarenz,M. Rumpf, A. Telea. Robust Feature Detection and Local Classification for Surfaces based on Moment Analysis. IEEE Transactions on Visualization and Computer Graphics, 10(5):516–524, 2004. D. Cohen-Steiner, J.-M. Morvan. Second fundamental measure of geometric sets and local approximation of curvatures. Journal of Differential Geometry, 74(3):363–394, 2006. D. Levin. The approximation power of moving least-squares. Mathematics of Computation, 67:1517–1531, 1998. Q. M´erigot. Robust Voronoi-based Curvature and Feature Estimation. 2009 SIAM/ACM Joint Conference on Geometric and Physical Modeling, 1–12, 2009. U. Pinkall, K. Polthier. Computing discrete minimal surfaces and their conjugates. Experiment. Math., 2(1):15–36, 1993. M. Wardetzky. Convergence of the Cotangent Formula: An Overview. Discrete Differential Geometry, Birkh¨auserBasel, 275–286, 2008. B. Buet, G.P. Leonardi, S. Masnou. A Varifold Approach to Surface Approximation. ARMA, 2017. B. Buet, G.P. Leonardi, S. Masnou. Weak and Approximate Curvtaures of a Measure: a Varifold Perspective. , 2019. Second fundamental form

 |x −x |  P (x −x )   d PN m ρ0 l0 l l l0 l · 1 P −P e + P −P e − P −P e n l=1 l ε |x −x | 2 ( l l0 )jk i ( l l0 )ik j ( l l0 )ij k l0 l  |x −x |  . PN l0 l l=1 mlξ ε Link with the Cotangent formula

3 3 I Let T = (F, E, V) be a triangulation in R , where V ⊂ R is the set of vertices, E ⊂ V × V is the set of edges and F is the set of triangle faces.

I 2–varifold X 2 VT = H|F ⊗ δPF , F ∈F

I The nodal function ϕv, v ∈ V, associated with T is defined by ϕv(v) = 1, ϕv(w) = 0 for w ∈ V, w 6= v and ϕv affine on each face F ∈ F.

1 X δV (ϕ ) = − (cot α + cot β )(v − x). T cx 2 xv xv v∈V(x) Plan

A simple example

What is a varifold ?

Generalized curvature of a varifold

Approximate curvature

Numerical illustrations

References

Second fundamental form Second fundamental form Back to the divergence theorem: n 2 • M ⊂ R C closed; • P (x)=( Pjk(x))jk ∈ Mn(R) orthogonal projection onto TxM ; 1 • ϕ ∈ Cc(Ω × Mn(R)), X(x) := ϕ(x,P (x))ei. Z Divergence theorem 0= divP (PX) leads to a weak M formulation of the second fundamental form through

Aijk = (P (x)∇Pjk(x))i :

Z d − (P (x)∇xϕ)i dH = M Z  X X  d (P (x)∇Pjk(x))i Djkϕ + (P (x)∇Piq(x))q ϕ dH M j,k | {z } q | {z } =:Aijk Aqiq Second fundamental form Back to the divergence theorem: n 2 • M ⊂ R C closed; • P (x)=( Pjk(x))jk ∈ Mn(R) orthogonal projection onto TxM ; 1 • ϕ ∈ Cc(Ω × Mn(R)), X(x) := ϕ(x)Pjk(x)ei. Z Divergence theorem 0= divP (PX) leads to a weak M formulation of the second fundamental form through

Aijk = (P (x)∇Pjk(x))i :

Z Z d  X  d − (P (x)∇ϕ)i dH = Aijkϕ + Pjk(x) Aqiqϕ dH M M q It is then possible to define, for i, j, k = 1 . . . n,

Z 1 n n δijkV : X ∈ Cc (R , R ) 7−→ SjkdivSX(x) dV (x, S) · ei . n R ×Gd,n

When those distributions are Radon measures, we define βijk s.t.

δijkV = −βijkkV k + (δijkV )sing .

And for kV k–a.e. x, we can define Aijk as the pointwise solution of the linear system with n3 equations :

n  X  Aijk + cjk Aqiq = βijk q=1

Z   with cjk(x) = S dνx(S) and V = kV k ⊗ νx. Gd,n