trimesh_gaussian_curvature
- compas_rhino.geometry.trimesh_gaussian_curvature(M)[source]
Compute the discrete Gaussian curvature of a triangle mesh.
- Parameters:
- Mtuple[sequence[[float, float, float] |
compas.geometry.Point
], sequence[[int, int, int]]] A mesh represented by a list of vertices and a list of faces.
- Mtuple[sequence[[float, float, float] |
- Returns:
- list[float]
The discrete Gaussian curvature per vertex.
Notes
Description: The angle defect at a vertex is used to describe the Gaussian curvature in a neighborhood around a vertex.
- Notation Convention:
- discrete Gaussian curvature at vertex i - the vertices from the Star of vertex i - the vectors from vertex i to j and i to k - interior angle at vertex i of triangle ijk
Formula:
References
[1]Formula of Discrete Gaussian Curvature available at Keenan Crane’s lecture, 03:16-07:11, at https://youtu.be/sokeN5VxBB8
Examples
Make a mesh from scratch >>> from compas.geometry import Sphere >>> sphere = Sphere([1, 1, 1], 1) >>> sphere = Mesh.from_shape(sphere, u=30, v=30) >>> sphere.quads_to_triangles() >>> M = sphere.to_vertices_and_faces()
Compute the discrete Gaussian curvature >>> K = trimesh_gaussian_curvature(M)