m3sh.traits.

cotan_weights#

cotan_weights(mesh, boundary=nan, clamp=False)#

Cotangent weights.

Compute cotangent weights for all halfedges of mesh.

Parameters:
meshMesh

A triangle mesh instance.

boundaryfloat, optional

Default value if halfedge is on the boundary of mesh.

clampbool, optional

Pass True to set negative weights to zero.

Returns:
weightsdict[Halfedge, float]

A dictionary that maps halfedge instances to their cotangent weight.

See also

cotan_weight

Notes

Weights are assigned to halfedges! Add the weights of halfedge pairs to obtain edge weights (as in the definition of the cotan-Laplacian).