Normalizing for Anisotropy in Triangle Models
SIGGRAPH 2004 Paper
- --in <input mesh>
- This string is the name of the file containing the triangulated model.
It is assumed that the file is in the
PLY format and the file-name ends with a ".ply"
- --out <output triangle mesh>
- This string is the name of the file to which the triangle mesh will be written.
The output file will be in the
PLY format and it the file-name should end
with a ".ply" extension.
Note that this code can handle an arbitrary polygonized mesh, but the output file will always be triangulated. The
triangulation is obtained by adding a new vertex at the center of a non-triangle face and decomposing the fact into
triangles that maintain the same orientation.
While the code will modify the anisotropic parameters of the model, the overall scale, translation, and rotation remain
- [--iter <number of iterations>]
- This argument specifies the number of anisotropy normalizations that are to be preformed. If no argument is specified,
a default value of five iterations is used.
The implementation of the surface reconstruction algorithm provided in the source code follows the description in
SIGGRAPH 2004 paper. The central part of the code is
XForm AnisotropyTransform(const std::vector<TriangleIndex>& triangles,
const std::vector<Vertex>& vertices, const int& iterations,
const double EPS)
command (in setUp3D.[h/cpp]), which takes in a list of vertex indices (triangles), a list of vertices
(vertices), the number of iterations (iterations), and a small value used to test for approximate zero
If, in addition, one desires to know the principal directions and values of the anisotropy, the
void DecomposeSymmetric(const Matrix& M, Vertex eigenVectors,
Vertex& eigenValues,const int iters=10)
command (in setUp3D.[h/cpp]) can be used to compute the eigen-values and eigen-vectors of the linear component
of the transformation.
SOURCE CODE COMPILATION
The source code is self-cotaining and should compile without dependencies on external libraries.