Least-Square Conformal Maps
https://en.wikipedia.org/wiki/Least_squares_conformal_map
Usage
import mouette as M
mesh = M.mesh.load("path/to/mesh")
lscm = M.parametrization.LSCM(mesh, [options])
lscm.run()
LSCM(mesh, verbose=False, **kwargs)
Bases: BaseParametrization
Least-Square Conformal Map algorithm for computing a parametrization of a mesh. /!\ The mesh should have the topology of a disk. Computed UVs are stored in the self.uvs container
References
- [1] Least Squares Conformal Maps for Automatic Texture Atlas Generation, Levy et al. (2002)
- [2] Spectral Conformal Parameterization, Mullen et al. (2008)
- [3] Intrinsic Parameterizations of Surface Meshes, Desbrun et al. (2002)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mesh
|
SurfaceMesh
|
the supporting mesh. Should be a surface with disk topology. |
required |
verbose
|
bool
|
verbose mode. Defaults to False. |
False
|
Other Parameters:
Name | Type | Description |
---|---|---|
eigen |
bool
|
whether to solve a linear system with two fixed points or use an eigen solver. Defaults to True |
save_on_corners |
bool
|
whether to store the results on face corners or vertices. Defaults to True |
solver_verbose |
bool
|
verbose level. Defaults to False. |
Attributes:
Name | Type | Description |
---|---|---|
uvs |
Attribute
|
an attribute containing the uv-coordinates of the parametrization |
save_on_corners |
bool
|
whether the coordinates are saved as a vertex attribute or a face_corner attribute |
residual |
float
|
the least-square residual |
flat_mesh
property
A flat representation of the mesh where uv-coordinates are copied to xy.
Returns:
Name | Type | Description |
---|---|---|
SurfaceMesh |
SurfaceMesh
|
the flat mesh |
run()
Calls the solver on the LSCM system.
Raises:
Type | Description |
---|---|
Exception
|
fails if the mesh is not a topological disk |