This code serves as a Demo for the paper Conformal Mesh Deformations with Möbius Transformations by Vaxman et al. from SIGGRAPH 2015. The demo uses the optimization package, and specialized traits from the libhedra package, which is in turn based on libigl and Eigen. It implements the following features from the paper:
- 2D deformation and interpolation using complex numbers.
- 3D deformation using quaternions.
- Exact metric conformal (2D and 3D) and intersection-angle preserving (2D).
- Working with any polyhedral (non-triangular) meshes, where every face undergoes a single Möbius transformation.
See paper for details on the mathematical formulation of the above.
##Installation
To get the library, use:
git clone --recursive https://github.com/avaxman/MoebiusCode.git
to compile the demo, enter the following commands in a terminal:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make
You can use cmake-gui
in windows to create a visual studio project, ready for compilation. The dependencies are already recursively downloaded and built.
##Editing Meshes
Upon running, the demo will ask to load a mesh. It automatically infers if the mesh is 2D (if the
The editing options are:
Editing Options | Description |
---|---|
Original |
Shows the original mesh for comparison. It cannot be edited in this mode. |
Deformation |
Shows the currently deforming mesh. The handles will show as spheres, where the green sphere is the currently edited one. |
Interpolation |
Shows the interpolated mesh at the current time frame. |
The viewing options determine what is presented on the mesh that is currently shown. Scalar values are on a cool-warm color scale, where they are normalized to sensitivity
are clamped. The sensitivities are specific and described as follows. See paper for more details:
Viewing Options | Description |
---|---|
Mesh View |
Just the mesh. Note that you can tick off the wireframe option to see only the polyhedral lines (rather than the triangulated view). |
Edge MC View |
This shows a special "edge-mesh" that is centered on each edge, and shows the metric conformality values. The values shown are $\left |
Edge IAP View |
The difference between circle-intersection angles of deformed/interpolated and original mesh (or: phase of cross ratios) in IAP Sensitivity . |
Concyclity |
The concyclity of every face, measured as the averaged circle intersection angle of each four vertices in a polygonal face (Triangles are by definition concyclic). This is not a relative measure: expect to see the same colors in the original and deformed/interpolated to see that it is preserved by the algorithm. The default sensitivity is Concyclity Sensitivity
|
Face MC Error |
Like Edge MC error, but for the diagonals of a polygonal face. Not entirely useful, but for completeness. Uses same parameter and sensitivity like Edge MC. |
Face QC Error |
Measures the quasiconformal error of each deformed/interpolated face relative to the original. The error is measures as $\left |
Face Area Error |
Measures the area distortion between triangles. The error is $\left |
Face small k Error |
Measures another sort of normalized quasiconformal error of each deformed/interpolated face relative to the original. The error is measures as Small k Sensitivity . |
It is possible to perform an exactly-MC preserving deformation and interpolation by tagging Exact MC
. It is possible to do exact IAP 2D deformation (only) by tagging Exact IAP
.
The Rigidity Ratio
parameter controls the inversion in the Möbius transformations. It is the
The Interpolation time step can be controlled by Interpolation Step
. The interpolation is done between the original (considered as
The rest of the parameters are regular libigl viewing parameters.
##Handles
Positional constraints, as handles, are added by pointing at a vertex and clicking the middle mouse button. Clicking the right mouse button and dragging will move the current handle (green) to the new position marked by the mouse. Handles do not have any effect in interpolated and original modes.
You can navigate between existing handles by the keys N,M
. The current handle can be deleted by pressing D
.
##Other operations
Save the current deformed and interpolated meshes (into polygonal OFF files) by pressing X
. Press P
to update the current deformation (in case you deleted the handle, changed a parameter, etc.). press V
and B
to add and subtract, respectively, the interpolation time step
##Implementation
The core of the algorithm is currently part of libhedra, as traits classes to its Levenberg-Marquadt solver. Details about the optimization are largely the same as those detailed in the paper, but with some changes that will be detailed soon. Meanwhile, the code in the traits Moebius2DEdgeDeviationTraits.h
, Moebius3DCornerVarsTraits.h
, and Moebius2DInterpolationTraits.h
in libhedra reveals them.
The entire algorithm will soon be incorporated into the library, but this demo will remain as a showcase nonetheless.
###TODO List:
- 3D Interpolation: currently solving a few bugs to make that happen.
- Using the nicer libhedra-based drawing of handles and polyhedral edge lines.
- using libhedra measures for concyclity etc. It might then change the output slightly (the averaging on polygonal faces is a bit different).
- Currently the linear solver is Cholesky in Eigen, which is on the slow side. A wrapper for PARDISO will be added as an option to get better performance.
Please complain about bugs, or ask any relevant question by [Amir Vaxman] (a.vaxman@uu.nl) (or open an issue in the repository). If you use this software for comparison, please cite the original paper:
@article{Vaxman:2015,
author = {Vaxman, Amir and M\"{u}ller, Christian and Weber, Ofir},
title = {Conformal Mesh Deformations with M\"{o}bius Transformations},
journal = {ACM Trans. Graph.},
issue_date = {August 2015},
volume = {34},
number = {4},
year = {2015},
pages = {55:1--55:11},
}