lapy.conformal¶
Computes spherical conformal mappings of triangle meshes.
Functions are adopted from Matlab code at https://github.com/garyptchoi/spherical-conformal-map with this Copyright (c) 2013-2020, Gary Pui-Tung Choi https://math.mit.edu/~ptchoi and has been distributed with the Apache 2 License.
Notes¶
If you use this code in your own work, please cite the following paper:
[1] P. T. Choi, K. C. Lam, and L. M. Lui, “FLASH: Fast Landmark Aligned Spherical Harmonic Parameterization for Genus-0 Closed Brain Surfaces.” SIAM Journal on Imaging Sciences, vol. 8, no. 1, pp. 67-94, 2015.
- lapy.conformal.beltrami_coefficient(tria, mapping)¶
Compute the Beltrami coefficient of a mapping.
- lapy.conformal.inverse_stereographic(u)¶
Map from complex plane to sphere via inverse stereographic projection.
- Parameters:
- uarray_like
Can be complex array, or two columns (real, img) for coordinates on complex plane.
- Returns:
- v:
array
of shape (n, 3) Coordinates on sphere in 3D.
- v:
- lapy.conformal.linear_beltrami_solver(tria, mu, landmark, target, use_cholmod=False)¶
Linear Beltrami solver.
- Parameters:
- tria
TriaMesh
Genus-0 closed triangle mesh. Should be planar mapping on complex plane.
- muarray_like
Complex Beltrami coefficients.
- landmarkarray_like
Fixed vertex indices.
- target
array
3d array with 2d landmark target coordinates (3rd coordinate is zero).
- use_cholmod
bool
, default=False - Which solver to use:
True : Use Cholesky decomposition from scikit-sparse cholmod.
False: Use spsolve (LU decomposition).
- tria
- Returns:
- mapping
array
3d vertex coordinates of new mapping.
- mapping
- lapy.conformal.mobius_area_correction_spherical(tria, mapping)¶
Find an improved Mobius transformation to reduce distortion.
This helps reducing the area distortion of a spherical conformal parameterization using the method in Choi et al, SIAM Journal on Imaging Sciences, 2020.
- Parameters:
- Returns:
- lapy.conformal.spherical_conformal_map(tria, use_cholmod=False)¶
Linear method for computing spherical conformal map of a genus-0 closed surface.