Geometry Processing, Spring 2026

Michael Kazhdan


Assignment 4: Gradient-domain filtering and Geodesics-in-Heat

Due on April 4 (Saturday) at 11:59 PM


Announcements


Overview

In this assignment you will implement the correct Laplacian smoothing algorithm in which, at each time-step, the vertex positions are updated by performing a semi-implicit time-step of the gradient descent PDE, using the correct bilinear form for stiffness, and transforming the differential of the Dirichlet energy into a gradient. The smoothing will be applied to the x-, y-, and z-coordinates, resulting in the smoothing of the geometry itself.

Getting Started

You should use the code (GeometryProcessing.zip) as a starting point for your assignment. We provide you with numerous files, but you should only have to change the 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.


How to Invoke the Executable

GradientDomainFiltering
The executable runs on the command line. It takes a geometry file as input, either in ply or in obj file format (determined by the file extension) and opens up an OpenGL-based viewer supporting the "painting" of modulation weights on mesh triangles, and the solving of the associated gradient-domain problem to obtain smoothed/sharpened vertex positions.
To see the supported command line arguments, run the executable without an argyments:
% GradientDomainFiltering
To smooth the geometry, invoke the executable as:
% GradientDomainFiltering --in <input geometry> --dWeight <differential fitting weight>
With:

GeodesicsInHeat
The executable runs on the command line. It takes a geometry file as input, either in ply or in obj file format (determined by the file extension) and opens up an OpenGL-based viewer supporting the selection of a source vertex and the computation of the geodesics distance from the source to all mesh vertices.
To see the supported command line arguments, run the executable without an argyments:
% GeodesicsInHeat
To smooth the geometry, invoke the executable as:
% GeodesicsInHeat --in <input geometry> --dTime <delta diffusion time> --rWeight <regularization weight>
With:

How to Interact with the Executable

GradientDomainFiltering
Upon invocation, the executable will open an OpenGL window where local smoothing/sharpening weights can be prescribed.
The basic supported interfaces are:

GeodesicsInHeat
Upon invocation, the executable will open an OpenGL window where local smoothing/sharpening weights can be prescribed.
The basic supported interfaces are:

What You Have to Do

Include/RiemannianMesh.inl:
You will need to modify this file to support the computation of the cotangent vector field mass matrix and the differential matrix taking coefficients of a scalar function to the coefficients of its differential. To do this you will need to complete the bodies of the two methods: Please note, that the last argument to the first member functions is an object of type 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.
In your code, you should only have to invoke the functions: as these will extract the necessary data from the 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:
You will need to modify this file to support the factorization of the system matrix in three places:

GeodesicsInHeat/GeodesicsInHeat.cpp:
You will need to modify this file to support the compuationg of geodesics distances from the source in two places:
Please see the assignment description for additional details.

Questions


What to Submit

Please submit your implementation on canvas.
For this assignment, you should submit: