DDGorgeous

所属分类:C/C++基础
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2023-02-12 21:41:42
上 传 者sh-1993
说明:  基于CMU的离散微分几何课程和几何中心提供的代码框架的迷你C++几何处理库,
(A mini–C++ Geometry processing library based on a code skeleton provided by CMU’s Discrete Differential Geometry course & Geometry Central,)

文件列表:
.clang-format (579, 2023-02-12)
Reading Summaries.docx (17260, 2023-02-12)
ReadingSummaries.md (4975, 2023-02-12)
ReadingSummaries/ (0, 2023-02-12)
ReadingSummaries/image001.png (605, 2023-02-12)
ReadingSummaries/image002.png (635, 2023-02-12)
ReadingSummaries/image003.png (6123, 2023-02-12)
ReadingSummaries/image004.png (496, 2023-02-12)
ReadingSummaries/image005.png (1978, 2023-02-12)
core/ (0, 2023-02-12)
core/include/ (0, 2023-02-12)
core/include/mesh_subset.h (4404, 2023-02-12)
core/src/ (0, 2023-02-12)
core/src/discrete-exterior-calculus.cpp (5064, 2023-02-12)
core/src/geometry.cpp (16448, 2023-02-12)
deps/ (0, 2023-02-12)
deps/geometry-central/ (0, 2023-02-12)
deps/googletest/ (0, 2023-02-12)
deps/polyscope/ (0, 2023-02-12)
image/ (0, 2023-02-12)
... ...

Simplicial Complex

DDGorgeous

This 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). This 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. # Table of Contents - [Results](#results) - [1. Simplicial Complex Operations](#1-simplicial-complex-operations) - [2. Discrete Exterior Calculus Operators](#2-discrete-exterior-calculus-operators) - [3. Normals & Curvatures](#3-normals--curvatures) - [4. The Laplace-Beltrami Operator & its Applications](#4-the-laplace-beltrami-operator--its-applications) - [5. Geodesics: The Heat Method](#5-geodesics-the-heat-method) - [6. Conformal Parameterization](#6-conformal-parameterization) - [7. Vector Field Decomposition and Design](#7-vector-field-decomposition-and-design) - [Dependencies](#dependencies-all-included) # Results Below are the highlights of the implemented algorithms. ## 1. Simplicial Complex Operations
Simplicial Complex

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()`)
| Operator | Results (GIFs) | | :---------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: | | **Star &Closure**
![img](image/README/1650891275357.png)
![img](image/README/1650891304489.png) | Can use them together repeateadly to grow a selection.
![img](image/README/1650890503193.png) | | **Link & Boundary**
![1676208491058](image/README/1676208491058.png)
![img](image/README/1650891245290.png) | Can think of as an exclusive vs inclusive boundaries
![img](image/README/1650890508006.png) | ## 2. Discrete Exterior Calculus Operators
Discrete Exterior Calculus

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.
| Operator | Results (GIF) | | :-----------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------: | | **Exterior Deravtive & Hodge Star**
![1676211127231](image/README/1676211127231.png)
![1676211109122](image/README/1676211109122.png) | ![img](image/README/1650902675076.png) | ## 3. Normals & Curvatures
Normals & Curvatures

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.
| Algorithm | Results | | :---------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | **Vertex Normal Computation Methods

![1676067070587](image/README/1676067070587.png)** | ![1676072347255](image/README/1676072347255.png) | | **Curvatures Computation

![1676070772224](image/README/1676070772224.png)** | **kmin & kmax:**
![1676070259394](image/README/1676070259394.png)
**Mean & Gaussian Curvature:**
![1676070266904](image/README/1676070266904.png) | ## 4. The Laplace-Beltrami Operator & its Applications
Laplace-Beltrami

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.
| Algorithm | Results (GIFs) | | :-------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | **Poisson Equation

![1676147668933](image/README/1676147668933.png)** | ![1676148797658](image/README/1676148797658.png) | | **Smoothing using Curvature Flows

![1676147729135](image/README/1676147729135.png)** | **Mean Curvature Flow** (11 iterations)
(Updating Laplace Matrix in each iterationVs using the initial one)
*Using the initialmatrix (only updating mass matrix) helps with avoiding singularities*
![flow1](image/README/meancurvature1.gif)

**Stationary-Laplacian Mean Curvature flow**
(~ 40iterations,step size0.001 vs 11with step size 0.01)
*step size affects speed of convergance*
![flow2](image/README/meancurvature2.gif) | ## 5. Geodesics: The Heat Method
The Heat Method

Distance 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.
| Algorithm | Results | | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------: | | **Geodesics using**[the Heat Method](https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/)
![1676071513876](image/README/1676071513876.png)
![1676071566899](image/README/1676071566899.png)
(I) Heat is allowed to diffuse for shorttime (top-left).
(II) The temperature gradient (top-right)
is normalized & negated to get a field (bottom-left) pointing along geodesics.
(III) A function whose gradient follows the vector field recovers the final distance (bottom-right). | ![1676073261736](image/README/1676073261736.png) | ## 6. Conformal Parameterization
Conformal Parameterization

This is also an application of the laplace-beltrami operator. The Complex Laplacian was used to implement the conformal parameterization of a mesh.
| Algorithm | Results | | :--------------------------------------------------------------------------------------: | :--------------------------------------------: | | **Conformal Parameterization**
![1676237751186](image/README/1676237751186.png) | ![1676237474389](image/README/1676237474389.png) | ## 7. Vector Field Decomposition and Design TBA # Dependencies (all included) 1. 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). 2. Visualization - [Polyscope](https://github.com/nmwsharp/polyscope) 3. Unit tests - [Google Test](https://github.com/google/googletest)

近期下载者

相关文件


收藏者