Polygon
- class Polygon
In the following constructors, additional keyword arguments can be provided to set properties of the new
Polygon
.- Polygon(points)
Construct the Polygon whose vertices are at the given points, which should be an iterable of
Point
instances.
- Polygon(p1, p2, n_sides)
Construct the regular Polygon which has n_sides sides, one of whose sides is the segment joining the points p1 and p2, and such that the interior of the Polygon is on your left as you travel from p1 to p2.
- property area
(Get-only) The area, in square units, of the Polygon.
A
Polygon
also has the following common properties:
See also