From a2f201f59ecfb2bfe505e87ee016b0f2eef25b07 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 5 Feb 2021 19:58:29 -0800 Subject: [PATCH] Small changes to Homotopy animations --- manimlib/animation/movement.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manimlib/animation/movement.py b/manimlib/animation/movement.py index e840cbd2..d1cea65e 100644 --- a/manimlib/animation/movement.py +++ b/manimlib/animation/movement.py @@ -28,20 +28,22 @@ class Homotopy(Animation): class SmoothedVectorizedHomotopy(Homotopy): - def interpolate_submobject(self, submob, start, alpha): - Homotopy.interpolate_submobject(self, submob, start, alpha) - submob.make_approximately_smooth() + CONFIG = { + "apply_function_kwargs": {"make_smooth": True}, + } class ComplexHomotopy(Homotopy): def __init__(self, complex_homotopy, mobject, **kwargs): """ - Complex Hootopy a function Cx[0, 1] to C + Given a function form (z, t) -> w, where z and w + are complex numbers and t is time, this animates + the state over time """ def homotopy(x, y, z, t): c = complex_homotopy(complex(x, y), t) return (c.real, c.imag, z) - Homotopy.__init__(self, homotopy, mobject, **kwargs) + super().__init__(homotopy, mobject, **kwargs) class PhaseFlow(Animation):