Spring 2017 CSCI 621: Digital Geometry Processing 8.2 Surface Smoothing Hao Li http://cs621.hao-li.com 1
Mesh Optimization Smoothing • Low geometric noise Fairing • Simplest shape Decimation • Low complexity Remeshing • Triangle Shape 2
Mesh Smoothing Filter out high frequency noise Desbrun, Meyer, Schroeder, Barr: Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow , SIGGRAPH 99 3
Mesh Smoothing Filter out high frequency noise 4
Mesh Smoothing Advanced Filtering input data low pass exaggerate Kim, Rosignac: Geofilter: Geometric Selection of Mesh Filter Parameters , Eurographics 05 5
Mesh Smoothing Fair Surface Design Schneider, Kobbelt: Geometric fairing of irregular meshes for free-form surface design , CAGD 18(4), 2001 6
Mesh Smoothing Hole filling with energy-minimizing patches 7
Outline • Spectral Analysis • Diffusion Flow • Energy Minimization 8
Fourier Transform Represent a function as a weighted sum of sines and cosines Joseph Fourier 1768 - 1830 f ( x ) = a 0 + a 1 cos ( x ) + a 2 cos (3 x ) + a 3 cos (5 x ) + a 4 cos (7 x ) + . . . 9
Fourier Transform Represent a function as a weighted sum of sines and cosines Joseph Fourier 1768 - 1830 f ( x ) = a 0 + a 1 cos ( x ) + a 2 cos (3 x ) + a 3 cos (5 x ) + a 4 cos (7 x ) + . . . 10
Fourier Transform Represent a function as a weighted sum of sines and cosines Joseph Fourier 1768 - 1830 f ( x ) = a 0 + a 1 cos ( x ) + a 2 cos (3 x ) + a 3 cos (5 x ) + a 4 cos (7 x ) + . . . 11
Fourier Transform Represent a function as a weighted sum of sines and cosines Joseph Fourier 1768 - 1830 f ( x ) = a 0 + a 1 cos ( x ) + a 2 cos (3 x ) + a 3 cos (5 x ) + a 4 cos (7 x ) + . . . 12
Fourier Transform � ∞ f ( x ) e − 2 π i ω x d x F ( ω ) = −∞ Fourier Transform Spatial Frequency Domain Domain Inverse Transform � ∞ F ( ω ) e 2 π i ω x d ω f ( x ) = −∞ 13
Convolution Smooth signal by convolution with a kernel function � h ( x ) = f ∗ g := f ( y ) · g ( x − y ) d y Example: Gaussian blurring ∗ = 14
Convolution Smooth signal by convolution with a kernel function � h ( x ) = f ∗ g := f ( y ) · g ( x − y ) d y Convolution in spatial domain ⇔ Multiplication in frequency domain H ( ω ) = F ( ω ) · G ( ω ) 15
Fourier Analysis Low-pass filter discards high frequencies LOW PASS spatial domain frequency domain 16
Fourier Transform Spatial domain → Frequency domain f ( x ) F ( w ) � ∞ f ( x ) e − 2 π i ω x d x F ( ω ) = −∞ G ( w ) Multiply by low-pass filter F ( ω ) ← F ( ω ) · G ( ω ) Frequency domain → Spatial domain F ( w ) f ( x ) � ∞ F ( ω ) e 2 π i ω x d ω f ( x ) = −∞ 17
Fourier Transform L 2 Consider -function space with inner product � ∞ � f, g ⇥ := f ( x ) g ( x ) d x −∞ Complex “waves” build an orthonormal basis e ω ( x ) := e − 2 π i ω x = cos(2 πω x ) − i sin(2 πω x ) Fourier transform is a change of basis � ∞ ∞ � f ( x ) = � f, e ω ⇥ e ω d ω f ( x ) = � f, e ω ⇥ e ω d ω −∞ ω = −∞ 18
Fourier Analysis on Meshes? • Only applicable to parametric patches • Generalize frequency to the discrete setting • Complex waves are Eigenfunctions of Laplace d 2 d x 2 e 2 π i ω x = − (2 πω ) 2 e 2 π i ω x e 2 π i ω x ⇥ � = ∆ Use Eigenfunctions of discrete Laplace-Beltrami 19
Discrete Laplace-Beltrami • Function values sampled at mesh vertices f = [ f 1 , f 2 , . . . , f n ] ∈ IR n • Discrete Laplace-Beltrami (per vertex) 1 � ∆ S f ( v i ) := (cot α ij + cot β ij ) ( f ( v j ) − f ( v i )) 2 A i v j ∈ N 1 ( v i ) A i α ij v i v j β ij 20
Discrete Laplace-Beltrami • Discrete Laplace Operator (per mesh) • Sparse matrix L = DM ∈ IR n × n . . . . . . ∆ S f ( v i ) f ( v i ) = L · . . . . . . A i α ij v i v j β ij 21
Discrete Laplace-Beltrami • Discrete Laplace Operator (per mesh) • Sparse matrix L = DM ∈ IR n × n 8 cot α ij + cot β ij , i 6 = j , j 2 N 1 ( v i ) > < M ij = � P v j ∈ N 1 ( v i ) (cot α ij + cot β ij ) i = j > 0 otherwise : � ⇥ 1 A i α ij . . . , , . . . D = diag 2 A i v i v j β ij 22
Discrete Laplace-Beltrami • Function values sampled at mesh vertices f = [ f 1 , f 2 , . . . , f n ] ∈ IR n • Discrete Laplace-Beltrami (per vertex) 1 � ∆ S f ( v i ) := (cot α ij + cot β ij ) ( f ( v j ) − f ( v i )) 2 A i v j ∈ N 1 ( v i ) L = DM ∈ IR n × n • Discrete Laplace-Beltrami matrix • Eigenvectors are natural vibrations • Eigenvalues are natural frequencies 23
Discrete Laplace-Beltrami L = DM ∈ IR n × n • Discrete Laplace-Beltrami matrix • Eigenvectors are natural vibrations • Eigenvalues are natural frequencies 24
Spectral Analysis • Setup Laplace-Beltrami matrix L • Compute smallest eigenvectors { e 1 , . . . , e k } k • Reconstruct mesh from those (component-wise) x := [ x 1 , . . . , x n ] y := [ y 1 , . . . , y n ] z := [ z 1 , . . . , z n ] k k k ⇤ ⇤ ⇤ x T e i y T e i z T e i � ⇥ � ⇥ � ⇥ x ← e i y ← e i z ← e i i =1 i =1 i =1 25
Spectral Analysis • Setup Laplace-Beltrami matrix L • Compute smallest eigenvectors { e 1 , . . . , e k } k • Reconstruct mesh from those (component-wise) Too complex for large meshes! Bruno Levy: Laplace-Beltrami Eigenfunctions: Towards an algorithm that understands geometry , Shape Modeling and Applications, 2006 26
Outline • Spectral Analysis • Diffusion Flow • Energy Minimization 27
Diffusion Flow on Height Fields Diffusion equation (this one is heat equation) diffusion constant ∂ f ∂ t = λ ∆ f Laplace operator 28
Diffusion Flow on Meshes Iterate p i ← p i + λ ∆ p i 0 Iterations 5 Iterations 20 Iterations 29
Uniform Laplace Discretization • Smoothes geometry and triangulation • Can be non-zero even for planar triangulation • Vertex drift can lead to distortions • Might be desired for mesh regularization Desbrun et al., Siggraph 1999 30
Mean Curvature Flow • Use diffusion flow with Laplace-Beltrami ∂ p ∂ t = λ ∆ S p • Laplace-Beltrami is parallel to surface normal ∂ p ∂ t = − 2 λ H n ∆ Avoids vertex drift on surface ∆ S 31
Mean Curvature Flow input data uniform Laplace Laplace-Beltrami 32
Numerical Integration p ( t +1) = p ( t ) + λ ∆ p ( t ) • Write update in matrix notation i i i ⇥ T � P ( t ) = p ( t ) ∈ IR n × 3 1 , . . . , p ( t ) n • Corresponds to explicit integration Requires small λ P ( t +1) = ( I + λ L ) P ( t ) for stability! • Implicit integration is unconditionally stable ( I − λ L ) P ( t +1) = P ( t ) (backward Euler method) 33
Outline • Spectral Analysis • Diffusion Flow • Energy Minimization 34
Fairness • Idea: Penalize “unaesthetic behavior” • Measure fairness • Principle of the simplest shape • Physical interpretation • Minimize some fairness functional • Surface area, curvature • Membrane energy, thin plate energy 35
Minimal Surfaces Enneper’s Surface Catenoid Helicoid Scherk’s First Surface Scherk’s Second Surface Schwarz P Surface source: http://www.msri.org/about/sgp/jim/geom/minimal/library/index.html 36
Soap Films 37
Surface Area d A = ⌅ x u ⇤ x v ⌅ d u d v infinitesimal ⇥ u x v ) 2 d u d v x T u x u · x T v x v � ( x T = Area � = EG � F 2 d u d v cross product → determinant with unit vectors → area 38
Non-Linear Energies • Membrane energy (surface area) � d A → min δ S = c with S • Thin-plate surface (curvature) � κ 2 1 + κ 2 2 d A → min with δ S = c , n ( δ S ) = d S • Too complex… simplify energies 39
Membrane Surfaces • Surface parameterization R 2 → I R 3 p : Ω ⊂ I • Membrane energy (surface Area) � ⇥ p u ⇥ 2 + ⇥ p v ⇥ 2 d u d v � min Ω 40
Variational Calculus in 1D • 1D membrane energy � b f � 2 ( x ) d x → min L ( f ) = a • Add test function with u ( a ) = u ( b ) = 0 u � b � b ( f � + λ u � ) 2 = f � 2 + 2 λ f � u � + λ 2 u � 2 L ( f + λ u ) = f a a • If minimizes , the following has to vanish f L ⇥ b � ∂ L ( f + λ u ) ! � 2 f � u � = = 0 � ∂λ � a λ =0 41
Variational Calculus in 1D • Has to vanish for any with u ( a ) = u ( b ) = 0 u � b � b f � u � = [ f � u ] b ! � 1 � 1 f �� u = 0 ∀ u − f � g = [ fg ] 1 fg � a 0 − ⌅ ⇤⇥ ⇧ a a 0 0 =0 • Only possible if f �� = ∆ f = 0 Euler-Lagrange equation 42
Bivariate Variational Caculus • Find minimum of functional � argmin L ( f uu , f vv , f u , f v , f, u, v ) f Ω • Euler-lagrange PDE defines the minimizer ∂ 2 ∂ 2 + ∂ 2 ∂ L ∂ ∂ L − ∂ ∂ L ∂ L ∂ L ∂ L + + = 0 ∂ f − ∂ u 2 ∂ v 2 ∂ u ∂ f u ∂ v ∂ f v ∂ f uu ∂ u ∂ v ∂ f uv ∂ f vv Again, subject to suitable boundary constraints 43
Recommend
More recommend