DGtal 1.4.0
|
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial. More...
#include <DGtal/shapes/implicit/ImplicitPolynomial3Shape.h>
Public Types | |
typedef ImplicitPolynomial3Shape< TSpace > | Self |
typedef TSpace | Space |
typedef Space::RealPoint | RealPoint |
typedef Space::RealVector | RealVector |
typedef RealPoint::Coordinate | Ring |
typedef Space::Integer | Integer |
typedef MPolynomial< 3, Ring > | Polynomial3 |
typedef Ring | Value |
Public Member Functions | |
BOOST_STATIC_ASSERT ((Space::dimension==3)) | |
ImplicitPolynomial3Shape (const Polynomial3 &poly) | |
ImplicitPolynomial3Shape & | operator= (const ImplicitPolynomial3Shape &other) |
~ImplicitPolynomial3Shape () | |
void | init (const Polynomial3 &poly) |
double | operator() (const RealPoint &aPoint) const |
bool | isInside (const RealPoint &aPoint) const |
Orientation | orientation (const RealPoint &aPoint) const |
RealVector | gradient (const RealPoint &aPoint) const |
double | meanCurvature (const RealPoint &aPoint) const |
double | gaussianCurvature (const RealPoint &aPoint) const |
void | principalCurvatures (const RealPoint &aPoint, double &k1, double &k2) const |
void | principalDirections (const RealPoint &aPoint, RealVector &d1, RealVector &d2) const |
RealPoint | nearestPoint (const RealPoint &aPoint, const double accuracy=0.0001, const int maxIter=20, const double gamma=0.5) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Member Functions | |
ImplicitPolynomial3Shape () | |
Private Attributes | |
Polynomial3 | myPolynomial |
The 3-polynomial defining the implicit shape. | |
Polynomial3 | myFx |
Polynomial3 | myFy |
Polynomial3 | myFz |
Polynomial3 | myFxx |
Polynomial3 | myFxy |
Polynomial3 | myFxz |
Polynomial3 | myFyx |
Polynomial3 | myFyy |
Polynomial3 | myFyz |
Polynomial3 | myFzx |
Polynomial3 | myFzy |
Polynomial3 | myFzz |
Polynomial3 | myUpPolynome |
Polynomial3 | myLowPolynome |
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Description of template class 'ImplicitPolynomial3Shape'
Model of CImplicitFunction
TSpace | the Digital space definition. |
Definition at line 67 of file ImplicitPolynomial3Shape.h.
typedef Space::Integer DGtal::ImplicitPolynomial3Shape< TSpace >::Integer |
Definition at line 76 of file ImplicitPolynomial3Shape.h.
typedef MPolynomial< 3, Ring > DGtal::ImplicitPolynomial3Shape< TSpace >::Polynomial3 |
Definition at line 77 of file ImplicitPolynomial3Shape.h.
typedef Space::RealPoint DGtal::ImplicitPolynomial3Shape< TSpace >::RealPoint |
Definition at line 73 of file ImplicitPolynomial3Shape.h.
typedef Space::RealVector DGtal::ImplicitPolynomial3Shape< TSpace >::RealVector |
Definition at line 74 of file ImplicitPolynomial3Shape.h.
typedef RealPoint::Coordinate DGtal::ImplicitPolynomial3Shape< TSpace >::Ring |
Definition at line 75 of file ImplicitPolynomial3Shape.h.
typedef ImplicitPolynomial3Shape<TSpace> DGtal::ImplicitPolynomial3Shape< TSpace >::Self |
Definition at line 71 of file ImplicitPolynomial3Shape.h.
typedef TSpace DGtal::ImplicitPolynomial3Shape< TSpace >::Space |
Definition at line 72 of file ImplicitPolynomial3Shape.h.
typedef Ring DGtal::ImplicitPolynomial3Shape< TSpace >::Value |
Definition at line 78 of file ImplicitPolynomial3Shape.h.
DGtal::ImplicitPolynomial3Shape< TSpace >::ImplicitPolynomial3Shape | ( | const Polynomial3 & | poly | ) |
Constructor from an arbitrary polynomial.
poly | any multivariate polynomial (the number of variables is the dimension of the space) |
DGtal::ImplicitPolynomial3Shape< TSpace >::~ImplicitPolynomial3Shape | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
DGtal::ImplicitPolynomial3Shape< TSpace >::BOOST_STATIC_ASSERT | ( | (Space::dimension==3) | ) |
|
inline |
Gaussian curvature estimation at aPoint
Uses the formula \( G = -det(M) / \|\nabla f\|^4 \), where \( M := \left[ \begin{array}{cccc} f_{xx}& f_{xy} & f_{xz} & f_x \\ f_{xy}& f_{yy} & f_{yz} & f_y \\ f_{xz}& f_{yz} & f_{zz} & f_z \\ f_x& f_y & f_z & 0 \end{array} \right] \).
aPoint | any point in the Euclidean space. |
|
inline |
aPoint | any point in the Euclidean space. |
void DGtal::ImplicitPolynomial3Shape< TSpace >::init | ( | const Polynomial3 & | poly | ) |
Initialize from an arbitrary polynomial.
poly | any multivariate polynomial (the number of variables is the dimension of the space) |
bool DGtal::ImplicitPolynomial3Shape< TSpace >::isInside | ( | const RealPoint & | aPoint | ) | const |
aPoint | any point in the Euclidean space. |
bool DGtal::ImplicitPolynomial3Shape< TSpace >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
inline |
Mean curvature estimation. This computation is based on the hessian formula of the mean curvature k=(∇F ∗ H (F ) ∗ ∇F T − |∇F |^2 *Trace(H (F ))/2|∇F |^3
aPoint | any point in the Euclidean space. |
|
inline |
Perform a gradient descent in order to move a point aPoint closer to the implicit surface f(x)=0. More precisely, we use a sequence: x_n = x_(n-1) - gamma * f(x) * gradient(x_(n-1))/ ||gradient(x_(n-1))||^2 The descent is stopped if maxIter is reached or if | f(x_n) | < accuracy.
aPoint | any point in the Euclidean space. |
accuracy | distance criterion to stop the descent. |
maxIter | fixes the maximum number of steps. |
gamma | coefficient associated with the gradient. |
double DGtal::ImplicitPolynomial3Shape< TSpace >::operator() | ( | const RealPoint & | aPoint | ) | const |
aPoint | any point in the Euclidean space. |
ImplicitPolynomial3Shape & DGtal::ImplicitPolynomial3Shape< TSpace >::operator= | ( | const ImplicitPolynomial3Shape< TSpace > & | other | ) |
Assignment.
other | the object to copy. |
Orientation DGtal::ImplicitPolynomial3Shape< TSpace >::orientation | ( | const RealPoint & | aPoint | ) | const |
aPoint | any point in the Euclidean space. |
|
inline |
Principal curvature estimation at aPoint
[in] | aPoint | any point in the Euclidean space. |
[out] | k1 | first principal curvature |
[out] | k2 | second principal curvature |
|
inline |
Principal directions of curvature estimation at aPoint
[in] | aPoint | any point in the Euclidean space. |
[out] | d1 | first principal direction |
[out] | d2 | second principal direction |
void DGtal::ImplicitPolynomial3Shape< TSpace >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
private |
Definition at line 244 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 248 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 249 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 250 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 245 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 252 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 253 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 254 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 246 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 256 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 257 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 258 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 263 of file ImplicitPolynomial3Shape.h.
|
private |
The 3-polynomial defining the implicit shape.
Definition at line 241 of file ImplicitPolynomial3Shape.h.
|
private |
Definition at line 262 of file ImplicitPolynomial3Shape.h.