MCPcopy
hub / github.com/ManimCommunity/manim / interpolate

Method interpolate

manim/mobject/value_tracker.py:195–204  ·  view source on GitHub ↗

Turns ``self`` into an interpolation between ``mobject1`` and ``mobject2``.

(
        self,
        mobject1: Mobject,
        mobject2: Mobject,
        alpha: float,
        path_func: PathFuncType = straight_path(),
    )

Source from the content-addressed store, hash-verified

193 return self
194
195 def interpolate(
196 self,
197 mobject1: Mobject,
198 mobject2: Mobject,
199 alpha: float,
200 path_func: PathFuncType = straight_path(),
201 ) -> Self:
202 """Turns ``self`` into an interpolation between ``mobject1`` and ``mobject2``."""
203 self.set(points=path_func(mobject1.points, mobject2.points, alpha))
204 return self
205
206
207class ComplexValueTracker(ValueTracker):

Callers

nothing calls this directly

Calls 2

straight_pathFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected