diff options
author | Archit Sangal | 2020-06-11 17:08:27 +0530 |
---|---|---|
committer | Archit Sangal | 2020-06-11 17:08:27 +0530 |
commit | d66b55d33c7a26f7e73ada356294bee9b9b6fef9 (patch) | |
tree | 2e253878e2b222b0ccb0ba3ba35dbf1cb84d8e88 /FSF-2020/linear-algebra/linear-transformations | |
parent | a047a2081ef749f6acc6d9505828fbfbecbcf90a (diff) | |
download | FSF-mathematics-python-code-archive-d66b55d33c7a26f7e73ada356294bee9b9b6fef9.tar.gz FSF-mathematics-python-code-archive-d66b55d33c7a26f7e73ada356294bee9b9b6fef9.tar.bz2 FSF-mathematics-python-code-archive-d66b55d33c7a26f7e73ada356294bee9b9b6fef9.zip |
Updated codes for video in RN theorem
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations')
3 files changed, 60 insertions, 53 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt index 890fe45..5c48a13 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt +++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt @@ -1,2 +1,3 @@ -file 'RN_Theorem.mp4' -file 'RN_Theorem1.mp4' +file 'RN_Line.mp4' +file 'RN_Point.mp4' +file 'RN_SameDim.mp4' diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py index 31330e2..e54276c 100755 --- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py @@ -1,58 +1,97 @@ from manimlib.imports import *
-class RN_Theorem(LinearTransformationScene):
+class RN_Line(LinearTransformationScene):
def construct(self):
+
self.setup()
self.wait()
- square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE)
- square.move_to(4*LEFT+4*DOWN)
- square.scale(4)
- self.play(ShowCreation(square))
+
predim = TextMobject("Dimension of this vector space is 2")
predim.move_to(DOWN+4*LEFT)
predim.scale(0.75)
+ predim.add_background_rectangle()
self.play(Write(predim))
self.wait()
self.play(FadeOut(predim))
+
afterlt = TextMobject("After Linear transformation")
afterlt.move_to(DOWN+4*LEFT)
afterlt.scale(0.75)
- afterlt2 = TextMobject("Dimension of the vector space","remains to be 2")
- afterlt2[0].move_to(2*DOWN+4*LEFT)
- afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt.add_background_rectangle()
+
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 1")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
afterlt2.scale(0.75)
- matrix = [[1,1],[0,1]]
+ afterlt2.add_background_rectangle()
+ matrix = [[1,1],[1,1]]
self.apply_matrix(matrix)
self.play(Write(afterlt))
self.play(Write(afterlt2))
self.wait()
- nullity = TextMobject("Hence, nullity = 0")
+ nullity = TextMobject("Hence, nullity = 1")
nullity.move_to(DOWN+4*LEFT)
self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
self.wait(1)
self.play(FadeOut(nullity))
- predim = TextMobject("Let us look at another example")
+class RN_Point(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ predim = TextMobject("Another One")
predim.move_to(DOWN+4*LEFT)
predim.scale(0.75)
- matrix = [[1,-1],[0,1]]
- self.apply_matrix(matrix)
+ predim.add_background_rectangle()
self.play(Write(predim))
self.wait()
self.play(FadeOut(predim))
afterlt = TextMobject("After Linear transformation")
afterlt.move_to(DOWN+4*LEFT)
afterlt.scale(0.75)
- afterlt2 = TextMobject("Dimension of the vector space","changes to 1")
- afterlt2[0].move_to(2*DOWN+4*LEFT)
- afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt.add_background_rectangle()
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 0")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
afterlt2.scale(0.75)
- matrix = [[1,1],[1,1]]
+ afterlt2.add_background_rectangle()
+ matrix = [[0,0],[0,0]]
self.apply_matrix(matrix)
self.play(Write(afterlt))
self.play(Write(afterlt2))
self.wait()
- nullity = TextMobject("Hence, nullity = 1")
+ nullity = TextMobject("Hence, nullity = 2")
nullity.move_to(DOWN+4*LEFT)
self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
self.wait(1)
self.play(FadeOut(nullity))
+
+class RN_SameDim(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ predim = TextMobject("Let us look at another example")
+ predim.add_background_rectangle()
+ predim.move_to(DOWN+4*LEFT)
+ predim.scale(0.75)
+ self.play(Write(predim))
+ self.wait()
+ self.play(FadeOut(predim))
+ afterlt = TextMobject("After Linear transformation")
+ afterlt.move_to(DOWN+4*LEFT)
+ afterlt.scale(0.75)
+ afterlt.add_background_rectangle()
+ afterlt2 = TextMobject("Dimension of the vector space","remains to be 2")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
+ afterlt2.scale(0.75)
+ afterlt2.add_background_rectangle()
+ matrix = [[1,1],[0,1]]
+ self.apply_matrix(matrix)
+ self.play(Write(afterlt))
+ self.play(Write(afterlt2))
+ self.wait()
+ nullity = TextMobject("Hence, nullity = 0")
+ nullity.move_to(DOWN+4*LEFT)
+ self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
+ self.wait(1)
+ self.play(FadeOut(nullity))
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py deleted file mode 100644 index 8f05ddd..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py +++ /dev/null @@ -1,33 +0,0 @@ -from manimlib.imports import * -class RN_Theorem1(LinearTransformationScene): - def construct(self): - self.setup() - self.wait() - square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE) - square.move_to(4*LEFT+4*DOWN) - square.scale(4) - self.play(ShowCreation(square)) - predim = TextMobject("Another One") - predim.move_to(DOWN+4*LEFT) - predim.scale(0.75) - self.play(Write(predim)) - self.wait() - self.play(FadeOut(predim)) - afterlt = TextMobject("After Linear transformation") - afterlt.move_to(DOWN+4*LEFT) - afterlt.scale(0.75) - afterlt2 = TextMobject("Dimension of the vector space","changes to 0") - afterlt2[0].move_to(2*DOWN+4*LEFT) - afterlt2[1].move_to(3*DOWN+4*LEFT) - afterlt2.scale(0.75) - matrix = [[0,0],[0,0]] - self.apply_matrix(matrix) - self.play(Write(afterlt)) - self.play(Write(afterlt2)) - self.wait() - nullity = TextMobject("Hence, nullity = 2") - nullity.move_to(DOWN+4*LEFT) - #afterlt.scale(0.75) - self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity)) - self.wait(1) - self.play(FadeOut(nullity)) |