Include/RiemannianMesh.[h/inl], GradientDomainFiltering/GradientDomainFiltering.cpp, and GeodesicsInHeat/GeodesicsInHeat.cpp files. (Feel free to declare and define additional member functions in Include/RiemannianMesh.[h/inl] as you need them.)After you download the files, the first thing to do is compile the GradientDomainFiltering and GeodesicsInHeat executables.
GeometryProcessing.sln to open the workspace in Microsoft Visual Studios.
GradientDomainFiltering and GeodesicsInHeat executables by clicking on "Build" and then selecting "Build Solution". Please be sure that you are compiling for Release under x64 mode, as only those project settings were set. (If you need to compile under Debug, you will need to copy over the settings.)
GradientDomainFiltering and GeodesicsInHeat are compiled in Release mode for the 64-bit architecture and will be placed in the directory Bin/x64.
make to compile the GradientDomainFiltering and GeodesicsInHeat executables.
GradientDomainFiltering and GeodesicsInHeat are compiled in Release mode and will be placed in the directory Bin/Linux.
GradientDomainFiltering
% GradientDomainFiltering
To smooth the geometry, invoke the executable as:
% GradientDomainFiltering --in <input geometry> --dWeight <differential fitting weight>
With:
<input geometry> the geometry to be processed.
<differential fitting weight> the importance assigned to fitting the scalar field to the target differential in the gradient-domain formulation. (The weight for the value-fitting is 1.)
GeodesicsInHeat
% GeodesicsInHeat
To smooth the geometry, invoke the executable as:
% GeodesicsInHeat --in <input geometry> --dTime <delta diffusion time> --rWeight <regularization weight>
With:
<input geometry> the geometry to be processed.
<delta diffusion time> the time-step for diffusing the delta function centered at the source vertex.
<regularization weight> the (tiny) weight used to encourage the scalar field to have values centered about 0.
GradientDomainFiltering
[space] pauses/resumes the animation
[left mouse] rotates
[right mouse] zooms
[left mouse]+[ctrl] pans
'[' decreases the differential fitting weight
']' increases the differential fitting weight
'v' toggles modulation weight visualization
's' enters selection mode
'{' decreases the radius of the selection ball
'}' increases the radius of the selection ball
[left mouse] (in selection mode) decreases the modulation weight in the selected region
[right mouse] (in selection mode) increases the modulation weight in the selected region
GeodesicsInHeat
[left mouse] rotates
[right mouse] zooms
[left mouse]+[ctrl] pans
[left mouse click] sets the source vertex
'[' decreases the number of bands
']' increases the number of bands
Include/RiemannianMesh.inl:
RiemannianMesh::CotangentMass( size_t vNum , const std::vector< SimplexIndex< K > > & triangles , MetricFunctor && metricFunctor )
RiemannianMesh::Differential( size_t vNum , const std::vector< SimplexIndex< K > > & triangles )
MetricFunctor. This is a functor that takes as it's input an integer indexing a triangle and returns a Eigen::Matrix< double , 2 , 2 > object giving the pulled-back inner-product on the tangent space. Your implementation should not need access to the vertices of the mesh.RiemannianMesh::CotangentMass( const Mesh & mesh )
RiemannianMesh::Differential( const Mesh & mesh )
Mesh object, and construct the functor (for computing the mass matrix), and pass that to the functions computing the mass and stiffness matrices.
GradientDomainFiltering/GradientDomainFiltering.cpp:
GradientDomainFiltering constructor, you will need to initially set up the solver, GDFiltering::_solver.
GradientDomainFiltering::_updateNumericalFactorization member function to update the solver when the system matrix has changed. (Recall that, since the connectivity of the mesh has not changed, you only need to update the numerical factorization, not the symbolic one.)GradientDomainFiltering::animate member function to compute the modulated target differential and solve the gradient-domain problem.
GeodesicsInHeat/GeodesicsInHeat.cpp:
GeodesicsInHeat constructor, you will need to initially set up the solvers, GeodesicsInHeat:_diffusionSolver and GeodesicsInHeat::_distanceSolver.
GeodesicsInHeat::animate member function to
GeodesicsInHeat::_sourceIndex
GeodesicsInHeat::diffusionTime
GeodesicsInHeat::regularizationWeight
Include/RiemannianMesh.[h/inl], GradientDomainFiltering/GradientDomainFiltering.cpp, and GeodesicsInHeat/GeodesicsInHeat.cpp files.