trimesh_cotangent_laplacian_matrix

compas.datastructures.trimesh_cotangent_laplacian_matrix(mesh, rtype='csr')[source]

Construct the Laplacian of a triangular mesh with cotangent weights.

Parameters

mesh (compas.datastructures.Mesh) – Instance of mesh.

Returns

array – The Laplacian matrix with cotangent weights.

Notes

The cotangent laplacian of a vertex vi points from the vertex to the projection of the vertex into the 1-ring plane. The cotangent laplacian vectors of a mesh thus provide an approximation of the per-vertex normals.

The n×n cotangent Laplacian matrix L of a mesh with vertices V and edges E is defined as follows 1

Lij={1if i = jwijif (i, j) \in \mathbf{E}0otherwise

with

wij=ωij(i,k)Eiωik

Examples

>>>

References

1

Nealen A., Igarashi T., Sorkine O. and Alexa M. Laplacian Mesh Optimization.