{"id":13443850,"url":"https://github.com/justachetan/DiffGeoOps","last_synced_at":"2025-03-20T17:32:01.770Z","repository":{"id":40954620,"uuid":"185427001","full_name":"justachetan/DiffGeoOps","owner":"justachetan","description":"Python implementation of the paper \"Discrete Differential-Geometry Operators for Triangulated 2-Manifolds\" by Meyer et. al. VisMath 2002","archived":false,"fork":false,"pushed_at":"2023-08-14T23:42:04.000Z","size":2131,"stargazers_count":53,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-28T07:41:11.164Z","etag":null,"topics":["2-manifolds","3d","curvature","differential-geometry","differential-geometry-operators","discrete-differential-geometry","manifolds","mayavi","mother-son-mesh","numerical-methods","python","python3","scientific-computing","torus","triangulation"],"latest_commit_sha":null,"homepage":"http://multires.caltech.edu/pubs/diffGeoOps.pdf","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justachetan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-07T15:12:49.000Z","updated_at":"2024-10-22T07:45:11.000Z","dependencies_parsed_at":"2023-01-19T23:35:02.431Z","dependency_job_id":"1986f16d-96e0-47bc-b925-759c0dd60074","html_url":"https://github.com/justachetan/DiffGeoOps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justachetan%2FDiffGeoOps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justachetan%2FDiffGeoOps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justachetan%2FDiffGeoOps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justachetan%2FDiffGeoOps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justachetan","download_url":"https://codeload.github.com/justachetan/DiffGeoOps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244660605,"owners_count":20489365,"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","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":["2-manifolds","3d","curvature","differential-geometry","differential-geometry-operators","discrete-differential-geometry","manifolds","mayavi","mother-son-mesh","numerical-methods","python","python3","scientific-computing","torus","triangulation"],"created_at":"2024-07-31T03:02:12.036Z","updated_at":"2025-03-20T17:31:56.759Z","avatar_url":"https://github.com/justachetan.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# DiffGeoOps\n\nThis repository contains a Python implementation of the paper:\n\n\u003e[Discrete Differential-Geometry Operators for Triangulated 2-Manifolds. *Mark Meyer*, *Mathieu Desbrun*, *Peter Schröder* and *Alan H. Barr*. *VisMath 2002*](http://www.multires.caltech.edu/pubs/diffGeoOps.pdf)\n\nThis module implements the discrete versions of three differential geometry operators for Triangulated 2-manifolds that have been discussed in the paper. They are:\n\n- Mean Curvature\n- Gaussian Curvature\n- Principal Curvature\n\n## Usage\n\n```\n$ python3 DiffGeoOps.py -h\nusage: DiffGeoOps.py [-h] --mode MODE [--ops OPS] [--mesh MESH] [--save]\n                     [--title TITLE]\n                     i [i ...]\n\nFirst, use '--mode 0' to generate files for containing value of the\noperator and then plot the operatore using '--mode 1' and '--mesh'. For\n'--ops', the operations are encoded as:\n  - 1: Mean Curvature\n  - 2: Gaussian Curvature\n  - 3: Principal Curvatures\nNote that each operation is performed for all the input files.\n\npositional arguments:\n  i              path to input file(s)\n\noptional arguments:\n  -h, --help     show this help message and exit\n  --mode MODE    specifies mode for program:\n                 - 0: For computation\n                 - 1: For Plotting\n  --ops OPS      number to denote all the operations to be\n                 performed on each file.\n  --mesh MESH    mesh on which curvatures were calculated (redundant in computation mode)\n  --save         flag for saving the plot (redundant in computation mode)\n  --title TITLE  title of plot (redundant in computation mode)\n```\n\n\nFirst you need to provide a 3D mesh as an input to the code with `--mode 0` for computation. The mesh should be in Object File Format (.off). Then use the command with `--mode 1` for plotting. For more explaination, see Example Usage.\n\n### Example Usage\n\n```\n$ # Calculating Gaussian Curvature of a Torus mesh\n$ python3 DiffGeoOps.py --mode 0 --op 2 torus.off\n$ # Plotting the generated values. The file generated will be \u003cMESH-NAME\u003e_\u003cOP\u003e.npy\n$ python3 DiffGeoOps.py --mode 1 --mesh torus.off torus_KG.npy\n```\n\nYou can also provide multiple files as input for `--mode 0` now:\n\n```\n$ # Calculating Mean and Gaussian curvatures for 2 meshes\n$ python DiffGeoOps.py --mode 0 --op 12 example_meshes/torus.off example_meshes/moebius.off\n[DiffGeoOps]: Mean Curvature for example_meshes/torus.off saved to ./example_meshes/torus_KH.npy\n[DiffGeoOps]: Gaussian Curvature for example_meshes/torus.off saved to ./example_meshes/torus_KG.npy\n[DiffGeoOps]: Mean Curvature for example_meshes/moebius.off saved to ./example_meshes/moebius_KH.npy\n[DiffGeoOps]: Gaussian Curvature for example_meshes/moebius.off saved to ./example_meshes/moebius_KG.npy\n```\n\n**Note**: The plot mode does not yet support multiple inputs\n\n\n## Some results\n- Plot of Gaussian curvature for Torus\n\n![Gaussian curvature for Torus](img/torus_KG.png \"Gaussian curvature of Torus\")\n\n\u003cbr\u003e \u003cbr\u003e\n- Plot of Mean curvature for the Mother-son mesh\n![Mean curvature for Mother-son mesh](img/mother.png \"Mean curvature plot for Mother-son mesh\")\n\n\n## License \n\nCopyright (c) 2019 Aditya Chetan\n\nFor license information, see [LICENSE](LICENSE) or http://mit-license.org\n\n\n- - -\n\nThis code was written as a part of my independent study in **Differential Geometry** with [Dr. Kaushik Kalyanaraman](https://www.iiitd.ac.in/kaushik) at IIIT Delhi during Winter 2019 Semester. \n\nFor bugs in the code, please write to: aditya16217 [at] iiitd [dot] ac [dot] in\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustachetan%2FDiffGeoOps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustachetan%2FDiffGeoOps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustachetan%2FDiffGeoOps/lists"}