From 7395f2f3b3dba6a550f96b16ca6f1ae6b6f3d836 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 5 Jun 2018 14:44:13 -0600 Subject: [PATCH] Use x_y_z --- old_projects/matrix_as_transform_2d.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/old_projects/matrix_as_transform_2d.py b/old_projects/matrix_as_transform_2d.py index 155fdc12..0e405057 100644 --- a/old_projects/matrix_as_transform_2d.py +++ b/old_projects/matrix_as_transform_2d.py @@ -93,11 +93,11 @@ class ExamplesOfOneDimensionalLinearTransforms(ShowMultiplication): class ExamplesOfNonlinearOneDimensionalTransforms(NumberLineScene): def construct(self): - def sinx_plux_x(xxx_todo_changeme): - (x, y, z) = xxx_todo_changeme + def sinx_plux_x(x_y_z): + (x, y, z) = x_y_z return (np.sin(x) + 1.2*x, y, z) - def shift_zero(xxx_todo_changeme2): - (x, y, z) = xxx_todo_changeme2 + def shift_zero(x_y_z): + (x, y, z) = x_y_z return (2*x+4, y, z) self.nonlinear = TextMobject("Not a Linear Transform") self.nonlinear.set_color(LIGHT_RED).to_edge(UP, buff = 1.5) @@ -295,11 +295,11 @@ class ExamplesOfTwoDimensionalLinearTransformations(ShowMatrixTransform): class ExamplesOfNonlinearTwoDimensionalTransformations(Scene): def construct(self): Scene.construct(self) - def squiggle(xxx_todo_changeme3): - (x, y, z) = xxx_todo_changeme3 + def squiggle(x_y_z): + (x, y, z) = x_y_z return (x+np.sin(y), y+np.cos(x), z) - def shift_zero(xxx_todo_changeme4): - (x, y, z) = xxx_todo_changeme4 + def shift_zero(x_y_z): + (x, y, z) = x_y_z return (2*x + 3*y + 4, -1*x+y+2, z) self.nonlinear = TextMobject("Nonlinear Transform") self.nonlinear.set_color(LIGHT_RED) @@ -386,12 +386,12 @@ class TrickyExamplesOfNonlinearTwoDimensionalTransformations(Scene): UP*FRAME_Y_RADIUS+RIGHT*FRAME_X_RADIUS, density = 10*DEFAULT_POINT_DENSITY_1D ) - def sunrise(xxx_todo_changeme5): - (x, y, z) = xxx_todo_changeme5 + def sunrise(x_y_z): + (x, y, z) = x_y_z return ((FRAME_Y_RADIUS+y)*x, y, z) - def squished(xxx_todo_changeme6): - (x, y, z) = xxx_todo_changeme6 + def squished(x_y_z): + (x, y, z) = x_y_z return (x + np.sin(x), y+np.sin(y), z) self.get_blackness()