A community-maintained Python framework for creating mathematical animations.
Complex functions applied to 3d objects should leave z coordiante unchanged
Grant Sandersonc29b4c1c9372
diff --git a/mobject/mobject.py b/mobject/mobject.pyindex 1ef46e9e3..0f92d95c7 100644--- a/mobject/mobject.py+++ b/mobject/mobject.py@@ -18,7 +18,6 @@ from utils.iterables import list_updatefrom utils.iterables import remove_list_redundanciesfrom utils.paths import straight_pathfrom utils.space_ops import angle_of_vector-from utils.space_ops import complex_to_R3from utils.space_ops import rotation_matrixfrom utils.simple_functions import get_num_argsfrom utils.space_ops import get_norm@@ -270,10 +269,15 @@ class Mobject(Container):return selfdef apply_complex_function(self, function, **kwargs):- return self.apply_function(- lambda x_y_z: complex_to_R3(function(complex(x_y_z[0], x_y_z[1]))),- **kwargs- )+ def R3_func(point):+ x, y, z = point+ xy_complex = function(complex(x, y))+ return [+ xy_complex.real,+ xy_complex.imag,+ z+ ]+ return self.apply_function(R3_func)def wag(self, direction=RIGHT, axis=DOWN, wag_factor=1.0):for mob in self.family_members_with_points():