spectralbrain.anisotropic_laplacian#
- spectralbrain.anisotropic_laplacian(vertices, faces, *, anisotropy=1.0, direction='max_curvature', custom_directions=None)[source]#
Build an anisotropic Laplacian weighted by curvature direction.
Modifies the cotangent Laplacian by scaling diffusion along the principal curvature directions. When
anisotropy=0, recovers the standard isotropic Laplacian. Whenanisotropy=1, diffusion is maximally biased along the chosen direction.This is a simplified implementation inspired by Andreux, Rodolà, Aubry & Cremers (NORDIA 2014) and the Finsler-LBO of Jadhav & Cremers (CVPR 2024).
- Parameters:
vertices (ndarray, shape (N, 3))
faces (ndarray, shape (F, 3))
anisotropy (float) – Anisotropy strength in [0, 1]. 0 = isotropic, 1 = fully directional.
direction (str) –
"max_curvature"— bias along maximum curvature direction."min_curvature"— bias along minimum curvature direction."custom"— use custom_directions.custom_directions (ndarray, shape (N, 3), optional) – Per-vertex preferred directions (unit vectors).
- Returns:
L (SparseMatrix, shape (N, N))
M (MassMatrix, shape (N, N))
- Return type: