summaryrefslogtreecommitdiff
path: root/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)')
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md2
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gifbin50836502 -> 52608896 bytes
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gifbin19348496 -> 31583525 bytes
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py34
-rwxr-xr-xFSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py15
5 files changed, 40 insertions, 11 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md
index c286736..2a46424 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md
@@ -1,5 +1,5 @@
# Contributer: Archit Sangal
-My Github Account : <a href="https://github.com/architsangal">architsangal</a>
+My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal)
<br/></br>
## Sub-Topics Covered:
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif
index e9f4b08..d8c64b7 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif
Binary files differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif
index 683f586..92bdff6 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif
Binary files differ
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
index 677f890..0182bd9 100644
--- 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
@@ -2,16 +2,20 @@ 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 = TextMobject("For a grid, undergoing a linear transformation, all its 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)
+ text3 = TextMobject("Origin must remain where it was before transformation.")
+ text3.scale(0.9)
text1.move_to(ORIGIN+UP)
text2.move_to(ORIGIN)
+ text3.move_to(ORIGIN+DOWN)
self.play(Write(text1))
self.play(Write(text2))
+ self.play(Write(text3))
self.wait()
- self.play(FadeOut(text1),FadeOut(text2))
+ self.play(FadeOut(text1),FadeOut(text2),FadeOut(text3))
class LinearTransformation(LinearTransformationScene):
CONFIG = {
@@ -34,6 +38,7 @@ class NonLinearTransformation(Scene):
def construct(self):
grid = NumberPlane()
self.play(ShowCreation(grid),run_time =2)
+ # I have taken reference from purusharth's code
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)
@@ -42,4 +47,27 @@ class NonLinearTransformation(Scene):
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
+ self.wait()
+
+class MoveOrigin(LinearTransformationScene):
+
+ CONFIG = {
+ "show_basis_vectors": False,
+ }
+ def construct(self):
+ self.wait()
+
+ dot = Dot(ORIGIN, color = YELLOW)
+ self.add_transformable_mobject(dot)
+ self.apply_nonlinear_transformation(self.func)
+ text = TextMobject("This is also not a linear transformation as the origin moves from its original position")
+ text.move_to(2*DOWN)
+ text.scale(0.5)
+ text.set_color(YELLOW)
+ text.add_background_rectangle()
+ self.play(Write(text))
+ self.wait()
+
+ def func(self, point):
+ matrix_transform = self.get_matrix_transformation([[1, -1], [1, 1]])
+ return matrix_transform(point) + UP+ RIGHT
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py
index 96e456d..1f6badd 100755
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py
@@ -69,7 +69,7 @@ class Linear(GraphScene):
class withgrid(LinearTransformationScene):
def construct(self):
- heading = TextMobject(r"Now, Imagine this happening for all the vectors")
+ heading = TextMobject(r"Now, imagine this happening for all the points")
heading.scale(0.5)
heading.move_to(UP*2.5+LEFT*4)
self.play(Write(heading))
@@ -141,6 +141,7 @@ class ThreeDExplanation(ThreeDScene):
text = TextMobject(r"$T(x,y) = (x+y,x-y,x+2y)$")
text.scale(0.75)
text.move_to(UP*2.5+LEFT*4)
+ text.move_to(-UP*3+LEFT*4)
self.add_fixed_in_frame_mobjects(text)
self.play(Write(text))
self.wait()
@@ -218,15 +219,15 @@ class ThreeDExplanation(ThreeDScene):
self.wait(3)
self.stop_ambient_camera_rotation()
- ending = TextMobject(r"$T(\left[\begin{array}{c}x \\ y\end{array}\right]) = \left[\begin{array}{c} x+y \\ x-y \\ x+2y \end{array}\right]$")
+ ending = TextMobject(r"$T(\left[\begin{array}{c}x \\ y\end{array}\right])$ = ",r"$\left[\begin{array}{c} x+y \\ x-y\\ x+2y \end{array}\right]$") #\begin{array}{c} x+y \\ x-y -- \\ x+2y -- \end{array}\right]$")
ending.scale(0.75)
- ending.move_to(-UP*2+LEFT*4)
- self.play(Transform(text,ending))
+ ending.move_to(-UP*3+LEFT*4)
self.add_fixed_in_frame_mobjects(ending)
+ self.play(FadeOut(text),Write(ending))
self.play(FadeOut(plane))
- self.wait(3)
+ self.wait(2)
- self.begin_ambient_camera_rotation(rate=0.5)
- self.wait(5)
+ self.begin_ambient_camera_rotation(rate=0.3)
+ self.wait(8)
self.stop_ambient_camera_rotation()