Skip to content

The animation engine for agents: blazingly fast math and 3D videos with Manim's Python API, on a Rust GPU core.

Python
457 B
Raw Blame
# Source: manim/mobject/types/vectorized_mobject.py
import manimgx as m


class AddIterableToVGroupExample(m.Scene):
    def construct(self):
        v = m.VGroup(
            m.Square(),  # Singular VMobject instance
            [m.Circle(), m.Triangle()],  # List of VMobject instances
            m.Dot(),
            (m.Dot() for _ in range(2)),  # Iterable that generates VMobjects
        )
        v.arrange()
        self.add(v)
        self.wait()