MobjectTable#
Qualified name: manim.mobject.table.MobjectTable
- class MobjectTable(table, element_to_mobject=<function MobjectTable.<lambda>>, **kwargs)[source]#
Bases:
TableA specialized
Tablemobject for use withMobject.Examples
Example: MobjectTableExample ¶
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
Tablewithelement_to_mobjectset to an identity function. Here, every item intablemust already be of typeMobject.- Parameters
table (Iterable[Iterable[VMobject]]) – A 2D array or list of lists. Content of the table must be of type
Mobject.element_to_mobject (Callable[[VMobject], VMobject]) – The
Mobjectclass applied to the table entries. Set aslambda m : mto return itself.kwargs – Additional arguments to be passed to
Table.
Methods
Attributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.