DashedVMobject

Qualified name: manim.mobject.types.vectorized\_mobject.DashedVMobject

class DashedVMobject(vmobject, num_dashes=15, dashed_ratio=0.5, color='#FFFFFF', **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VMobject

A VMobject composed of dashes instead of lines.

Examples

Example: DashedVMobjectExample

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

class DashedVMobjectExample(Scene):
    def construct(self):
        r = 0.5

        top_row = VGroup()  # Increasing num_dashes
        for dashes in range(2, 12):
            circ = DashedVMobject(Circle(radius=r, color=WHITE), num_dashes=dashes)
            top_row.add(circ)

        middle_row = VGroup()  # Increasing dashed_ratio
        for ratio in np.arange(1 / 11, 1, 1 / 11):
            circ = DashedVMobject(
                Circle(radius=r, color=WHITE), dashed_ratio=ratio
            )
            middle_row.add(circ)

        sq = DashedVMobject(Square(1.5, color=RED))
        penta = DashedVMobject(RegularPolygon(5, color=BLUE))
        bottom_row = VGroup(sq, penta)

        top_row.arrange(buff=0.4)
        middle_row.arrange()
        bottom_row.arrange(buff=1)
        everything = VGroup(top_row, middle_row, bottom_row).arrange(DOWN, buff=1)
        self.add(everything)

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.