Mobject矩阵¶
限定名称: manim.mobject.matrix.MobjectMatrix
- class MobjectMatrix(matrix, element_to_mobject=<function MobjectMatrix.<lambda>>, **kwargs)[source]¶
基础:
Matrix
一个在屏幕上显示mobject条目矩阵的mobject。
示例
示例:MobjectMatrixExample ¶
from manim import * class MobjectMatrixExample(Scene): def construct(self): a = Circle().scale(0.3) b = Square().scale(0.3) c = MathTex("\pi").scale(2) d = Star().scale(0.3) m0 = MobjectMatrix([[a, b], [c, d]]) self.add(m0)
class MobjectMatrixExample(Scene): def construct(self): a = Circle().scale(0.3) b = Square().scale(0.3) c = MathTex("\pi").scale(2) d = Star().scale(0.3) m0 = MobjectMatrix([[a, b], [c, d]]) self.add(m0)
方法
属性
animate
用于动画化
self
的任何方法的应用。animation_overrides
color
depth
mobject的深度。
fill_color
如果有多种颜色(用于渐变),则返回第一个颜色
height
mobject的高度。
n_points_per_curve
sheen_factor
stroke_color
width
mobject的宽度。
- _original__init__(matrix, element_to_mobject=<function MobjectMatrix.<lambda>>, **kwargs)¶
初始化自身。有关准确的签名,请参阅 help(type(self))。