>Differential geometry operators

Differential geometry operators

Name

Differential geometry operators -- 

Synopsis


#include <gts.h>


gboolean    gts_vertex_gaussian_curvature   (GtsVertex *v,
                                             GtsSurface *s,
                                             gdouble *Kg);
gboolean    gts_vertex_mean_curvature_normal
                                            (GtsVertex *v,
                                             GtsSurface *s,
                                             GtsVector n);
void        gts_vertex_principal_curvatures (gdouble Kh,
                                             gdouble Kg,
                                             gdouble *K1,
                                             gdouble *K2);
void        gts_vertex_principal_directions (GtsVertex *v,
                                             GtsSurface *s,
                                             GtsVector Kh,
                                             gdouble Kg,
                                             GtsVector e1,
                                             GtsVector e2);

Description

Details

gts_vertex_gaussian_curvature ()

gboolean    gts_vertex_gaussian_curvature   (GtsVertex *v,
                                             GtsSurface *s,
                                             gdouble *Kg);

Computes the Discrete Gaussian Curvature approximation at v.

This approximation is from the paper: Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr VisMath '02, Berlin (Germany) http://www-grail.usc.edu/pubs.html

v : a GtsVertex.
s : a GtsSurface.
Kg : the Discrete Gaussian Curvature approximation at v.
Returns : TRUE if the operator could be evaluated, FALSE if the evaluation failed for some reason (v is boundary or is the endpoint of a non-manifold edge.)


gts_vertex_mean_curvature_normal ()

gboolean    gts_vertex_mean_curvature_normal
                                            (GtsVertex *v,
                                             GtsSurface *s,
                                             GtsVector n);

Computes the Discrete Mean Curvature Normal approximation at v. The mean curvature at v is half the magnitude of the vector Kh.

Note: the normal computed is not unit length, and may point either into or out of the surface, depending on the curvature at v. It is the responsibility of the caller of the function to use the mean curvature normal appropriately.

This approximation is from the paper: Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr VisMath '02, Berlin (Germany) http://www-grail.usc.edu/pubs.html

v : a GtsVertex.
s : a GtsSurface.
n : 
Returns : TRUE if the operator could be evaluated, FALSE if the evaluation failed for some reason (v is boundary or is the endpoint of a non-manifold edge.)


gts_vertex_principal_curvatures ()

void        gts_vertex_principal_curvatures (gdouble Kh,
                                             gdouble Kg,
                                             gdouble *K1,
                                             gdouble *K2);

Computes the principal curvatures at a point given the mean and Gaussian curvatures at that point.

The mean curvature can be computed as one-half the magnitude of the vector computed by gts_vertex_mean_curvature_normal().

The Gaussian curvature can be computed with gts_vertex_gaussian_curvature().

Kh : mean curvature.
Kg : Gaussian curvature.
K1 : first principal curvature.
K2 : second principal curvature.


gts_vertex_principal_directions ()

void        gts_vertex_principal_directions (GtsVertex *v,
                                             GtsSurface *s,
                                             GtsVector Kh,
                                             gdouble Kg,
                                             GtsVector e1,
                                             GtsVector e2);

Computes the principal curvature directions at a point given Kh and Kg, the mean curvature normal and Gaussian curvatures at that point, computed with gts_vertex_mean_curvature_normal() and gts_vertex_gaussian_curvature(), respectively.

Note that this computation is very approximate and tends to be unstable. Smoothing of the surface or the principal directions may be necessary to achieve reasonable results.

v : a GtsVertex.
s : a GtsSurface.
Kh : mean curvature normal (a GtsVector).
Kg : Gaussian curvature (a gdouble).
e1 : first principal curvature direction (direction of largest curvature).
e2 : second principal curvature direction.