diff options
author | Archit Sangal | 2020-06-11 15:41:39 +0530 |
---|---|---|
committer | Archit Sangal | 2020-06-11 15:41:39 +0530 |
commit | a047a2081ef749f6acc6d9505828fbfbecbcf90a (patch) | |
tree | 9da5827197f0de65c914c7e700cb43da0aa39078 /FSF-2020/linear-algebra | |
parent | bd056f51d28e6ca31c103cc53f43a728b81a1387 (diff) | |
download | FSF-mathematics-python-code-archive-a047a2081ef749f6acc6d9505828fbfbecbcf90a.tar.gz FSF-mathematics-python-code-archive-a047a2081ef749f6acc6d9505828fbfbecbcf90a.tar.bz2 FSF-mathematics-python-code-archive-a047a2081ef749f6acc6d9505828fbfbecbcf90a.zip |
updated Linear Transformation(Maps)
Diffstat (limited to 'FSF-2020/linear-algebra')
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt | 3 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py | 45 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py) | 0 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py) | 0 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py) | 0 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif) | bin | 1566999 -> 1566999 bytes | |||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py) | 0 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif) | bin | 1347079 -> 1347079 bytes | |||
-rwxr-xr-x | FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py (renamed from FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py) | 0 |
9 files changed, 48 insertions, 0 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt new file mode 100644 index 0000000..cae98ce --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt @@ -0,0 +1,3 @@ +file 'text.mp4' +file 'LinearTransformation.mp4' +file 'NonLinearTransformation.mp4' diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py new file mode 100644 index 0000000..677f890 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py @@ -0,0 +1,45 @@ +from manimlib.imports import * + +class text(Scene): + def construct(self): + text1 = TextMobject("For a grid, undergoing a linear transformation, all it's straight lines") + text1.scale(0.9) + text2 = TextMobject("must either remain straight lines or sends to a point in the grid formed") + text2.scale(0.9) + text1.move_to(ORIGIN+UP) + text2.move_to(ORIGIN) + self.play(Write(text1)) + self.play(Write(text2)) + self.wait() + self.play(FadeOut(text1),FadeOut(text2)) + +class LinearTransformation(LinearTransformationScene): + CONFIG = { + "basis_vector_stroke_width": 3, + "leave_ghost_vectors": True, + } + + def construct(self): + self.setup() + matrix = [[0.866,-0.5],[0.5,0.866]] + self.apply_matrix(matrix) + text = TextMobject("This is a Linear","Trasformation") + text[0].move_to(DOWN+4*LEFT) + text[1].move_to(1.5*DOWN+4*LEFT) + text.add_background_rectangle() + self.play(Write(text)) + self.wait() + +class NonLinearTransformation(Scene): + def construct(self): + grid = NumberPlane() + self.play(ShowCreation(grid),run_time =2) + NonLinearTrans = lambda coordinates : coordinates + np.array([np.sin(coordinates[1]),np.sin(coordinates[0]),0,]) + grid.prepare_for_nonlinear_transform() + self.play(grid.apply_function,NonLinearTrans) + text = TextMobject("While, this is not a","Linear Trasformation") + text[0].move_to(DOWN+4*LEFT) + text[1].move_to(1.5*DOWN+4*LEFT) + text.add_background_rectangle() + self.play(Write(text)) + self.wait()
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py index 577032d..577032d 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py index a7856a5..a7856a5 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py index 91f098e..91f098e 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif Binary files differindex 9bef1b6..9bef1b6 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py index 718e4e0..718e4e0 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif Binary files differindex 7ca323f..7ca323f 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py index 01a0cef..01a0cef 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py |