rectangle_polygon2d() creates a rectangle Polygon2D object
centered at (x, y).
Usage
rectangle_polygon2d(width = 1, height = 1, x = 0, y = 0, theta = degrees(0))Arguments
- width
Width of the rectangle (default
1).- height
Height of the rectangle (default
1).- x
X-coordinate of the center (default
0).- y
Y-coordinate of the center (default
0).- theta
Rotation angle (default
degrees(0)). Will be coerced bydegrees().
Value
A Polygon2D object with $is_convex == TRUE.
See also
isotoxal_2ngon_polygon2d() for isotoxal star polygons.
regular_ngon_polygon2d() for regular convex polygons.


