应用逐点函数

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

class ApplyPointwiseFunction(mobject=None, *args, use_override=True, **kwargs)[来源]

基础:ApplyMethod

将点函数应用于mobject的动画。

示例

示例:WarpSquare

from manim import *

class WarpSquare(Scene):
    def construct(self):
        square = Square()
        self.play(
            ApplyPointwiseFunction(
                lambda point: complex_to_R3(np.exp(R3_to_complex(point))), square
            )
        )
        self.wait()
class WarpSquare(Scene):
    def construct(self):
        square = Square()
        self.play(
            ApplyPointwiseFunction(
                lambda point: complex_to_R3(np.exp(R3_to_complex(point))), square
            )
        )
        self.wait()

方法

属性

path_arc

path_func

Parameters:
  • function (types.MethodType)

  • mobject (Mobject)

  • run_time (float)