DiffGeoOps
This repository contains the python implementation of the paper titled "Discrete Differential-Geometry Operators for Triangulated 2-Manifolds" by Meyer et. al. VisMath 2002 http://multires.caltech.edu/pubs/diffGeoOps.pdf
Install / Use
/learn @Pranav-Jain/DiffGeoOpsREADME
DiffGeoOps
The project aims to find the principal, mean and gaussian curvatures on triangular meshes using the famous cotangent formula. The implementation is motivated from the following paper.
http://multires.caltech.edu/pubs/diffGeoOps.pdf
Requirements
The code uses the following libraries
- numpy
- csv
- mayavi (for plotting)
Make sure to install them before running the code.
Caution: Currently, the code supports meshes in
.txtand.offformat only.
Usage
The file curvature.py finds all the curvatures (principal, mean and gaussian) given a triangular mesh and stores the curvature values at each vertex of the triangular mesh in a csv file named output.csv.
If the mesh is in .off format, run
$ python curvature.py <path to off file>
If the mesh is in .txt format, run
$ python curvature.py <path to vertices.txt file> <path to triangles.txt file>
Caution: The first argument is the file containing vertices and the second argument is the file contatining triangles.
Plotting
The file plot.py shows the plots of the meshes with color scheme according to the value of curvatures. The file plot.py reads from the output.csv created by curvature.py. Make sure that the csv file is the same directory as plot.py.
If the mesh is in .off format, run
$ python plot.py <path to off file>
If the mesh is in .txt format, run
$ python plot.py <path to vertices.txt file> <path to triangles.txt file>
Caution: The first argument is the file containing vertices and the second argument is the file contatining triangles.
Outputs
The Gaussian Curvature plots of some of the meshes is shown below.

License
Copyright (c) 2019 Pranav Jain
For license information, see LICENSE or http://mit-license.org
For bugs in the code, please write to: pranav16255 [at] iiitd [dot] ac [dot] in
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
