32 #include "DGtal/base/Common.h" 33 #include "DGtal/helpers/StdDefs.h" 34 #include "DGtal/shapes/Shapes.h" 35 #include "DGtal/shapes/parametric/Ball2D.h" 36 #include "DGtal/io/boards/Board2D.h" 37 #include "DGtal/io/colormaps/GrayscaleColorMap.h" 38 #include "DGtal/images/ImageContainerBySTLVector.h" 42 using namespace DGtal;
51 bool testParametricShape()
53 unsigned int nbok = 0;
71 set.computeBoundingBox(lower,upper);
73 trace.
info()<<
"Generated set: "<<
set<<
" lowerBound="<<lower
74 <<
" upperBound="<<upper<<std::endl;
77 board.
saveSVG(
"parametricball.svg");
81 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") " 82 <<
"true == true" << std::endl;
91 int main(
int argc,
char** argv )
95 for (
int i = 0; i < argc; ++i )
99 bool res = testParametricShape();
100 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
const Domain domain(Point(1, 2), Point(6, 5))
Vector lower(const Vector &z, unsigned int k)
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Aim: Model of the concept StarShaped represents any circle in the plane.
int main(int argc, char **argv)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: A utility class for constructing different shapes (balls, diamonds, and others).
Vector upper(const Vector &z, unsigned int k)
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)...