manim.animation.transform.ApplyPointwiseFunction

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

Bases: manim.animation.transform.ApplyMethod

Animation that applies a pointwise function to a mobject.

Examples

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

Method is a method of Mobject, args are arguments for that method. Key word arguments should be passed in as the last arg, as a dict, since kwargs is for configuration of the transform itself

Relies on the fact that mobject methods return the mobject

Methods

Attributes

path_arc

path_func

Parameters