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.
- mesh
- Returns:
- array_like
The Laplacian matrix with cotangent weights.
Notes
The cotangent laplacian of a vertex \(\mathbf{v}_{i}\) 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 \times n\) cotangent Laplacian matrix \(\mathbf{L}\) of a mesh with vertices \(\mathbf{V}\) and edges \(\mathbf{E}\) is defined as follows [1]
\[\begin{split}\mathbf{L}_{ij} = \begin{cases} -1 & \text{if i = j} \\ w_{ij} & \text{if (i, j) \in \mathbf{E}} \\ 0 & \text{otherwise} \end{cases}\end{split}\]with
\[w_{ij} = \frac{\omega_{ij}}{\sum_{(i, k) \in \mathbf{E}_{i}} \omega_{ik}}\]References
[1]Nealen A., Igarashi T., Sorkine O. and Alexa M. Laplacian Mesh Optimization.