Skip to content

Shape operator for triangle meshes

Usage

shape_op = ShapeOperator(input_mesh)
shape_op.run()
print(shape_op[3]) # A 2x2 matrix representing the shape operator at vertex #3

Mean and Gaussian curvature distributions as a colormap on the Armadillo model

Mean curvature (left) and Gaussian curvature (right) on the Armadillo model

ShapeOperator

Bases: Worker

Computes the shape operator at each vertex of a triangle mesh. The method is based on least-square fitting of a second order polynomial to a neighborhood of points near each vertex. The size of this neighbordhood can be specified in the .run() method to vary the amount of smoothing.

Parameters:

Name Type Description Default
mesh SurfaceMesh

The input surface mesh. Should be triangulated.

required
verbose bool

Verbose mode. Defaults to True.

True

Attributes:

Name Type Description
shape_op ndarray

a Vx2x2 array containing the 2x2 shape operator matrix for each vertex

References

[1] Estimating Differential Quantities Using Polynomial Fitting of Osculating Jets, F.Cazals & M.Pouget (2003) [2] https://github.com/alecjacobson/geometry-processing-curvature

gaussian_curvature property

Gaussian curvature estimator at each vertex. Defined as the determinant of the shape operator. The values are weighted by the local areas around each vertex.

Returns:

Name Type Description
ArrayAttribute ArrayAttribute

Gaussian curvature as one float per vertex

mean_curvature property

Mean curvature estimator at each vertex. Defined as half the trace of the shape operator.

Returns:

Name Type Description
ArrayAttribute ArrayAttribute

Mean curvature as one float per vertex.

run(patch_size=3)

Runs the computation of the shape operator for each vertex.

Parameters:

Name Type Description Default
patch_size int

max number of edges that separate the central vertex to a considered neighbor. Higher values mean that the polynomial approximation is fitted onto a larger neighborhood of the point, providing more stability but smoothing out the result. Defaults to 3.

3