应用矩阵

限定名称: manim.animation.transform.ApplyMatrix

class ApplyMatrix(mobject=None, *args, use_override=True, **kwargs)[source]

基础类:ApplyPointwiseFunction

将矩阵变换应用于mobject。

Parameters:
  • matrix (np.ndarray) – 变换矩阵。

  • mobject (Mobject) – 该 Mobject

  • 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_arc

path_func