ApplyMatrix

Qualified name: manim.animation.transform.ApplyMatrix

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

Bases: ApplyPointwiseFunction

Applies a matrix transform to an mobject.

Parameters:
  • matrix (np.ndarray) – The transformation matrix.

  • mobject (Mobject) – The Mobject.

  • about_point (np.ndarray) – The origin point for the transform. Defaults to ORIGIN.

  • kwargs – Further keyword arguments that are passed to ApplyPointwiseFunction.

Examples

Example: 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()))

Methods

initialize_matrix

Attributes

path_arc

path_func

run_time

_original__init__(matrix, mobject, about_point=array([0., 0., 0.]), **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • matrix (ndarray)

  • mobject (Mobject)

  • about_point (ndarray)

Return type:

None