From 350ccaf2453180475406256cc8d4c9bfe9db3880 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 9 Jul 2020 02:59:49 +0530 Subject: updated folder name and README.md files --- .../Orthonormal-Basis/README.md | 30 ++++ .../Orthonormal-Basis/file1_orthogonal.py | 40 +++++ .../file2_sum_of_projections_part1.py | 133 ++++++++++++++++ .../file3_sum_of_projections_part2.py | 173 +++++++++++++++++++++ 4 files changed, 376 insertions(+) create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md create mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py create mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md new file mode 100644 index 0000000..c286736 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md @@ -0,0 +1,30 @@ +# Contributer: Archit Sangal +My Github Account : architsangal +

+ +## Sub-Topics Covered: ++ Linear Transformations (Linear Maps) + +#### Video 1: Visually understanding linear transformation(using grid) +![GIF1](file12.gif) + +#### Video 2: Linear Transformation when form 1 is given +![GIF2](file11.gif) + +#### Video 3: Matrix Representation Of Linear Transformation +![GIF3](file9.gif) + +#### Video 4: Understand Linear Transformations visually +![GIF4](file13.gif) + +#### Video 5: Uniform Scaling +![GIF5](file14.gif) + +#### Fig.1 Horizontal Shear +![GIF6](file6_Horizontal_Shear_gif.gif) + +#### Fig.2 Vertical Shear +![GIF7](file7_Vertical_Shear_gif.gif) + +#### Video 6: Rotation by an angle of in anticlockwise direction +![GIF8](file10.gif) \ No newline at end of file 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 new file mode 100755 index 0000000..a5d96f5 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py @@ -0,0 +1,40 @@ +from manimlib.imports import * + +class Orthogonal(ThreeDScene): + def construct(self): + axes = ThreeDAxes() + self.play(ShowCreation(axes)) + 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(-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 = UP) + arrow2.set_color(DARK_BLUE) + 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,1]) + arrow3.set_color(DARK_BLUE) + 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() 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 new file mode 100755 index 0000000..81a0888 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py @@ -0,0 +1,133 @@ +from manimlib.imports import * +class LinearTrans(LinearTransformationScene): + CONFIG = { + "show_basis_vectors": True, + "basis_vector_stroke_width": 1, + "leave_ghost_vectors": False, + "show_coordinates": True, + } + + def construct(self): + + self.setup() + + matrix = [[0.6,-0.8],[0.8,0.6]] + self.apply_matrix(matrix) + + self.wait(2) + orthonormal = TextMobject(r"These are 2 orthonormal vectors($v_1$ and $v_2$)") + orthonormal.scale(0.7) + orthonormal.move_to(DOWN+LEFT*3.5) + orthonormal.add_background_rectangle() + v1 = TextMobject(r"$v_1$") + v1.scale(0.75) + v1.set_color(X_COLOR) + v1.move_to(0.75*UP+RIGHT) + v1.add_background_rectangle() + v2 = TextMobject(r"$v_2$") + v2.scale(0.75) + v2.set_color(Y_COLOR) + v2.move_to(0.75*UP+LEFT*1.25) + v2.add_background_rectangle() + self.play(Write(orthonormal)) + self.play(Write(v1),Write(v2)) + self.wait() + self.play(FadeOut(orthonormal), FadeOut(v1), FadeOut(v2)) + + arrow = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + arrow.scale(1.2) + arrow.set_color(BLUE) + arrow.apply_matrix(matrix) + text3 = TextMobject("v") + text3.move_to(3.2*UP+1.2*RIGHT) + text3.add_background_rectangle() + self.play(ShowCreation(arrow),Write(text3)) + self.wait() + 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) + v_cor.add_background_rectangle() + self.play(Transform(text3,v_cor)) + + line1 = DashedLine(start = 1*UP+3*RIGHT, end = 3*RIGHT) + line2 = DashedLine(start = 1*UP+3*RIGHT, end = UP) + line1.apply_matrix(matrix) + line2.apply_matrix(matrix) + self.play(ShowCreation(line1),ShowCreation(line2),run_time = 2) + + v1 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + v1.scale(1.2) + v1.set_color(BLUE) + v1.apply_matrix(matrix) + arrow1 = Arrow(start = ORIGIN,end = 3*RIGHT) + arrow1.scale(1.2) + arrow1.set_color("#6B8E23") + arrow1.apply_matrix(matrix) + self.play(Transform(v1,arrow1)) + v1_cor = TextMobject(r"$ v_1$") + v1_cor.move_to(2.5*UP+3*RIGHT) + v1_cor.scale(0.75) + v1_cor.add_background_rectangle() + self.play(Write(v1_cor)) + self.wait(0.5) + text1 = TextMobject(r"(1.8,2.4)") + text1.move_to(2.1*UP+2.5*RIGHT) + text1.scale(0.75) + text1.set_color("#6B8E23") + text1.add_background_rectangle() + self.play(Transform(v1_cor,text1)) + + v2 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + v2.scale(1.2) + v2.set_color("#8b0000") + v2.apply_matrix(matrix) + arrow2 = Arrow(start = ORIGIN,end = UP) + arrow2.scale(2.1) + arrow2.set_color("#8b0000") + arrow2.apply_matrix(matrix) + self.wait(0.5) + self.play(Transform(v2,arrow2)) + self.wait(0.5) + v2_cor = TextMobject(r"$ v_2$") + v2_cor.move_to(0.75*UP+2.5*LEFT) + v2_cor.scale(0.75) + v2_cor.add_background_rectangle() + self.play(Write(v2_cor)) + self.wait(0.5) + text2 = TextMobject(r"(-0.8,0.6)") + text2.move_to(0.75*UP+1.75*LEFT) + text2.scale(0.75) + text2.set_color("#8b0000") + text2.add_background_rectangle() + self.play(Transform(v2_cor,text2)) + + self.wait() + + self.play(ApplyMethod(v2.move_to,1.4*RIGHT+2.7*UP),FadeOut(v1_cor),FadeOut(v2_cor),FadeOut(v_cor)) + + self.wait() + + ending = TextMobject(r"$v = v_1 + v_2$") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) + + ending = TextMobject(r"$\left[ \begin{array} {c} 1\\ 3 \end{array}\right] = \left[ \begin{array} {c}1.8 \\ 2.4 \end{array}\right] + \left[ \begin{array} {c} -0.8\\ 0.6 \end{array}\right]$") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) + + ending = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) \ No newline at end of file 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 new file mode 100644 index 0000000..9d25192 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py @@ -0,0 +1,173 @@ +from manimlib.imports import * +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) + self.play(Write(basis)) + v = TextMobject(r"$v_1$",r"$v_2$",r"$v_3$") + v[0].move_to(UP*0.5+RIGHT*0.75) + v[1].move_to(UP*0.5+RIGHT*2.5) + v[2].move_to(UP*0.5+RIGHT*4) + eq = TextMobject(r"$v = \left(\begin{array}{c}3\\4\\5\end{array}\right)$") + eq1 = TextMobject(r"$ = \frac{3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 = \frac{7}{\sqrt{2}}$") + eq2 = TextMobject(r"$ = \frac{-3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 =\frac{1}{\sqrt{2}}$") + eq3 = TextMobject(r"$ =  0 + 0 + 5 =5$") + eq.move_to(4*LEFT+DOWN) + eq1.move_to(0.5*DOWN+2*RIGHT) + eq2.move_to(1.5*DOWN+2*RIGHT) + eq3.move_to(2.5*DOWN+2*RIGHT) + self.play(Write(v)) + self.play(Write(eq)) + self.play(Write(eq1)) + 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.wait() + + text = TextMobject("These are the 3 mutually orthonormal basis of the set(", r"$v_1$, ", r"$v_2$, ", r"$v_3$",")") + text[1].set_color(DARK_BLUE) + text[2].set_color(RED) + text[3].set_color(YELLOW) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + 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) + 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)) + 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]) + + self.play(ShowCreation(dashedline1), ShowCreation(dashedline2)) + + line1 = Line(start = ORIGIN,end = 0.707*RIGHT + 0.707*UP) + line1.set_color(DARK_BLUE) + tip1 = Polygon(0.707*RIGHT + 0.707*UP, 0.707*RIGHT + 0.607*UP, 0.607*RIGHT + 0.707*UP) + tip1.set_opacity(1) + tip1.set_fill(DARK_BLUE) + tip1.set_color(DARK_BLUE) + self.play(ShowCreation(line1), ShowCreation(tip1)) + + line2 = Line(start = ORIGIN,end = 0.707*LEFT + 0.707*UP) + line2.set_color(RED) + tip2 = Polygon(0.707*LEFT + 0.707*UP, 0.707*LEFT + 0.607*UP, 0.607*LEFT + 0.707*UP) + tip2.set_opacity(1) + tip2.set_fill(RED) + tip2.set_color(RED) + + self.play(ShowCreation(line2), ShowCreation(tip2)) + + line3 = Line(start = ORIGIN,end = [0,0,1]) + line3.set_color(YELLOW) + tip3 = Polygon([0,0,1],[0,0,0.8]-0.2*RIGHT,[0,0,0.8]-0.2*LEFT) + tip3.set_opacity(1) + tip3.set_fill(YELLOW) + tip3.set_color(YELLOW) + self.play(ShowCreation(line3), ShowCreation(tip3)) + self.wait() + + self.play(FadeOut(text)) + + text = TextMobject("Take the projection of ", r"$v$", " on the mutually orthonormal vectors") + text[1].set_color(GOLD_E) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + self.play(Write(text)) + self.wait(2) + + 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.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.play(ShowCreation(dashedline3),ShowCreation(dashedline4),ShowCreation(dashedline5)) + self.wait(6) + + pv1 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv1.set_color(GOLD_E) + pv1tip = 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) + pv1tip.set_opacity(1) + pv1tip.set_fill(GOLD_E) + pv1tip.set_color(GOLD_E) + + v1_p = Line(start = ORIGIN,end = 3.5*RIGHT + 3.5*UP) + v1_p.set_color(BLUE_E) + v1_p_tip = Polygon(3.5*RIGHT + 3.5*UP, 3.5*RIGHT + 3.4*UP, 3.4*RIGHT + 3.5*UP) + v1_p_tip.set_opacity(1) + v1_p_tip.set_fill(BLUE_E) + v1_p_tip.set_color(BLUE_E) + + pv2 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv2.set_color(GOLD_E) + pv2tip = 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) + pv2tip.set_opacity(1) + pv2tip.set_fill(GOLD_E) + pv2tip.set_color(GOLD_E) + + v2_p = Line(start = ORIGIN,end = 0.5*LEFT + 0.5*UP) + v2_p.set_color(RED_E) + v2_p_tip = Polygon(0.5*LEFT + 0.5*UP, 0.5*LEFT + 0.4*UP, 0.4*LEFT + 0.5*UP) + v2_p_tip.set_opacity(1) + v2_p_tip.set_fill(RED_E) + v2_p_tip.set_color(RED_E) + + pv3 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv3.set_color(GOLD_E) + pv3tip = 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) + pv3tip.set_opacity(1) + pv3tip.set_fill(GOLD_E) + pv3tip.set_color(GOLD_E) + + 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.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.play(FadeOut(dashedline1), + FadeOut(dashedline2), + FadeOut(dashedline3), + FadeOut(dashedline4), + FadeOut(dashedline5), + FadeOut(line1), + FadeOut(tip1), + FadeOut(line2), + FadeOut(tip2), + FadeOut(line3), + FadeOut(tip3), + FadeOut(text)) + + text = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") + text.set_color(GOLD_E) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + self.play(Write(text), ApplyMethod(pv2.move_to,(3.5*RIGHT + 3.5*UP+3*RIGHT+4*UP)/2), ApplyMethod(pv2tip.move_to,(3.1*RIGHT + 3.9*UP))) + self.play(ApplyMethod(pv3.move_to,3*RIGHT + 4*UP + [0,0,2.5]), ApplyMethod(pv3tip.move_to,(3*RIGHT + 4*UP + [0,0,4.8]))) + + self.wait(3) \ No newline at end of file -- cgit From cb8944b427c93bff78b9b4d4b172613135726ee1 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 9 Jul 2020 03:11:35 +0530 Subject: updated folder name and README.md files --- .../Orthonormal-Basis/README.md | 29 +++++---------------- .../Orthonormal-Basis/file4.gif | Bin 0 -> 1733367 bytes .../Orthonormal-Basis/file5.gif | Bin 0 -> 43092116 bytes .../Orthonormal-Basis/file6.gif | Bin 0 -> 37493895 bytes 4 files changed, 7 insertions(+), 22 deletions(-) create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') 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 c286736..55aba66 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md @@ -3,28 +3,13 @@ My Github Account : architsangal

## Sub-Topics Covered: -+ Linear Transformations (Linear Maps) ++ Orthonormal Bases -#### Video 1: Visually understanding linear transformation(using grid) -![GIF1](file12.gif) +#### Video 1: Example of Orthonormal bases +![GIF1](file4.gif) -#### Video 2: Linear Transformation when form 1 is given -![GIF2](file11.gif) +#### Video 2: Adding the projections of a vector on orthonormal basis will produce the same vector +![GIF2](file5.gif) -#### Video 3: Matrix Representation Of Linear Transformation -![GIF3](file9.gif) - -#### Video 4: Understand Linear Transformations visually -![GIF4](file13.gif) - -#### Video 5: Uniform Scaling -![GIF5](file14.gif) - -#### Fig.1 Horizontal Shear -![GIF6](file6_Horizontal_Shear_gif.gif) - -#### Fig.2 Vertical Shear -![GIF7](file7_Vertical_Shear_gif.gif) - -#### Video 6: Rotation by an angle of in anticlockwise direction -![GIF8](file10.gif) \ No newline at end of file +#### Video 3: Relating the example and the property +![GIF3](file6.gif) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif new file mode 100644 index 0000000..4891350 Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif differ diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif new file mode 100644 index 0000000..47fc316 Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif 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 new file mode 100644 index 0000000..d4ae50c Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif differ -- cgit From d6bd3ca38c24960ada366e720784adfb1ed1d77c Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 16 Jul 2020 08:51:02 +0530 Subject: Archit Sangal --- .../file2_sum_of_projections_part1.py | 6 +++--- .../Orthonormal-Basis/file5.gif | Bin 43092116 -> 5430037 bytes 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') 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/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif index 47fc316..d7eb0bc 100644 Binary files a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif and b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif differ -- cgit From b5eaf0dc784aa69de358c96189cb4a83837939d3 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 16 Jul 2020 11:22:24 +0530 Subject: Archit Sangal --- .../file3_sum_of_projections_part2.py | 46 +++++++++++++--------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') 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), -- cgit From cc8c79fc58c03c734d9e1c8c57da55878a4ffec6 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 16 Jul 2020 11:43:28 +0530 Subject: Archit Sangal --- .../Orthonormal-Basis/file6.gif | Bin 37493895 -> 21739496 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') 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 Binary files a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif and b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif differ -- cgit From d5f9e76347842897a50fe7b0d265d8473506a0e6 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Fri, 17 Jul 2020 22:29:51 +0530 Subject: Archit Sangal --- .../linear-algebra/linear-transformations/Orthonormal-Basis/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis') 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 : architsangal +My Github Account : architsangal (https://github.com/architsangal)

## Sub-Topics Covered: -- cgit