IntegerMatrix¶
限定名称: manim.mobject.matrix.IntegerMatrix
- class IntegerMatrix(matrix, element_to_mobject=<class 'manim.mobject.text.numbers.Integer'>, **kwargs)[源码]¶
基类:
Matrix
一个在屏幕上显示整数矩阵的 mobject。
示例
示例: IntegerMatrixExample ¶
from manim import * class IntegerMatrixExample(Scene): def construct(self): m0 = IntegerMatrix( [[3.7, 2], [42.2, 12]], left_bracket="(", right_bracket=")") self.add(m0)
class IntegerMatrixExample(Scene): def construct(self): m0 = IntegerMatrix( [[3.7, 2], [42.2, 12]], left_bracket="(", right_bracket=")") self.add(m0)
如果矩阵中包含小数条目,将会进行四舍五入。
- 参数:
matrix (可迭代对象) – 一个 numpy 二维数组或列表的列表
element_to_mobject (Mobject) – 要使用的 Mobject,默认为 Integer
方法
属性
animate (动画)
用于动画化
self
的任何方法的应用。animation_overrides (动画覆盖)
颜色
depth (深度)
mobject 的深度。
fill_color (填充颜色)
如果存在多种颜色(用于渐变),则返回第一种颜色
height (高度)
mobject 的高度。
n_points_per_curve (每条曲线的点数)
sheen_factor (光泽因子)
stroke_color (描边颜色)
width (宽度)
mobject 的宽度。