| Description |
In the attached .zip folder you will find two primary functions titled 'GDSP' and 'ConditionMesh' as well as a number of other auxiliary routines. To compute conformal (i.e. angle preserving), as well as barycentric spherical parametrizations use the function titled 'GDSP'. This implementation is based primarily on the algorithm described by Gu et al. in [1].
REMARKS:
=======================================
1) Conformal parametrization is obtained by gradient descent optimization of the Dirichlet energy (a.k.a harmonic energy). To avoid any numerical problems associated with negative edge weights, the input mesh should be pre-processed with the function titled 'ConditionMesh'. 'ConditionMesh' is based partly on the edge-flipping algorithm described by Fisher et al. in [2].
2) Also included in the .zip folder are 6 sample meshes [3] (see snapshot) along with their pre-computed barycentric and conformal parametrizations.
EXAMPLE: Compute barycentric and conformal spherical embeddings of the sample mesh titled 'octa_flower'
=======================================
% REMEMBER TO UNPACK THE CONTENTS OF THE .ZIP FOLDER INTO YOUR CURRENT MATLAB DIRECTORY
% Load the original mesh
load octa_flower
tr=octa_flower.mesh; % TriRep object
tri=tr.Triangulation; % face-vertex connectivity list
% Make sure all mesh edges meet the so called internal Delaunay criterion (see [2] for more info)
tr=ConditionMesh(tr);
% Visualize the original mesh
figure('color','w')
h=trimesh(tr);
set(h,'EdgeColor','b'), axis off, axis equal, drawnow
% Compute the barycentric map (aka Tutte map)
dt=1E-2; % time step
dE=1E-4; % convergence criterion
Nmax=1E5 % maximum number of iterations
bm=GDSP(octa_flower.mesh,[],'bm',{dt dE Nmax}); % [] means no initialization was provided
% Visualize the barycentric map
figure('color','w')
ha=axes;
h=trimesh(TriRep(tri,bm));
set(h,'EdgeColor','b'), axis off, axis equal, drawnow
set(get(ha,'Title'),'String','Barycentric Map',...
'FontSize',35,'FontWeight','bold')
% Compute the conformal map (for genus-0 surfaces harmonic and conformal maps are equivalent ).
cm=GDSP(octa_flower.mesh,bm,'cm',{dt dE Nmax}); % use bm to initialize the search
% Visualize the conformal map
figure('color','w')
ha=axes;
h=trimesh(TriRep(tri,bm));
set(h,'EdgeColor','b'), axis off, axis equal, drawnow
set(get(ha,'Title'),'String','Conformal Map',...
'FontSize',35,'FontWeight','bold')
% Visualize the distribution of angle distortions
AngleDistortionPlot(tr,bm,'Barycentic Map Ang Dist Err')
AngleDistortionPlot(tr,cm,'Conformal Map Ang Dist Err')
REFERENCES:
=======================================
[1] Gu, X., Wang, Y., Chan, T.F., Thompson, P.M., Yau, S.T. (2004) “Genus zero surface conformal mapping and its application to brain surface mapping”, IEEE Transactions on Medical Imaging, Vol. 23,pp. 949-958.
[2] Fisher, M., Springborn, B., Schröder, P., Bobenko, A.I. (2007) "An algorithm for the construction of intrinsic Delaunay triangulations with applications to digital geometry processing", Computing, Vol. 81, pp. 199-213.
[3] Aim@Shape Shape Repository: http://shapes.aim-at-shape.net/viewmodels.php |