32#include "DGtal/shapes/parametric/Ball3D.h"
33#include "DGtal/helpers/StdDefs.h"
34#include "DGtal/io/Color.h"
59 EuclideanShape ball1( c1, radius );
62 double arcExp = ball1.arclength( make_pair(0.0,0.0), make_pair(0.0,M_PI) ,500 );
63 double arcTheo = M_PI*radius;
64 trace.
info() <<
"Computed arc length: "<< arcExp <<endl;
65 trace.
info() <<
"Theoric arc length: "<< arcTheo << endl;
66 if(fabs(arcTheo- arcExp) < 0.1)
68 trace.
info() <<
"The arc length has a good value"<<endl;
77 double surfaceExp = ball1.surfacelength( make_pair(0.0,0.0), make_pair(M_PI*2,M_PI) ,500 );
78 double surfaceTheo = 4.0*M_PI*radius*radius;
79 trace.
info() <<
"Computed surface length: "<< surfaceExp <<endl;
80 trace.
info() <<
"Theoric surface length: "<< surfaceTheo << endl;
81 if(fabs(surfaceExp- surfaceTheo) < 0.1)
83 trace.
info() <<
"The surface has a good value"<<endl;
Aim: Model of the concept StarShaped3D represents any Sphere in the space.
Aim: Implements basic operations that will be used in Point and Vector classes.
void beginBlock(const std::string &keyword="")
Space::RealPoint RealPoint
DGtal is the top-level namespace which contains all DGtal functions and types.
bool test(const I &itb, const I &ite)