trimesh_mean_curvature

compas_rhino.geometry.trimesh.trimesh_mean_curvature(M)[source]

Compute the discrete mean curvature of a triangle mesh.

Parameters

M (tuple[sequence[[float, float, float] or compas.geometry.Point], sequence[[int, int, int]]]) – A mesh represented by a list of vertices and a list of faces.

Returns

list[float] – The discrete mean curvature per vertex.

Notes

Description: The discrete mean curvature is computed by edge length and its dihedral angle.

Notation Convention:
  • \(H_{i}\) - discrete mean curvature at vertex i

  • \(E\) - all the edges connected to vertex i

  • \(j\) - a vertex connected to vertex i

  • \(l_{ij}\) - the length of edge ij

  • \(\phi_{ij}\) - the dihedral angle of edge ij

Formula:

\[H_{i} = \frac{1}{4}\sum_{ij\in E}l_{ij}\phi_{ij}\]

References

1

Formula of Discrete Mean Curvature available at Keenan Crane’s lecture, 03:16-07:11, at https://youtu.be/sokeN5VxBB8

2

Formula of dihedral angle available at Keenan Crane’s lecture, 04:20-05:43, at https://youtu.be/NlU1m-OfumE

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 mean curvature >>> H = trimesh_mean_curvature(M)