83 const double R = 5.0,
r = 2.0;
84 for (
int i = 0; i < 5; ++i)
101 const double R = 4.0;
102 for (
int i = 0; i < 5; ++i)
104 double a =
M_PI / 2.0 + i * 2.0 *
M_PI / 5.0;
229 for (
size_t i = 0; i < result.size(); ++i)
242 for (
size_t i = 0; i <
shapes.size(); ++i)
259 for (
size_t i = 0; i <
shapes.size(); ++i)
300 auto result =
off(sq,
Geom_Number(1), PolygonOffset::JoinType::Bevel);
304 EXPECT_EQ(result.polygons(0).size(),
size_t(8));
342 for (
int d = 1; d <= 3; ++d)
Simple dynamic array with automatic resizing and functional operations.
T & append(const T &data)
Append a copy of data
static Polygon outward(const Polygon &convex_poly, const Geom_Number &distance)
Outward offset (dilation) of a convex polygon.
Represents a point with rectangular coordinates in a 2D plane.
Offset (inflate/deflate) an arbitrary simple polygon.
A general (irregular) 2D polygon defined by a sequence of vertices.
void add_vertex(const Point &point)
Add a vertex to the polygon.
void close()
Close the polygon.
static Polygon make_L_shape()
L-shaped polygon (non-convex, one reflex vertex).
static Polygon make_square(Geom_Number cx, Geom_Number cy, Geom_Number half)
static Polygon make_triangle()
TEST_F(GeomAlgorithmsTest, Offset_SquareOutward)
static Polygon make_narrow_corridor()
Narrow horizontal corridor: width 1, length 10.
static Polygon make_pentagon()
Regular pentagon (convex).
static Polygon make_star()
Star-shaped polygon with 5 reflex vertices.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
mpq_class Geom_Number
Numeric type used by the geometry module.
static Geom_Number polygon_area(const Polygon &poly)