32 for(
int i=0; i<nbim; i++ )
37 auto xr1 = std::cos(
angle)*k1;
38 auto yr1 = std::sin(
angle)*k1;
39 auto xr2 = std::cos(
angle)*k2;
40 auto yr2 = std::sin(
angle)*k2;
44 p1.translate( xr1, -yr1 );
45 p2.translate( xr2, yr2 );
51 std::array<Circle,3> arr;
62 auto int01 = cir0.intersects(cir1).get();
63 auto int02 = cir0.intersects(cir2).get();
64 auto int12 = cir2.intersects(cir1).get();
66 auto li01 = int01[0] * int01[1];
67 auto li02 = int02[0] * int02[1];
68 auto li12 = int12[0] * int12[1];
82 auto centerpt = li01 * li02;
83 centerpt.draw(
im,
DrawParams().setColor(0,0,0).setPointStyle(PtStyle::Dot) );
85 std::ostringstream oss;
86 oss <<
"showcase20_" << std::setfill(
'0') << std::setw(2) << i <<
".svg";
87 im.write( oss.str() );
A circle.
Definition: homog2d.hpp:378
void draw(Data &data)
Definition: precision_test_opencv.cpp:184
#define M_PI
Definition: homog2d.hpp:235
void translate(TX dx, TY dy)
Translate Polyline using dx, dy.
Definition: homog2d.hpp:6411
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
std::vector< Point2d_< FPT > > & getPts()
Returns the points (reference)
Definition: homog2d.hpp:6295
std::pair< Segment_< FPT1 >, Segment_< FPT1 > > getTanSegs(const Circle_< FPT1 > &c1, const Circle_< FPT2 > &c2)
Free function, returns the pair of segments tangential to the two circles.
Definition: homog2d.hpp:10793
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
FRect_< HOMOG2D_INUMTYPE > getBB(const T &t)
Return Bounding Box of primitive or container holding primitives (free function)
Definition: homog2d.hpp:10312
Polyline, will be instanciated either as OPolyline_ (open polyline) or CPolyline_.
Definition: homog2d.hpp:364
Base class, will be instanciated as Point2d_ or Line2d_.
Definition: homog2d.hpp:365