Curvature#
Discrete differential geometry tools for computing intrinsic and extrinsic curvatures on simplicial manifolds.
Two kinds of curvature are provided:
- Gaussian Curvature (intrinsic)
Computed through the angle defect method: \(K_i = (\theta_{\text{full}} - \sum \theta_{ij}) / A_i^*\), where \(A_i^*\) is the dual (Voronoi) area around vertex \(i\). Gaussian curvature is an intrinsic property (Gauss’s Theorema Egregium), so it works for any codimension. Available at both vertices and cells.
- Mean Curvature (extrinsic)
Computed through the cotangent Laplacian method: \(H_i = \|L \mathbf{x}\|_i / (2 A_i^*)\). Requires codimension 1 (the mesh must have well-defined normal vectors).
Both curvatures are also accessible as cached properties on the
Mesh class (mesh.gaussian_curvature_vertices,
mesh.mean_curvature_vertices).
from physicsnemo.mesh.primitives.surfaces import sphere_icosahedral
mesh = sphere_icosahedral.load(subdivisions=3)
# Via standalone functions
from physicsnemo.mesh.curvature import gaussian_curvature_vertices, mean_curvature_vertices
K = gaussian_curvature_vertices(mesh)
H = mean_curvature_vertices(mesh)
# Or via Mesh properties (equivalent, cached)
K = mesh.gaussian_curvature_vertices
H = mesh.mean_curvature_vertices
API Reference#
Curvature computation for simplicial meshes.
This module provides discrete differential geometry tools for computing intrinsic and extrinsic curvatures on n-dimensional simplicial manifolds.
Gaussian curvature (intrinsic):
Angle-defect method: \(K(v) = \Theta(v) / |{\star}v|\), where \(\Theta(v)\) is the angle defect at vertex \(v\) (full angle minus the sum of incident cell angles) and \(|{\star}v|\) is the dual 0-cell (Voronoi) volume.
Works for any codimension (intrinsic property).
Measures intrinsic geometry (Theorema Egregium).
Mean curvature (extrinsic):
Cotangent-Laplacian method: \(H(v) = \|L\, p\| / (2 \, |{\star}v|)\), where \(p\) is the vertex position vector and \(L\) is the cotangent Laplacian.
Requires codimension-1 (needs normal vectors).
Measures extrinsic bending.
Examples
>>> from physicsnemo.mesh.curvature import gaussian_curvature_vertices, mean_curvature_vertices
>>> from physicsnemo.mesh.primitives.surfaces import sphere_icosahedral
>>> mesh = sphere_icosahedral.load(subdivisions=2)
>>> # Compute Gaussian curvature
>>> K = gaussian_curvature_vertices(mesh)
>>> # Compute mean curvature (codimension-1 only)
>>> H = mean_curvature_vertices(mesh)
>>> # Or use Mesh properties:
>>> K = mesh.gaussian_curvature_vertices
>>> H = mesh.mean_curvature_vertices