Skip to content

Function: computeMeanCurvature()

ts
function computeMeanCurvature(geometry): Float32Array;

Defined in: src/utils/curvature.ts:18

Compute mean curvature for each vertex of a mesh.

Uses the umbrella operator (uniform Laplacian) as a fast approximation: H ≈ |v - mean(neighbors)| with sign determined by the vertex normal.

NOTE: This is only meaningful on folded (pial) surfaces. On inflated or flat surfaces, curvature will be near-zero. For those cases, load pre-computed curvature from the original folded surface.

Parameters

geometry

SurfaceGeometry

The surface geometry to compute curvature for

Returns

Float32Array

Float32Array of mean curvature values per vertex

Released under the MIT License.