15 auto Hdraw =
Homogr().setScale(30).addTranslation(10,10);
23 for(
int i=0; i<nbim; i++ )
26 auto x1 = std::cos(
angle)*k;
27 auto y1 = std::sin(
angle)*k;
28 auto r_w = r_w0 + std::sin(
angle);
32 auto bcir = obj1.getBoundingCircle();
33 auto cbb =
getBB(obj2);
35 auto obj1_d = Hdraw * obj1;
36 auto obj2_d = Hdraw * obj2;
37 auto bcir_d = Hdraw * bcir;
38 auto cbb_d = Hdraw * cbb;
42 obj1_d.draw( ima,
DrawParams().setColor(250,0,0) );
43 obj2_d.draw( ima,
DrawParams().setColor(0,0,250) );
44 bcir_d.draw( ima,
DrawParams().setColor(100,250,100) );
45 obj2_d.getBB().draw( ima,
DrawParams().setColor(100,50,200) );
47 auto bb =
getBB(obj1_d, obj2_d);
49 bb.getBoundingCircle().draw( ima,
DrawParams().setColor(50,50,125) );
51 std::ostringstream ossa;
52 ossa <<
"showcase4a_" << std::setfill(
'0') << std::setw(2) <<i <<
".svg";
53 ima.write( ossa.str() );
A circle.
Definition: homog2d.hpp:378
Homogr_< HOMOG2D_INUMTYPE > Homogr
Default homography (3x3 matrix) type, uses double as numerical type.
Definition: homog2d.hpp:12382
#define M_PI
Definition: homog2d.hpp:235
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
A Flat Rectangle, modeled by its two opposite points.
Definition: homog2d.hpp:379
Opaque data structure, will hold the image type, depending on back-end library. This type is the one ...
Definition: homog2d.hpp:712
FRect_< HOMOG2D_INUMTYPE > getBB(const T &t)
Return Bounding Box of primitive or container holding primitives (free function)
Definition: homog2d.hpp:10312