Implementation of the Rectangular Surface Parametrization method by Etienne Corman and Keenan Crane
This implementation is in full python/numba and uses the mouette library for geometry processing.
- Install
cyipoptusing their installation instructions - Install all other dependencies using
pip install -r requirements.txt
python main.py <path/to/mesh> [options]Mesh formats supported are .obj, .mesh and .geogram_ascii (format from the geogram library)
options:
-h, --help show this help message and exit
-o OUTPUT_NAME, --output-name OUTPUT_NAME
Name of the output file. Will be stored in a folder
named '<outname>' as '<outname>.obj'
-ff {smooth,curv}, --ff-init-mode {smooth,curv}
which frame field to use as initialization. `smooth`
means smoothing a frame field using diffusion. `curv`
means principal directions of curvature. Defaults to
`smooth`
-fb, --free-boundary Runs the algorithm with no singularities and with a
free boundary. Only works for disk topology meshes.
-feat, --detect-features
enables feature detection and alignment
-d {none,conformal,iso,area,align}, --disto {none,conformal,iso,area,align}
which distorsion to minimize
-optim {LM,cyipopt}, --optimizer {LM,cyipopt}
Which optimizer to use. LM = Levenberg-Marquardt from
mouette.
-n N_ITER_MAX, --n-iter-max N_ITER_MAX
maximum number of iterations in optimization
-silent, --silent disables output in terminal
We provide a visualize_in_polyscope.py script to visualize the full output in... polyscope. Simply run:
python visualize_in_polyscope.py output/<folder>where <folder> is a folder generated by the main script. Make sure you ran the --full_output option of the main script to visualize all relevant quantities.
- Link to the original article : https://www.cs.cmu.edu/~kmcrane/Projects/RectangularSurfaceParameterization/RectangularSurfaceParameterization.pdf
- Link to the official code by the authors : https://github.com/etcorman/RectangularSurfaceParameterization/tree/main