19 std::vector<Point2d> vec(nbPts);
20 auto it = std::begin(vec);
21 for(
auto i=0; i<nbPts; i++ )
23 1.0*rand() / RAND_MAX * (cmax-cmin) + cmin,
24 1.0*rand() / RAND_MAX * (cmax-cmin) + cmin
30 for(
int i=0; i<nbim; i++ )
37 auto angle = i*360./nbim;
39 auto x1 = std::cos(angle_r)*k;
40 auto y1 = std::sin(angle_r)*k;
47 std::ostringstream oss;
48 oss <<
"showcase15_" << std::setfill(
'0') << std::setw(2) << i <<
".svg";
49 im.write( oss.str() );
auto findNearestFarthestPoint(const Point2d_< FPT > &pt, const T &cont)
Returns indexes of points in container cont that are nearest/farthest.
Definition: homog2d.hpp:11167
void draw(Data &data)
Definition: precision_test_opencv.cpp:184
Segment_< HOMOG2D_INUMTYPE > Segment
Default segment type.
Definition: homog2d.hpp:12388
#define M_PI
Definition: homog2d.hpp:235
void draw(img::Image< img::SvgImage > &im, img::DrawParams dp=img::DrawParams()) const
SVG draw function.
Definition: homog2d.hpp:4414
Draw parameters, independent of back-end library.
Definition: homog2d.hpp:514
HOMOG2D_INUMTYPE angle(const Ellipse_< FPT > &ell)
Return angle of ellipse (free function)
Definition: homog2d.hpp:10993
Point2d_< HOMOG2D_INUMTYPE > Point2d
Default point type, uses double as numerical type.
Definition: homog2d.hpp:12379
img::Image< img::SvgImage > im(300, 400)
Opaque data structure, will hold the image type, depending on back-end library. This type is the one ...
Definition: homog2d.hpp:712
Point2d pt
Definition: homog2d_test.cpp:4034
Base class, will be instanciated as Point2d_ or Line2d_.
Definition: homog2d.hpp:365