{"id":24315729,"url":"https://github.com/hoskillua/ddgorgeous","last_synced_at":"2025-09-26T22:31:04.121Z","repository":{"id":65802975,"uuid":"461904236","full_name":"hoskillua/DDGorgeous","owner":"hoskillua","description":"A mini–C++ Geometry processing library based on a code skeleton provided by CMU’s Discrete Differential Geometry course \u0026 Geometry Central","archived":false,"fork":false,"pushed_at":"2023-02-12T21:41:42.000Z","size":26283,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T15:14:21.621Z","etag":null,"topics":["discrete-differential-geometry","geometry-processing"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoskillua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-21T14:47:24.000Z","updated_at":"2025-01-11T11:50:32.000Z","dependencies_parsed_at":"2023-05-25T06:15:05.904Z","dependency_job_id":null,"html_url":"https://github.com/hoskillua/DDGorgeous","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hoskillua/DDGorgeous","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoskillua%2FDDGorgeous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoskillua%2FDDGorgeous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoskillua%2FDDGorgeous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoskillua%2FDDGorgeous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoskillua","download_url":"https://codeload.github.com/hoskillua/DDGorgeous/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoskillua%2FDDGorgeous/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277155391,"owners_count":25770555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-26T02:00:09.010Z","response_time":78,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discrete-differential-geometry","geometry-processing"],"created_at":"2025-01-17T11:28:56.700Z","updated_at":"2025-09-26T22:31:04.114Z","avatar_url":"https://github.com/hoskillua.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1676217625515.png\" style=\"width:350px;\" alt=\"Simplicial Complex\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003ch1 align=\"center\"\u003eDDGorgeous\u003c/h1\u003e\n\nThis repo contains implementations of a collection of discrete differnetial geometry algorithms. They are based on a [C++ skeleton code](https://github.com/GeometryCollective/ddg-exercises) for the course assignments from [Discrete Differential Geometry](https://brickisland.net/DDGSpring2020/) (15-458/858).\n\nThis code framework uses [Geometry Central](https://github.com/nmwsharp/geometry-central) for geometry processing utilities and [Polyscope](https://github.com/nmwsharp/polyscope) for visualization, which were developed by Nick Sharp and others in the [Geometry Collective](http://geometry.cs.cmu.edu/). 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.\n\n# Table of Contents\n\n- [Results](#results)\n  - [1. Simplicial Complex Operations](#1-simplicial-complex-operations)\n  - [2. Discrete Exterior Calculus Operators](#2-discrete-exterior-calculus-operators)\n  - [3. Normals \u0026amp; Curvatures](#3-normals--curvatures)\n  - [4. The Laplace-Beltrami Operator \u0026amp; its Applications](#4-the-laplace-beltrami-operator--its-applications)\n  - [5. Geodesics: The Heat Method](#5-geodesics-the-heat-method)\n  - [6. Conformal Parameterization](#6-conformal-parameterization)\n  - [7. Vector Field Decomposition and Design](#7-vector-field-decomposition-and-design)\n- [Dependencies](#dependencies-all-included)\n\n# Results\n\nBelow are the highlights of the implemented algorithms.\n\n## 1. Simplicial Complex Operations\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/Simplicial_complex_example.svg.png\" style=\"width:350px;\" alt=\"Simplicial Complex\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nGiven 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()`)\n\n\u003cbr /\u003e\n\n|                                                        Operator                                                        |                                          Results (GIFs)                                          |\n| :---------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: |\n|      **Star \u0026 Closure**\u003cbr /\u003e![img](image/README/1650891275357.png)\u003cbr /\u003e![img](image/README/1650891304489.png)      | Can use them together repeateadly to grow a selection.\u003cbr /\u003e![img](image/README/1650890503193.png) |\n| **Link \u0026 Boundary**\u003cbr /\u003e![1676208491058](image/README/1676208491058.png)\u003cbr /\u003e![img](image/README/1650891245290.png) |  Can think of as an exclusive vs inclusive boundaries\u003cbr /\u003e![img](image/README/1650890508006.png)  |\n\n## 2. Discrete Exterior Calculus Operators\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1650891936774.png\" style=\"width:450px;\" alt=\"Discrete Exterior Calculus\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nI 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.\n\n\u003cbr /\u003e\n\n|                                                                     Operator                                                                     |            Results (GIF)            |\n| :-----------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------: |\n| **Exterior Deravtive \u0026 Hodge Star**\u003cbr /\u003e![1676211127231](image/README/1676211127231.png)\u003cbr /\u003e![1676211109122](image/README/1676211109122.png) | ![img](image/README/1650902675076.png) |\n\n## 3. Normals \u0026 Curvatures\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1676211408743.png\" alt=\"Normals \u0026 Curvatures\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nI 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.\n\n\u003cbr /\u003e\n\n|                                               Algorithm                                               |                                                                                 Results                                                                                 |\n| :---------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| **Vertex Normal Computation Methods\u003cbr /\u003e\u003cbr /\u003e![1676067070587](image/README/1676067070587.png)** |                                                              ![1676072347255](image/README/1676072347255.png)                                                              |\n|     **Curvatures Computation \u003cbr /\u003e\u003cbr /\u003e![1676070772224](image/README/1676070772224.png)**     | **kmin \u0026 kmax:**\u003cbr /\u003e![1676070259394](image/README/1676070259394.png)\u003cbr /\u003e**Mean \u0026 Gaussian Curvature:**\u003cbr /\u003e![1676070266904](image/README/1676070266904.png) |\n\n## 4. The Laplace-Beltrami Operator \u0026 its Applications\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1676214620423.png\" style=\"width:500px\" alt=\"Laplace-Beltrami\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nI 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.\n\n\u003cbr /\u003e\n\n|                                              Algorithm                                              |                                                                                                                                                                                                                                             Results (GIFs)                                                                                                                                                                                                                                             |\n| :-------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n|        **Poisson Equation\u003cbr /\u003e\u003cbr /\u003e![1676147668933](image/README/1676147668933.png)**        |                                                                                                                                                                                                                             ![1676148797658](image/README/1676148797658.png)                                                                                                                                                                                                                             |\n| **Smoothing using Curvature Flows\u003cbr /\u003e\u003cbr /\u003e![1676147729135](image/README/1676147729135.png)** | **Mean Curvature Flow** (11 iterations)\u003cbr /\u003e(Updating Laplace Matrix in each iteration Vs using the initial one)\u003cbr /\u003e*Using the initial matrix (only updating mass matrix) helps with avoiding singularities*\u003cbr /\u003e![flow1](image/README/meancurvature1.gif)\u003cbr /\u003e\u003cbr /\u003e**Stationary-Laplacian Mean Curvature flow**\u003cbr /\u003e(~ 40 iterations, step size 0.001 vs 11 with step size 0.01)\u003cbr /\u003e*step size affects speed of convergance*\u003cbr /\u003e![flow2](image/README/meancurvature2.gif) |\n\n## 5. Geodesics: The Heat Method\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1676214445987.png\" style=\"width:350px\" alt=\"The Heat Method\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nDistance Computation was implemented using the heat method. This is based on a [paper by Crane et al](https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/). 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.\n\n\u003cbr /\u003e\n\n|                                                                                                                                                                                                                                                         Algorithm                                                                                                                                                                                                                                                         |                    Results                    |\n| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------: |\n| **Geodesics using**[ the Heat Method](https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/) \u003cbr /\u003e![1676071513876](image/README/1676071513876.png)\u003cbr /\u003e![1676071566899](image/README/1676071566899.png)\u003cbr /\u003e(I) Heat is allowed to diffuse for short time (top-left). \u003cbr /\u003e(II) The temperature gradient (top-right) \u003cbr /\u003eis normalized \u0026 negated to get a field (bottom-left) pointing along geodesics. \u003cbr /\u003e(III) A function whose gradient follows the vector field recovers the final distance (bottom-right). | ![1676073261736](image/README/1676073261736.png) |\n\n## 6. Conformal Parameterization\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./image/README/1676236923500.png\" style=\"width:500px\" alt=\"Conformal Parameterization\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nThis is also an application of the laplace-beltrami operator. The Complex Laplacian was used to implement the conformal parameterization of a mesh.\n\n\u003cbr /\u003e\n\n|                                        Algorithm                                        |                    Results                    |\n| :--------------------------------------------------------------------------------------: | :--------------------------------------------: |\n| **Conformal Parameterization**\u003cbr /\u003e![1676237751186](image/README/1676237751186.png) | ![1676237474389](image/README/1676237474389.png) |\n\n## 7. Vector Field Decomposition and Design\n\nTBA\n\n\n# Dependencies (all included)\n\n1. Geometry processing and linear algebra - [Geometry Central](https://github.com/nmwsharp/geometry-central), which in turn has dependencies on [Eigen](https://eigen.tuxfamily.org) and/or [Suitesparse](https://people.engr.tamu.edu/davis/suitesparse.html).\n2. Visualization - [Polyscope](https://github.com/nmwsharp/polyscope)\n3. Unit tests - [Google Test](https://github.com/google/googletest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoskillua%2Fddgorgeous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoskillua%2Fddgorgeous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoskillua%2Fddgorgeous/lists"}