Spring 2014 CSCI 599: Digital Geometry Processing 7.1 Surface Smoothing Hao Li http://cs599.hao-li.com � 1
Administrative • Today’s Office Hour from 2:00 to 3:00 � 2
Mesh Optimization Smoothing � • Low geometric noise Fairing � • Simplest shape Decimation � • Low complexity Remeshing � • Triangle Shape � 3
Mesh Smoothing Filter out high frequency noise Desbrun, Meyer, Schroeder, Barr: Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow , SIGGRAPH 99 � 4
Mesh Smoothing Filter out high frequency noise � 5
Mesh Smoothing Advanced Filtering input data low pass exaggerate Kim, Rosignac: Geofilter: Geometric Selection of Mesh Filter Parameters , Eurographics 05 � 6
Mesh Smoothing Fair Surface Design Schneider, Kobbelt: Geometric fairing of irregular meshes for free-form surface design , CAGD 18(4), 2001 � 7
Mesh Smoothing Hole filling with energy-minimizing patches � 8
Outline • Spectral Analysis • Diffusion Flow � • Energy Minimization � 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 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 ) + . . . � 13
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 ) = −∞ � 14
Convolution Smooth signal by convolution with a kernel function � h ( x ) = f ∗ g := f ( y ) · g ( x − y ) d y Example: Gaussian blurring ∗ = � 15
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 ( ω ) � 16
Fourier Analysis Low-pass filter discards high frequencies LOW PASS spatial domain frequency domain � 17
Fourier Transform Spatial domain → Frequency domain f ( x ) F ( w ) � ∞ f ( x ) e − 2 π i ω x d x F ( ω ) = −∞ Multiply by low-pass filter G ( w ) F ( ω ) ← F ( ω ) · G ( ω ) Frequency domain → Spatial domain F ( w ) f ( x ) � ∞ F ( ω ) e 2 π i ω x d ω f ( x ) = −∞ � 18
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 ω −∞ ω = −∞ � 19
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 � 20
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 � 21
Discrete Laplace-Beltrami • Discrete Laplace Operator (per mesh) • Sparse matrix L = DM ∈ IR n × n . . . . . . ∆ S f ( v i ) = L · f ( v i ) . . . . . . A i α ij v i v j β ij � 22
Discrete Laplace-Beltrami • Discrete Laplace Operator (per mesh) • Sparse matrix L = DM ∈ IR n × n 8 i 6 = j , j 2 N 1 ( v i ) cot α ij + cot β ij , > < 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 � 23
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 � 24
Discrete Laplace-Beltrami � � � � � L = DM ∈ IR n × n • Discrete Laplace-Beltrami matrix • Eigenvectors are natural vibrations • Eigenvalues are natural frequencies � 25
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 � 26
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 � 27
Outline • Spectral Analysis • Diffusion Flow � • Energy Minimization � 28
Diffusion Flow on Height Fields Diffusion equation diffusion constant ∂ f ∂ t = λ ∆ f Laplace operator � 29
Diffusion Flow on Meshes Iterate p i ← p i + λ ∆ p i 0 Iterations 5 Iterations 20 Iterations � 30
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 � 31
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 � 32
Mean Curvature Flow input data uniform Laplace Laplace-Beltrami � 33
Numerical Integration p ( t +1) = p ( t ) + λ ∆ p ( t ) • Write update in matrix notation i i i � ⇥ T � P ( t ) = p ( t ) 1 , . . . , p ( t ) ∈ IR n × 3 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 ) � 34
Implementation • Solve linear system for each iteration � ( I − λ L ) P ( t +1) = P ( t ) � • Matrix is not symmetric because of L = DM D → Symmetrize by multiplying from left D − 1 D − 1 − λ M P ( t +1) = D − 1 P ( t ) � ⇥ � • Solve sparse symmetric positive definite system → Iterative conjugate gradients, sparse Cholesky � 35
Outline • Spectral Analysis • Diffusion Flow � • Energy Minimization � 36
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 � 37
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 � 38
Soap Films � 39
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 � 40
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 Ω � 41
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 � 42
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 � 43
Recommend
More recommend