diff options
author | Archit Sangal | 2020-07-02 13:54:11 +0530 |
---|---|---|
committer | Archit Sangal | 2020-07-02 13:54:11 +0530 |
commit | df07222008133f28cdaf27d614a07a9c1ee4bec1 (patch) | |
tree | 720ba8157ed5f0248624dc021e23b01a3085007f /FSF-2020/linear-algebra/linear-transformations | |
parent | 450b3d9b496aa7386d8cf52ed683f77cfe9abeb3 (diff) | |
download | FSF-mathematics-python-code-archive-df07222008133f28cdaf27d614a07a9c1ee4bec1.tar.gz FSF-mathematics-python-code-archive-df07222008133f28cdaf27d614a07a9c1ee4bec1.tar.bz2 FSF-mathematics-python-code-archive-df07222008133f28cdaf27d614a07a9c1ee4bec1.zip |
file1_of orthonormal bases updated
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations')
-rwxr-xr-x | FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py | 26 | ||||
-rw-r--r-- | FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py | 75 |
2 files changed, 91 insertions, 10 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py index b400f93..a5d96f5 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py @@ -4,31 +4,37 @@ class Orthogonal(ThreeDScene): def construct(self):
axes = ThreeDAxes()
self.play(ShowCreation(axes))
- self.move_camera(phi=30*DEGREES,theta=-45*DEGREES,run_time=3)
- line1 = Line(start = ORIGIN,end = -3*LEFT)
+ self.move_camera(phi=60*DEGREES,theta=45*DEGREES,run_time=3)
+
+ text = TextMobject(r"$\hat{i}$",r"$\hat{j}$",r"$\hat{k}$")
+ text[0].move_to(0.7*DOWN+0.8*LEFT)
+ text[1].move_to(0.75*DOWN+0.7*RIGHT)
+ text[2].move_to(0.75*UP+0.4*RIGHT)
+ self.add_fixed_in_frame_mobjects(text)
+ self.play(Write(text))
+
+ line1 = Line(start = ORIGIN,end = RIGHT)
line1.set_color(DARK_BLUE)
- tip1 = Polygon(-LEFT,-0.8*LEFT-0.2*DOWN,-0.8*LEFT-0.2*UP)
- tip1.move_to(-3*LEFT)
+ tip1 = Polygon(-0.95*LEFT,-0.8*LEFT-0.1*DOWN,-0.8*LEFT-0.1*UP)
tip1.set_opacity(1)
tip1.set_fill(DARK_BLUE)
tip1.set_color(DARK_BLUE)
- arrow2 = Line(start = ORIGIN,end = -3*UP)
+ arrow2 = Line(start = ORIGIN,end = UP)
arrow2.set_color(DARK_BLUE)
- tip2 = Polygon(DOWN,0.8*DOWN-0.2*RIGHT,0.8*DOWN-0.2*LEFT)
- tip2.move_to(3*DOWN)
+ tip2 = Polygon(0.95*UP,0.8*UP-0.1*RIGHT,0.8*UP-0.1*LEFT)
tip2.set_opacity(1)
tip2.set_fill(DARK_BLUE)
tip2.set_color(DARK_BLUE)
arrow2.set_color(DARK_BLUE)
- arrow3 = Line(start = ORIGIN,end = [0,0,3])
+ arrow3 = Line(start = ORIGIN,end = [0,0,1])
arrow3.set_color(DARK_BLUE)
- tip3 = Polygon([0,0,3],[0,0,2.8]-0.2*RIGHT,[0,0,2.8]-0.2*LEFT)
+ tip3 = Polygon([0,0,0.95],[0,0,0.8]-0.1*RIGHT,[0,0,0.8]-0.1*LEFT)
tip3.set_opacity(1)
tip3.set_fill(DARK_BLUE)
tip3.set_color(DARK_BLUE)
self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), ShowCreation(arrow3), ShowCreation(tip3))
- self.wait()
\ No newline at end of file + self.wait()
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py new file mode 100644 index 0000000..fb31881 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py @@ -0,0 +1,75 @@ +from manimlib.imports import * +class solution(LinearTransformationScene): + def construct(self): + + self.setup() + self.wait() + + o = TextMobject(r"This is the original $2D$ vector space(before Linear Transformation)") + o.move_to(DOWN) + o.scale(0.75) + o.add_background_rectangle() + self.play(Write(o)) + self.wait() + self.play(FadeOut(o)) + + A = TextMobject("Let $A$ denote the matrix the of this linear transformation.") + A.move_to(DOWN) + A.scale(0.75) + A.add_background_rectangle() + self.play(Write(A)) + matrix = [[1,-1],[1,-1]] + self.apply_matrix(matrix) + self.wait() + self.play(FadeOut(A)) + + o = TextMobject(r"This is the transformed vector space i.e. a line ($1D$)") + o.move_to(DOWN) + o.scale(0.75) + o.add_background_rectangle() + self.play(Write(o)) + self.wait() + self.play(FadeOut(o)) + + arrow2 = Arrow(start = ORIGIN, end = 2*DOWN+2*LEFT) + arrow2.set_color(DARK_BLUE) + arrow2.scale(1.2) + self.play(ShowCreation(arrow2)) + self.wait() + + o1 = TextMobject("If the vector lies in the transformed vector space") + o2 = TextMobject("(the line) then the solution exist") + o1.move_to(2*DOWN+2*RIGHT) + o2.move_to(2.5*DOWN+2*RIGHT) + o1.scale(0.75) + o2.scale(0.75) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + self.wait() + self.play(FadeOut(o1), FadeOut(o2)) + + self.play(FadeOut(arrow2)) + + arrow1 = Arrow(start = ORIGIN, end = 2*UP+RIGHT) + arrow1.set_color(DARK_BLUE) + arrow1.scale(1.3) + self.play(ShowCreation(arrow1)) + self.wait() + + o1 = TextMobject("If the vector does lies in the transformed") + o2 = TextMobject("vector space then the does not solution exist") + o1.move_to(2*DOWN+2*RIGHT) + o2.move_to(2.5*DOWN+2*RIGHT) + o1.scale(0.75) + o2.scale(0.75) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + self.wait() + self.play(FadeOut(o1), FadeOut(o2)) + + self.play(FadeOut(arrow1)) +
\ No newline at end of file |