DGtal 1.3.0
|
Aim: A helper class that provides static methods to compute corrected normal current formulas of curvatures. More...
#include <DGtal/geometry/meshes/CorrectedNormalCurrentFormula.h>
Public Types | |
typedef TRealPoint | RealPoint |
typedef TRealVector | RealVector |
typedef RealVector::Component | Scalar |
typedef std::vector< RealPoint > | RealPoints |
typedef std::vector< RealVector > | RealVectors |
typedef SimpleMatrix< Scalar, 3, 3 > | RealTensor |
typedef std::size_t | Index |
Static Public Member Functions | |
Formulas for mu0 measure | |
static Scalar | mu0ConstantU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &u) |
static Scalar | mu0InterpolatedU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &ua, const RealVector &ub, const RealVector &uc, bool unit_u=false) |
static Scalar | mu0ConstantU (const RealPoints &pts, const RealVector &u) |
static Scalar | mu0InterpolatedU (const RealPoints &pts, const RealVectors &u, bool unit_u=false) |
Formulas for mu1 measure | |
static Scalar | mu1ConstantUAtEdge (const RealPoint &a, const RealPoint &b, const RealVector &ur, const RealVector &ul) |
static Scalar | mu1ConstantU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &u) |
static Scalar | mu1InterpolatedU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &ua, const RealVector &ub, const RealVector &uc, bool unit_u=false) |
static Scalar | mu1ConstantU (const RealPoints &pts, const RealVector &u) |
static Scalar | mu1InterpolatedU (const RealPoints &pts, const RealVectors &u, bool unit_u=false) |
Formulas for mu2 measure | |
static Scalar | mu2ConstantU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &u) |
static Scalar | mu2ConstantUAtVertex (const RealPoint &a, const RealVectors &vu) |
static Scalar | mu2InterpolatedU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &ua, const RealVector &ub, const RealVector &uc, bool unit_u=false) |
static Scalar | mu2ConstantU (const RealPoints &pts, const RealVector &u) |
static Scalar | mu2InterpolatedU (const RealPoints &pts, const RealVectors &u, bool unit_u=false) |
Formulas for muXY measure | |
static RealTensor | muXYConstantU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &u) |
static RealTensor | muXYConstantUAtEdge (const RealPoint &a, const RealPoint &b, const RealVector &ur, const RealVector &ul) |
static RealTensor | muXYInterpolatedU (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealVector &ua, const RealVector &ub, const RealVector &uc, bool unit_u=false) |
static RealTensor | muXYConstantU (const RealPoints &pts, const RealVector &u) |
static RealTensor | muXYInterpolatedU (const RealPoints &pts, const RealVectors &u, bool unit_u=false) |
Other geometric services | |
static RealPoint | barycenter (const RealPoints &pts) |
static RealVector | averageUnitVector (const RealVectors &vecs) |
Static Public Attributes | |
static const Dimension | dimension = RealPoint::dimension |
Aim: A helper class that provides static methods to compute corrected normal current formulas of curvatures.
Description of class 'CorrectedNormalCurrentFormula'
TRealPoint | any model of 3D RealPoint. |
TRealVector | any model of 3D RealVector. |
Formula for interpolated measures on a triangle with vertices A, B, C, and normal vectors uA, uB, uC:
MU0=-1/6*((uAz + uBz + uCz)*Bx - (uAz + uBz + uCz)*Cx)*Ay + 1/6*((uAz + uBz + uCz)*Ax - (uAz + uBz + uCz)*Cx)*By - 1/6*((uAz + uBz + uCz)*Ax - (uAz + uBz + uCz)*Bx)*Cy + 1/6*((uAy + uBy + uCy)*Bx - (uAy + uBy + uCy)*Cx - (uAx + uBx + uCx)*By + (uAx + uBx + uCx)*Cy)*Az - 1/6*((uAy + uBy + uCy)*Ax - (uAy + uBy + uCy)*Cx - (uAx + uBx + uCx)*Ay + (uAx + uBx + uCx)*Cy)*Bz + 1/6*((uAy + uBy + uCy)*Ax - (uAy + uBy + uCy)*Bx - (uAx + uBx + uCx)*Ay + (uAx + uBx + uCx)*By)*Cz
Let UM=uA+uB+uC.
MU0=-1/6*(uMz*Bx - uMz*Cx)*Ay + 1/6*(uMz*Ax - uMz*Cx)*By - 1/6*(uMz*Ax - uMz*Bx)*Cy + 1/6*(uMy*Bx - uMy*Cx - uMx*By + uMx*Cy)*Az - 1/6*(uMy*Ax - uMy*Cx - uMx*Ay + uMx*Cy)*Bz + 1/6*(uMy*Ax - uMy*Bx - uMx*Ay + uMx*By)*Cz
We see by simple computations that MU0 can be written as (uM = UM/3)
MU0=1/2*det( uM, B-A, C-A )
MU1=1/6*((uBy - uCy)*uAz - (uAy + 2*uCy)*uBz + (uAy + 2*uBy)*uCz)*Ax + 1/6*((uBy + 2*uCy)*uAz - (uAy - uCy)*uBz - (2*uAy + uBy)*uCz)*Bx - 1/6*((2*uBy + uCy)*uAz - (2*uAy + uCy)*uBz - (uAy - uBy)*uCz)*Cx - 1/6*((uBx - uCx)*uAz - (uAx + 2*uCx)*uBz + (uAx + 2*uBx)*uCz)*Ay - 1/6*((uBx + 2*uCx)*uAz - (uAx - uCx)*uBz - (2*uAx + uBx)*uCz)*By + 1/6*((2*uBx + uCx)*uAz - (2*uAx + uCx)*uBz - (uAx - uBx)*uCz)*Cy + 1/6*((uBx - uCx)*uAy - (uAx + 2*uCx)*uBy + (uAx + 2*uBx)*uCy)*Az + 1/6*((uBx + 2*uCx)*uAy - (uAx - uCx)*uBy - (2*uAx + uBx)*uCy)*Bz - 1/6*((2*uBx + uCx)*uAy - (2*uAx + uCx)*uBy - (uAx - uBx)*uCy)*Cz
This formula can also be written in a clearer form with determinants:
6*MU1 = det(u_A+u_B+u_C,u_C-u_B,A) + det(u_A+u_B+u_C,u_A-u_C,B) + det(u_A+u_B+u_C,u_B-u_A,C)
It follows that MU1=1/2( det(uM, u_C-u_B, A) + det(uM, u_A-u_C, B) + det(uM, u_B-u_A, C)
Gaussian curvature measure is
MU2=-1/2*uCx*uBy*uAz + 1/2*uBx*uCy*uAz + 1/2*uCx*uAy*uBz - 1/2*uAx*uCy*uBz - 1/2*uBx*uAy*uCz + 1/2*uAx*uBy*uCz
which is simply MU2=1/2*det( uA, uB, uC )
Anisotropic curvature measure is written as (for X, Y arbitrary vectors, <.|.> the standard Euclidean scalar product).
MUXY = 1/2 det( uM, < Y | uC-uA > X, (B-A)) - det( uM, < Y | uB-uA > X, (C-A))
Definition at line 99 of file CorrectedNormalCurrentFormula.h.
typedef std::size_t DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::Index |
Definition at line 107 of file CorrectedNormalCurrentFormula.h.
typedef TRealPoint DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::RealPoint |
Definition at line 101 of file CorrectedNormalCurrentFormula.h.
typedef std::vector< RealPoint > DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::RealPoints |
Definition at line 104 of file CorrectedNormalCurrentFormula.h.
typedef SimpleMatrix< Scalar, 3, 3 > DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::RealTensor |
Definition at line 106 of file CorrectedNormalCurrentFormula.h.
typedef TRealVector DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::RealVector |
Definition at line 102 of file CorrectedNormalCurrentFormula.h.
typedef std::vector< RealVector > DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::RealVectors |
Definition at line 105 of file CorrectedNormalCurrentFormula.h.
typedef RealVector::Component DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::Scalar |
Definition at line 103 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Given a vector of unit vectors, returns their average unit vector.
vecs | any vector of vectors. |
Definition at line 627 of file CorrectedNormalCurrentFormula.h.
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0InterpolatedU(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu1InterpolatedU(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu2InterpolatedU(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::muXYInterpolatedU().
|
inlinestatic |
Given a vector of points, returns its barycenter.
pts | any vector of points |
Definition at line 615 of file CorrectedNormalCurrentFormula.h.
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0ConstantU(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0InterpolatedU(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu1InterpolatedU(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu2InterpolatedU(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::muXYInterpolatedU().
|
inlinestatic |
Computes mu0 measure (area) of triangle abc given a constant corrected normal vector u.
a | any point |
b | any point |
c | any point |
u | the constant corrected normal vector to triangle abc |
Definition at line 123 of file CorrectedNormalCurrentFormula.h.
References DGtal::crossProduct().
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0ConstantU().
|
inlinestatic |
Computes mu0 measure (area) of polygonal face pts given a constant corrected normal vector u.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the constant corrected normal vector to this polygonal face. |
Definition at line 165 of file CorrectedNormalCurrentFormula.h.
References DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::barycenter(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0ConstantU().
|
inlinestatic |
Computes mu0 measure (area) of triangle abc given an interpolated corrected normal vector ua, ub, uc.
a | any point |
b | any point |
c | any point |
ua | the corrected normal vector at point a |
ub | the corrected normal vector at point b |
uc | the corrected normal vector at point c |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 143 of file CorrectedNormalCurrentFormula.h.
References DGtal::crossProduct().
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0InterpolatedU().
|
inlinestatic |
Computes area of polygonal face pts given an interpolated corrected normal vector ua, ub, uc.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the (ccw ordered) normal vectors at the corresponding vertices in pts. |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 186 of file CorrectedNormalCurrentFormula.h.
References DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::averageUnitVector(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::barycenter(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu0InterpolatedU().
|
inlinestatic |
Computes mu1 measure (twice the mean curvature) of triangle abc given a constant corrected normal vector u.
a | any point |
b | any point |
c | any point |
u | the constant corrected normal vector to triangle abc |
Definition at line 248 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes mu1 measure (twice the mean curvature) of polygonal face pts given a constant corrected normal vector u.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the constant corrected normal vector to this polygonal face. |
Definition at line 291 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes mu1 measure (twice the mean curvature) at edge ab given a constant corrected normal vector ur to the right of ab, and a constant corrected normal vector ul to the left of ab.
The formula is \( int_{ab} \Psi \langle e | e_1 \rangle dH^1 \), where e is the unit vector parallel to ab, and \( e_1 \) is the unit vector orthogonal to ur and ul, and \( \Psi \) is the angle between these two vectors.
a | any point |
b | any point |
ur | the constant corrected normal vector to the right of oriented edge ab |
ul | the constant corrected normal vector to the left of oriented edge ab |
Definition at line 226 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes mu1 measure (twice the mean curvature) of triangle abc given an interpolated corrected normal vector ua, ub, uc.
a | any point |
b | any point |
c | any point |
ua | the corrected normal vector at point a |
ub | the corrected normal vector at point b |
uc | the corrected normal vector at point c |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 271 of file CorrectedNormalCurrentFormula.h.
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu1InterpolatedU().
|
inlinestatic |
Computes mean curvature of polygonal face pts given an interpolated corrected normal vector ua, ub, uc.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the (ccw ordered) normal vectors at the corresponding vertices in pts. |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 305 of file CorrectedNormalCurrentFormula.h.
References DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::averageUnitVector(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::barycenter(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu1InterpolatedU().
|
inlinestatic |
Computes mu2 measure (Gaussian curvature) of triangle abc given a constant corrected normal vector u.
a | any point |
b | any point |
c | any point |
u | the constant corrected normal vector to triangle abc |
Definition at line 337 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes mu2 measure (Gaussian curvature) of polygonal face pts given a constant corrected normal vector u.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the constant corrected normal vector to this polygonal face. |
Definition at line 425 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes mu2 measure (Gaussian curvature) at given vertex a, surrounded by faces with constant corrected normal vectors vu.
a | any point |
vu | the vector of constant corrected normal vectors of the faces incident to a. |
Definition at line 358 of file CorrectedNormalCurrentFormula.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inlinestatic |
Computes mu2 measure (Gaussian curvature) of triangle abc given an interpolated corrected normal vector ua, ub, uc.
a | any point |
b | any point |
c | any point |
ua | the corrected normal vector at point a |
ub | the corrected normal vector at point b |
uc | the corrected normal vector at point c |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 401 of file CorrectedNormalCurrentFormula.h.
References DGtal::SphericalTriangle< TSpace >::algebraicArea().
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu2InterpolatedU().
|
inlinestatic |
Computes Gaussian curvature of polygonal face pts given an interpolated corrected normal vector ua, ub, uc.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the (ccw ordered) normal vectors at the corresponding vertices in pts. |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 440 of file CorrectedNormalCurrentFormula.h.
References DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::averageUnitVector(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::barycenter(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu2InterpolatedU().
|
inlinestatic |
Computes muXY measure (anisotropic curvature) of triangle abc given a constant corrected normal vector u.
a | any point |
b | any point |
c | any point |
u | the constant corrected normal vector to triangle abc |
Definition at line 472 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes muXY measure (anisotropic curvature) of polygonal face pts given a constant corrected normal vector u.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the constant corrected normal vector to this polygonal face. |
Definition at line 571 of file CorrectedNormalCurrentFormula.h.
|
inlinestatic |
Computes muXY measure (anisotropic measure) at edge ab given a constant corrected normal vector ur to the right of ab, and a constant corrected normal vector ul to the left of ab.
The formula is \( int_{ab} \Psi \langle e | e_1 \rangle dH^1 \), where e is the unit vector parallel to ab, and \( e_1 \) is the unit vector orthogonal to ur and ul, and \( \Psi \) is the angle between these two vectors.
a | any point |
b | any point |
ur | the constant corrected normal vector to the right of oriented edge ab |
ul | the constant corrected normal vector to the left of oriented edge ab |
Definition at line 496 of file CorrectedNormalCurrentFormula.h.
References DGtal::crossProduct().
|
inlinestatic |
Computes muXY measure (anisotropic curvature) of triangle abc given an interpolated corrected normal vector ua, ub, uc.
a | any point |
b | any point |
c | any point |
ua | the corrected normal vector at point a |
ub | the corrected normal vector at point b |
uc | the corrected normal vector at point c |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 537 of file CorrectedNormalCurrentFormula.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::base(), and DGtal::SimpleMatrix< TComponent, TM, TN >::setComponent().
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::muXYInterpolatedU().
|
inlinestatic |
Computes anisotropic curvature of polygonal face pts given an interpolated corrected normal vector ua, ub, uc.
pts | the (ccw ordered) points forming the vertices of a polygonal face. |
u | the (ccw ordered) normal vectors at the corresponding vertices in pts. |
unit_u | when 'true' considers that interpolated corrected normals should be made unitary, otherwise interpolated corrected normals may have smaller norms. |
Definition at line 586 of file CorrectedNormalCurrentFormula.h.
References DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::averageUnitVector(), DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::barycenter(), and DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::muXYInterpolatedU().
|
static |
Definition at line 108 of file CorrectedNormalCurrentFormula.h.