SkillAgentSearch skills...

DDGorgeous

A mini–C++ Geometry processing library based on a code skeleton provided by CMU’s Discrete Differential Geometry course & Geometry Central

Install / Use

/learn @hoskillua/DDGorgeous
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img src="./image/README/1676217625515.png" style="width:350px;" alt="Simplicial Complex"> </div> <br /> <h1 align="center">DDGorgeous</h1>

This repo contains implementations of a collection of discrete differnetial geometry algorithms. They are based on a C++ skeleton code for the course assignments from Discrete Differential Geometry (15-458/858).

This code framework uses Geometry Central for geometry processing utilities and Polyscope for visualization, which were developed by Nick Sharp and others in the Geometry Collective. Also, It must be acknowledged that most of the illustrations used in this readme come from the course notes text provided with the mentioned course by Keenan Crane.

Table of Contents

Results

Below are the highlights of the implemented algorithms.

1. Simplicial Complex Operations

<div align="center"> <img src="./image/README/Simplicial_complex_example.svg.png" style="width:350px;" alt="Simplicial Complex"> </div> <br />

Given a mesh stored as a Halfedge structure, this part required building the incidence matrices and vector encodings for the mesh and its elements. These were then used to implement simple selection operations like Closure, Star, Link and boundary, as well as some simple boolen checks on a subcomplex of the mesh (isComplex(() and isPureComplex())

<br />

| Operator | Results (GIFs) | | :---------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: | | Star & Closure<br />img<br />img | Can use them together repeateadly to grow a selection.<br />img | | Link & Boundary<br />1676208491058<br />img | Can think of as an exclusive vs inclusive boundaries<br />img |

2. Discrete Exterior Calculus Operators

<div align="center"> <img src="./image/README/1650891936774.png" style="width:450px;" alt="Discrete Exterior Calculus"> </div> <br />

I got to learn about the discrete exterior calculus operators. The implementation of the discrete exterior derivative and the discrete Hodge star operators mainly involved implementing cotan() and barycentricDualArea() functions and using them to compute the discrete exterior derivative and the discrete Hodge star operators as matrices.

<br />

| Operator | Results (GIF) | | :-----------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------: | | Exterior Deravtive & Hodge Star<br />1676211127231<br />1676211109122 | img |

3. Normals & Curvatures

<div align="center"> <img src="./image/README/1676211408743.png" alt="Normals & Curvatures"> </div> <br />

I learned about a variety of ways to compute vertex normals, some of which are based on weighted averages of neighboring face normals. I also implemented the computation of the mean and Gaussian curvatures. These two were used to compute the principal curvatures.

<br />

| Algorithm | Results | | :---------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | Vertex Normal Computation Methods<br /><br />1676067070587 | 1676072347255 | | Curvatures Computation <br /><br />1676070772224 | kmin & kmax:<br />1676070259394<br />Mean & Gaussian Curvature:<br />1676070266904 |

4. The Laplace-Beltrami Operator & its Applications

<div align="center"> <img src="./image/README/1676214620423.png" style="width:500px" alt="Laplace-Beltrami"> </div> <br />

I got to implement the Laplace-Beltrami based on the cotangent Laplacian. It was used to implement the Poisson equation solver which was used to smoothely interpolate a function on the mesh. It was also used to implement mesh smoothing using the mean curvature flow and the stationary Laplacian mean curvature flow.

<br />

| Algorithm | Results (GIFs) | | :-------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | Poisson Equation<br /><br />1676147668933 | 1676148797658 | | Smoothing using Curvature Flows<br /><br />1676147729135 | Mean Curvature Flow (11 iterations)<br />(Updating Laplace Matrix in each iteration Vs using the initial one)<br />Using the initial matrix (only updating mass matrix) helps with avoiding singularities<br />flow1<br /><br />Stationary-Laplacian Mean Curvature flow<br />(~ 40 iterations, step size 0.001 vs 11 with step size 0.01)<br />step size affects speed of convergance<br />flow2 |

5. Geodesics: The Heat Method

<div align="center"> <img src="./image/README/1676214445987.png" style="width:350px" alt="The Heat Method"> </div> <br />

Distance Computation was implemented using the heat method. This is based on a paper by Crane et al. First, the heat equation is solved on the mesh to compute the heat flow. Then, the heat flow is used to compute the distance from a given vertex to all other vertices. This involves normalizing the heat flow and negating it to get a vector field pointing along geodesics. A function whose gradient follows this vector field reproduces the final distance.

<br />

| Algorithm | Results | | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Related Skills

View on GitHub
GitHub Stars29
CategoryDevelopment
Updated8mo ago
Forks3

Languages

C++

Security Score

72/100

Audited on Aug 8, 2025

No findings