This distribution contains code for constructing and registering conformal spherical parametrizations of water-tight, genus-zero surfaces. Specifically, it provides implementations for:

- Computing a conformal parametrization over the sphere
- Centering the parametrization with respect to Möbius inversions
- Tessellating the conformal parametrization to a regular equirectangular grid
- Performing fast spherical correlation to find the rotation/reflections that best aligning two centered parametrizations
- Using the registered parametrizations to compute dense correspondences from a source mesh to a target

**--in**<*input mesh*>- This string is the name of the file from which the mesh will be read.

The file is assumed to be in the PLY format.

- [
**--out**<*output triangle mesh*>] - This string is the name of the file to which the spherically parametrized mesh will be written.

The file is written in PLY format and will contain vertices with fields "x", "y", "z" (for the original vertex positions), "px", "py", "pz" (for the associated positions on the unit sphere), and "red", "green", "blue" (for the per-vertex colors). If the input contains colors, they will be copied to the output. Otherwise, colors are assigned using the surface normals. - [
**--outT**<*output tessellated triangle mesh*>] - This string is the name of the file to which the mesh obtained by tessellating against a regular equirectangular grid will be written.

The file is written in PLY format and will contain vertices with fields "x", "y", "z" (for the original vertex positions), "px", "py", "pz" (for the associated positions on the unit sphere), and "red", "green", "blue" (for the per-vertex colors). If the input contains colors, they will be copied to the output. Otherwise, colors are assigned using the surface normals. - [
**--outG**<*output spherical grid*>] - This string is the name of the file to which the spherical grid of conformal factors will be written.

If the file extension is ".sgrid", the grid will be written as a 2D array of values (in binary). If the file extension is ".ply", the grid will be visualized as a triangle mesh obtained by scaling points on the unit sphere in proportion to their value. - [
**--iters**<*number of CMCF iterations*>] - This integer values specifies the number of Conformalized Mean Curvature Flow iterations to be used to obtain the conformal spherical parametrization.

The default value for this parameter is 100. - [
**--stepSize**<*the temporal size of each CMCF step*>] - This floating point values specifies the units for the temporal discretization of the Conformalized Mean Curvature Flow.

The default value for this parameter is 0.1. - [
**--cutOff**<*Möbius centering cut-off*>] - This floating point value specifies the threshold for terminating the Möbius centering iterations.

The default value for this parameter is 10^(-10). - [
**--degree**<*spherical harmonics degree*>] - This integer value specifies the degrees of the spherical harmonics that should be centered out using explicit advection.

If this parameter is not specified, the code reverts to centering with respect to Möbius inversions.

Only degrees 1, 2, 3, and 4 are supported at this point. - [
**--aSteps**<*advection steps*>] - If a spherical harmonic degree is specified, this integer value specifies the number of advection steps to be performed within each centering step.

The default value for this parameter is 4. - [
**--aStepSize**<*advection step size*>] - If a spherical harmonic degree is specified, this floating point value specifies the size of each advection step.

The default value for this parameter is 0.25.

*If the resulting spherical parameterization exhibits triangle flips, it is likely that the advection step size should be reduced.* - [
**--res**<*equirectangular grid resolution*>] - This integer value specifies the resolution of the equirectangular grid used to tessellate the spherical parametrization.

The default value for this parameter is 256. - [
**--smooth**<*spherical diffusion time*>] - This floating point value specifies the temporal duration for the heat diffusion used to antialias the sampled spherical function.

The default value for this parameter is 0.0005. - [
**--c2i**<*center to inversion type*>] - This integer value specifies how the gradient descent value is to be interpreted as a center of inversion. A value of
**0**indicates that a trivial interpretation is to be used. A value of**1**indicates that a golden section search should be performed along the descent direction. A value of**2**indicates that the length of centering transformation should be rescaled using the metric for the Poincaré disk model.

The default value for this parameter is 2. - [
**--gssTolerance**<*golden section search tolerance*>] - This floating point value specifies the tolerance for the golden section search.

The default value for this parameter is 0.000001. - [
**--random**] - If enabled, this flag specifies that the vertices of the input mesh should be assigned random positions within the unit ball before performing the Conformalized Mean Curvature Flow. (But after extracting the stiffness matrix.)
- [
**--noCenter**] - If enabled, no Möbius centering is performed after computing the conformal spherical parametrization.
- [
**--collapse**] - If enabled, the triangles falling into a single equirectangular cell are collapsed into a single quad before extracting the spherical tessellation.
- [
**--ascii**] - If enabled, all PLY files are output in ASCII mode.
- [
**--verbose**] - If enabled, details regarding the running times of the different stages of processing are output.

**--in**<*input mesh*>- This string is the name of the file from which the parametrized triangle mesh will be read.

The file is assumed to be in the PLY format and should contain fields "x", "y", "z" (for the original vertex positions), and "px", "py", "pz" (for the associated positions on the unit sphere). - [
**--out**<*output triangle mesh*>] - This string is the name of the file to which the triangle mesh will be written.

The file is written in PLY format and will contain vertices with fields "x", "y", "z" (for the positions of the parameterization on the unit sphere). If the input mesh contains per-vertex colors, these will be preserved in the output.

**--in**<*input source/target*>- These pair of strings are the names of the source and target file from which the spherical parameterizations will be read.

The files are either both in the PLY format and should contain fields "x", "y", "z" (for the original vertex positions), and "px", "py", "pz" (for the associated positions on the unit sphere), or they should be the ".sgrid" files output by**SphereMap**. - [
**--out**<*output triangle mesh*>] - This string is the name of the file containing the source mesh with vertex positions on the target.

The file is written in PLY format.

[This output is only supported in the case that the input is in PLY format.] - [
**--res**<*equirectangular grid resolution*>] - This integer value specifies the resolution of the equirectangular grid used to tessellate the spherical parametrization.

The default value for this parameter is 256.

[This is only used in the case that the intput is in PLY format.] - [
**--smooth**<*spherical diffusion time*>] - This floating point value specifies the temporal duration for the heat diffusion used to antialias the sampled spherical function.

The default value for this parameter is 0.0005.

[This is only used in the case that the input is in PLY format.] - [
**--cType**<*correlation type*>] - This integer value specifies how to perform correlation. A value of
**1**indicates that correlation should only be performed over the orthogonal transformations with determinant 1. A value of**2**indicates that the correlation should only be performed over the orthogonal transformations with determinant -1. A value of**3**indicates that the correlation should be performed over all orthogonal transformations.

The default value for this parameter is 1. - [
**--correspondence**] - If enabled, the output mesh is defined by using the triangulation of the source and setting the vertex positions to the corresponding positions on the target. Otherwise, the parameteric coordinates of the source are rotated.

[This is only used in the case that the input is in PLY format.] - [
**--verbose**] - If enabled, details regarding the running times of the different stages of processing are output.

- The implementation of this code relies on the Eigen, SOFT, and FFTW libraries. The source for Eigen and SOFT are included and should compile under both Windows and Linux. For the FFTW, Windows .lib and .dll files can be found here.

HOME