Polygon¶
- class Polygon(*points: Point, plane, **kwargs)[source]¶
A polygon is a closed
PolygonalChain
.Examples
Example: PolygonExample ¶
from manim import * from hmanim.native import Point, Polygon class PolygonExample(Scene): def construct(self): # The plane that all our hyperbolic objects live in. plane = PolarPlane(size=5) # Draw the polygon. polygon = Polygon( *[ Point(3.0, 0.0), Point(4.0, TAU / 4), Point(2.0, TAU / 2), Point(1.0, TAU * 3 / 4), ], plane=plane ) self.add(polygon)
from hmanim.native import Point, Polygon class PolygonExample(Scene): def construct(self): # The plane that all our hyperbolic objects live in. plane = PolarPlane(size=5) # Draw the polygon. polygon = Polygon( *[ Point(3.0, 0.0), Point(4.0, TAU / 4), Point(2.0, TAU / 2), Point(1.0, TAU * 3 / 4), ], plane=plane ) self.add(polygon)