16 std::vector<Point2d> vpts{
25 auto Hdraw =
Homogr().addTranslation(7,6).addScale(15);
36 for(
int i=0; i<n; i++ )
39 auto pl2 = Hdraw * pl;
40 auto cir2 = Hdraw *
cir;
42 auto col_c = col_outside;
43 if( cir.isInside( pl ) )
46 auto col_p = col_outside;
47 if( pl.isInside( cir ) )
51 cir2.draw(
im, col_c );
53 auto inter = cir.intersects(pl);
56 auto inter_pts = inter.get();
57 for(
const auto&
pt: inter.
get() )
59 auto pt2 = Hdraw *
pt;
68 std::ostringstream oss;
69 oss <<
"showcase7_" << std::setfill(
'0') << std::setw(2) <<i <<
".svg";
70 im.write( oss.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
A 2D homography, defining a planar transformation.
Definition: homog2d.hpp:369
DrawParams & setThickness(uint8_t t)
Definition: homog2d.hpp:600
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
void draw(img::Image< cv::Mat > &, img::DrawParams=img::DrawParams()) const
Draw Circle (Opencv implementation)
Definition: homog2d.hpp:11907
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
DrawParams & setColor(uint8_t r, uint8_t g, uint8_t b)
Definition: homog2d.hpp:605
std::array< FPT, 3 > get() const
Definition: homog2d.hpp:4203
Polyline, will be instanciated either as OPolyline_ (open polyline) or CPolyline_.
Definition: homog2d.hpp:364
Point2d pt
Definition: homog2d_test.cpp:4034
Circle cir
Definition: homog2d_test.cpp:4036