MolDerivatives Library

part of TexMol, CVC, The University of Texas, Austin

Dependency: Also uses the UsefulMath Library.


Usage:

Main object:

    SumOfGaussiansCurvature

Functions:

SumOfGaussiansCurvatureint numberOfGaussians, double* gaussianCenters, int numberOfGridDivisions, double maxFunctionError, double blobbiness,
                                            int numberOfPoints, float* points, double* HandK, double* normals, double* k1Vector, double* k2Vector)

    Parameters:

bool initialize( )

bool getCurvatures( )

    Call initialize( ) before calling this function. If this function returns true, then the arrays HandK, normals, k1Vector, k2Vector will be filled with the
    [m1,g1,  m2,g2, .... mm,gm], [nx1,ny1,nz1,  nx2,ny2,nz2,  nxm,nym,nzm], [k1x1,k1y1,k1z1, k1x2,k1y2,k1z2,  k1xm,k1ym,k1zm], [k2x1,k2y1,k2z1, k2x2,k2y2,k2z2,  k2xm,k2ym,k2zm]

Important: if the surface is flat, we return [0,0,0],[0,0,0] for the 2 curvature vectors. You can create any 2 vectors perpendicular to the normal and use them.

Miscellaneous functions:

bool write(const char* curvfilename)

    Parameters:

bool read( const char* filename, int* numberOfPoints, double** HandK, double** normals, double** k1Vector, double** k2Vector);

    Parameters:

 

Files in library:

Curvature.cpp
CurvaturesGridVoxel.cpp
SumOfGaussiansCurvature.cpp
Curvature.h
CurvaturesGridVoxel.h
SumOfGaussiansCurvature.h

 

Files in required UsefulMath library :

        UsefulMath::LinearAlgebra.cpp
        UsefulMath::LinearAlgebra.h

       Note: If you have your own eigenvector solver, you can use it in place of this library.

 

Visualizing curvature and normal vectors:

        The .curv file can be visualized in TexMol. If you create a surface file (type .raw / .rawc / .rawn / .rawnc / .obj ), say a.rawnc and keep the corresponding a.rawnc.curv file in the same directory as the surface file, load up the surface file in TexMol, it will read in the vectors and display them.

 

Example: For an example showing how to use this, please look at 

         CVC :: TexMol :: Blurmaps :: BlurMapsDataManager :: getCurvatures( )


- Vinay Siddavanahalli (skvinay@cs.utexas.edu)