MobjectTable

Qualified name: manim.mobject.table.MobjectTable

class MobjectTable(table, element_to_mobject=<function MobjectTable.<lambda>>, **kwargs)[source]

Bases: manim.mobject.table.Table

A specialized Table mobject for use with with Mobject.

Examples

Example: MobjectTableExample

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

class MobjectTableExample(Scene):
    def construct(self):
        cross = VGroup(
            Line(UP + LEFT, DOWN + RIGHT),
            Line(UP + RIGHT, DOWN + LEFT),
        )
        a = Circle().set_color(RED).scale(0.5)
        b = cross.set_color(BLUE).scale(0.5)
        t0 = MobjectTable(
            [[a.copy(),b.copy(),a.copy()],
            [b.copy(),a.copy(),a.copy()],
            [a.copy(),b.copy(),b.copy()]]
        )
        line = Line(
            t0.get_corner(DL), t0.get_corner(UR)
        ).set_color(RED)
        self.add(t0, line)

Special case of Table with element_to_mobject set to an identity function. Here, every item in table must already be of type Mobject.

Parameters

Methods

Attributes

animate

Used to animate the application of any method of self.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.