summaryrefslogtreecommitdiff
path: root/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis
diff options
context:
space:
mode:
authorPurusharth Saxena2020-07-19 13:20:41 +0530
committerGitHub2020-07-19 13:20:41 +0530
commitae98b8f71568711d01ae8d561c1d068f7ce329b5 (patch)
tree0c5959d7b22367924d0fac81cbd456727bb866ed /FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis
parent764fd01c2d0693c8b750050306a693c6aa0b86ab (diff)
parentc7770570e1b6dc27853a5e37a68bda8c85e584bb (diff)
downloadFSF-mathematics-python-code-archive-ae98b8f71568711d01ae8d561c1d068f7ce329b5.tar.gz
FSF-mathematics-python-code-archive-ae98b8f71568711d01ae8d561c1d068f7ce329b5.tar.bz2
FSF-mathematics-python-code-archive-ae98b8f71568711d01ae8d561c1d068f7ce329b5.zip
Merge pull request #74 from architsangal/master
Implemented final changes
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis')
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md2
-rwxr-xr-xFSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py6
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py46
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gifbin43092116 -> 5430037 bytes
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gifbin37493895 -> 21739496 bytes
5 files changed, 31 insertions, 23 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md
index 55aba66..e287fa1 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/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/Orthonormal-Basis/file2_sum_of_projections_part1.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py
index 81a0888..141e99b 100755
--- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py
@@ -43,7 +43,7 @@ class LinearTrans(LinearTransformationScene):
text3.add_background_rectangle()
self.play(ShowCreation(arrow),Write(text3))
self.wait()
- v_cor = TextMobject("(1,3)")
+ v_cor = TextMobject("(1 , 3)")
v_cor.move_to(3.2*UP+1.3*RIGHT)
v_cor.set_color(BLUE)
v_cor.scale(0.75)
@@ -71,7 +71,7 @@ class LinearTrans(LinearTransformationScene):
v1_cor.add_background_rectangle()
self.play(Write(v1_cor))
self.wait(0.5)
- text1 = TextMobject(r"(1.8,2.4)")
+ text1 = TextMobject("(1.8 , 2.4)")
text1.move_to(2.1*UP+2.5*RIGHT)
text1.scale(0.75)
text1.set_color("#6B8E23")
@@ -95,7 +95,7 @@ class LinearTrans(LinearTransformationScene):
v2_cor.add_background_rectangle()
self.play(Write(v2_cor))
self.wait(0.5)
- text2 = TextMobject(r"(-0.8,0.6)")
+ text2 = TextMobject("(-0.8 , 0.6)")
text2.move_to(0.75*UP+1.75*LEFT)
text2.scale(0.75)
text2.set_color("#8b0000")
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py
index 9d25192..2899286 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py
@@ -3,12 +3,6 @@ class ThreeDExplanation(ThreeDScene):
def construct(self):
- text = TextMobject("Let us consider the example discussed above again. These are the things we know:-")
- text.scale(0.75)
- self.add_fixed_in_frame_mobjects(text)
- text.move_to(3*UP)
- self.play(Write(text))
- self.wait(2)
basis = TextMobject(r"Set of Orthonormal Basis - $\left(\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right),\left(\begin{array}{c}\frac{-1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right),\left(\begin{array}{c}0\\0\\1\end{array}\right)$")
basis.scale(0.75)
basis.move_to(UP*1.5)
@@ -31,7 +25,7 @@ class ThreeDExplanation(ThreeDScene):
self.play(Write(eq2))
self.play(Write(eq3))
self.wait()
- self.play(FadeOut(text), FadeOut(basis), FadeOut(eq), FadeOut(v), FadeOut(eq1), FadeOut(eq2), FadeOut(eq3))
+ self.play(FadeOut(basis), FadeOut(eq), FadeOut(v), FadeOut(eq1), FadeOut(eq2), FadeOut(eq3))
self.wait()
text = TextMobject("These are the 3 mutually orthonormal basis of the set(", r"$v_1$, ", r"$v_2$, ", r"$v_3$",")")
@@ -44,13 +38,20 @@ class ThreeDExplanation(ThreeDScene):
self.play(Write(text))
self.wait()
- axes = ThreeDAxes(x_min = -9,x_max=9,y_min=-9,y_max=9,z_min=-9,z_max=9)
+ axes = ThreeDAxes(x_min = -6,x_max=6,y_min=-6,y_max=6,z_min=-6,z_max=6)
self.play(ShowCreation(axes))
- self.move_camera(distance = 100, phi=30*DEGREES,theta=45*DEGREES,run_time=3)
- self.begin_ambient_camera_rotation(rate=0.3)
-
- dashedline1 = DashedLine(start = -12*(UP+RIGHT), end = 12*(UP+RIGHT))
- dashedline2 = DashedLine(start = -12*(UP+LEFT), end = 12*(UP+LEFT))
+ self.move_camera(distance = 100, phi=45*DEGREES,theta=45*DEGREES,run_time=5)
+ self.begin_ambient_camera_rotation(rate=0.1)
+
+ xy_plane = Polygon(6*RIGHT+6*UP,-6*RIGHT+6*UP,-6*RIGHT-6*UP,6*RIGHT-6*UP)
+ xy_plane.set_color("#333333")
+ xy_plane.set_fill("#333333")
+ xy_plane.set_opacity(1)
+ xy_plane.fade(0.7)
+ self.play(ShowCreation(xy_plane))
+
+ dashedline1 = DashedLine(start = -6*(UP+RIGHT), end = 6*(UP+RIGHT))
+ dashedline2 = DashedLine(start = -6*(UP+LEFT), end = 6*(UP+LEFT))
dashedline3 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = 3.5*UP+3.5*RIGHT)
dashedline4 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = 0.5*UP+0.5*LEFT)
dashedline5 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = [0,0,5])
@@ -95,15 +96,17 @@ class ThreeDExplanation(ThreeDScene):
a_line = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5])
a_line.set_color(GOLD_E)
- a_tip = Polygon(4*UP+3*RIGHT+[0,0,5],3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*UP+0.1*LEFT,3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*DOWN+0.1*RIGHT)
+ a_tip = Polygon(3.92*UP+2.94*RIGHT+[0,0,4.9],3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*UP+0.1*LEFT,3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*DOWN+0.1*RIGHT)
a_tip.set_opacity(1)
a_tip.set_fill(GOLD_E)
a_tip.set_color(GOLD_E)
self.play(ShowCreation(a_line), ShowCreation(a_tip))
- self.wait(9)
+ self.stop_ambient_camera_rotation()
+ self.move_camera(distance = 100, phi=45*DEGREES,theta=135*DEGREES,run_time=5)
+
self.play(ShowCreation(dashedline3),ShowCreation(dashedline4),ShowCreation(dashedline5))
- self.wait(6)
+ self.wait()
pv1 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5])
pv1.set_color(GOLD_E)
@@ -142,13 +145,18 @@ class ThreeDExplanation(ThreeDScene):
v3_p = Line(start = ORIGIN,end = [0,0,5])
v3_p.set_color(YELLOW_E)
- v3_p_tip = Polygon([0,0,5],[0,0,4.8]+0.2*RIGHT,[0,0,4.8]+0.2*LEFT)
+ v3_p_tip = Polygon([0,0,5.15],[0,0,4.8]+0.2*RIGHT,[0,0,4.8]+0.2*LEFT)
v3_p_tip.set_opacity(1)
v3_p_tip.set_fill(YELLOW_E)
v3_p_tip.set_color(YELLOW_E)
- self.stop_ambient_camera_rotation()
- self.play(Transform(pv1,v1_p), Transform(pv1tip,v1_p_tip), Transform(pv2,v2_p), Transform(pv2tip,v2_p_tip), Transform(pv3,v3_p), Transform(pv3tip,v3_p_tip))
+ #self.stop_ambient_camera_rotation()
+ self.play(Transform(pv1,v1_p),
+ Transform(pv1tip,v1_p_tip),
+ Transform(pv2,v2_p),
+ Transform(pv2tip,v2_p_tip),
+ Transform(pv3,v3_p),
+ Transform(pv3tip,v3_p_tip))
self.play(FadeOut(dashedline1),
FadeOut(dashedline2),
FadeOut(dashedline3),
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif
index 47fc316..d7eb0bc 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif
Binary files differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif
index d4ae50c..1df6413 100644
--- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif
Binary files differ