Function regular_polygon

  • Create regular polygon centered at origin with a given radius

    Parameters

    • n: number

      number of sides

    • radius: number = 1

      radius of the polygon

    Returns Diagram

    a Diagram object * if you want to create a regular polygon with a given side length, use regular_polygon_side