应用矩阵¶
限定名称: manim.animation.transform.ApplyMatrix
- class ApplyMatrix(mobject=None, *args, use_override=True, **kwargs)[source]¶
-
将矩阵变换应用于mobject。
- Parameters:
matrix (np.ndarray) – 变换矩阵。
about_point (np.ndarray) – 变换的起点。默认为
ORIGIN。kwargs – 传递给
ApplyPointwiseFunction的进一步关键字参数。
示例
示例:ApplyMatrixExample ¶
from manim import * class ApplyMatrixExample(Scene): def construct(self): matrix = [[1, 1], [0, 2/3]] self.play(ApplyMatrix(matrix, Text("Hello World!")), ApplyMatrix(matrix, NumberPlane()))
class ApplyMatrixExample(Scene): def construct(self): matrix = [[1, 1], [0, 2/3]] self.play(ApplyMatrix(matrix, Text("Hello World!")), ApplyMatrix(matrix, NumberPlane()))方法
initialize_matrix属性
path_arcpath_func