54 cout <<
"[Aleph Geometry Example] " << title <<
"\n";
55 cout <<
"============================================================\n";
73 const auto circle = mec(pts);
75 cout <<
"Center: (" << circle.center.get_x() <<
", "
76 << circle.center.get_y() <<
")" << endl;
77 cout <<
"Radius: " << circle.radius() << endl;
78 cout <<
"Radius^2: " << circle.radius_squared << endl;
81 bool all_inside =
true;
84 const Point & p = it.get_curr();
85 const bool inside = circle.contains(p);
86 cout <<
" (" << p.
get_x() <<
", " << p.
get_y() <<
") -> "
87 << (inside ?
"inside" :
"OUTSIDE") << endl;
93 cout <<
"All points contained: YES" << endl;
97 cout <<
"\nSquare test: center = (" << c2.center.get_x() <<
", "
98 << c2.center.get_y() <<
"), radius = " << c2.radius() << endl;
99 assert(c2.center ==
Point(2, 2));
100 assert(c2.radius_squared == 8);
102 cout <<
"STATUS: OK" << endl;
Iterator on the items of list.
Doubly-linked list (defined in tpl_dynList.H).
T & append(const T &item)
bool has_curr() const noexcept
Smallest circle enclosing a point set (Welzl's algorithm).
Represents a point with rectangular coordinates in a 2D plane.
const Geom_Number & get_x() const noexcept
Gets the x-coordinate value.
const Geom_Number & get_y() const noexcept
Gets the y-coordinate value.
Computational geometry algorithms.
static void print_banner(const char *title)
Main namespace for Aleph-w library functions.