manim.mobject.geometry.RegularPolygram

class RegularPolygram(num_vertices, *, density=2, radius=1, start_angle=None, **kwargs)[source]

Bases: manim.mobject.geometry.Polygram

A Polygram with regularly spaced vertices.

Parameters
  • num_vertices (int) – The number of vertices.

  • density (int) –

    The density of the RegularPolygram.

    Can be thought of as how many vertices to hop to draw a line between them. Every density-th vertex is connected.

  • radius (float) – The radius of the circle that the vertices are placed on.

  • start_angle (Optional[float]) – The angle the vertices start at; the rotation of the RegularPolygram.

  • kwargs – Forwarded to the parent constructor.

Examples

Example: RegularPolygramExample

../_images/RegularPolygramExample-1.png
from manim import *

class RegularPolygramExample(Scene):
    def construct(self):
        pentagram = RegularPolygram(5, radius=2)
        self.add(pentagram)

Methods

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.