diff options
11 files changed, 312 insertions, 29 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file10_NOT_in_lecture_note_Column_Space.py index afe4f9a..afe4f9a 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file10_NOT_in_lecture_note_Column_Space.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Axb.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Axb.py index 95d1021..95d1021 100755 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Axb.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Axb.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif Binary files differdeleted file mode 100644 index 7d8d2e1..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif +++ /dev/null diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/CSasImage.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_CSasImage.py index fbb3291..70547cb 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/CSasImage.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_CSasImage.py @@ -3,30 +3,31 @@ from manimlib.imports import * class Column_Space(Scene): def construct(self): - A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$") + A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c} 1 & 2 \\ 3 & 4 \end{array} \right)$") A.move_to(2*UP) A[1].set_color(color = DARK_BLUE) A.scale(0.75) - self.play(Write(A),run_time = 1) + self.play(Write(A),run_time = 1) - CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$") + CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 4\end{array} \right)$") CS_A.move_to(1.5*LEFT+1*DOWN) CS_A[1].set_color(color = DARK_BLUE) CS_A[3].set_color(color = DARK_BLUE) - CS_A[5].set_color(color = DARK_BLUE) CS_A.scale(0.75) self.play(Write(CS_A),run_time = 2) - arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT) - arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT) - arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT) + arrow1 = Arrow(start = 1.25*UP,end = (0.25*DOWN+1.75*LEFT+0.25*DOWN+1.2*RIGHT)/2) + arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = (0.25*DOWN+2.9*RIGHT+0.25*DOWN)/2) + + arrow1.scale(1.5) + arrow3.scale(1.5) Defn = TextMobject("Linear Combination of Columns of Matrix") Defn.move_to(3*DOWN) - self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1) + self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow3),run_time = 1) self.wait(1) class solution(LinearTransformationScene): @@ -43,7 +44,7 @@ class solution(LinearTransformationScene): self.wait() self.play(FadeOut(o)) - A = TextMobject(r"Let $A$(= ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r")denote the matrix the of this linear transformation.") + A = TextMobject(r"Let $A$ be ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r". $A$ denotes the matrix the of this linear transformation.") A.move_to(2*DOWN) A.scale(0.75) A.add_background_rectangle() @@ -116,8 +117,8 @@ class solution2nd(LinearTransformationScene): arrow2 = Arrow(start = ORIGIN,end = UP+LEFT) arrow3 = Arrow(start = ORIGIN,end = 3*UP+4*RIGHT) arrow1.set_color(YELLOW) - arrow2.set_color(YELLOW) - arrow3.set_color(YELLOW) + arrow2.set_color(ORANGE) + arrow3.set_color(PURPLE) arrow1.scale(1.3) arrow2.scale(1.5) arrow3.scale(1.1) @@ -135,7 +136,7 @@ class solution2nd(LinearTransformationScene): self.wait() self.play(FadeOut(o)) - A = TextMobject(r"Matrix the of this linear transformation is $A$(= ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r") again.") + A = TextMobject(r"Let the matrix the of this linear transformation be $A$ =",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r" again.") A.move_to(2*DOWN) A.scale(0.75) A.add_background_rectangle() 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/file3_solution.py index fb31881..eb310f3 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file3_solution.py @@ -5,16 +5,16 @@ class solution(LinearTransformationScene): self.setup() self.wait() - o = TextMobject(r"This is the original $2D$ vector space(before Linear Transformation)") - o.move_to(DOWN) + o = TextMobject(r"This is the original vector space $R^2$ (before Linear Transformation)") + o.move_to(3*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 = TextMobject(r"Consider the matrix the of this linear transformation $A$ = $\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$") + A.move_to(3*DOWN) A.scale(0.75) A.add_background_rectangle() self.play(Write(A)) @@ -23,8 +23,8 @@ class solution(LinearTransformationScene): 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 = TextMobject(r"This is the transformed vector space") + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) @@ -32,15 +32,16 @@ class solution(LinearTransformationScene): self.play(FadeOut(o)) arrow2 = Arrow(start = ORIGIN, end = 2*DOWN+2*LEFT) - arrow2.set_color(DARK_BLUE) + arrow2.set_color(PURPLE) arrow2.scale(1.2) self.play(ShowCreation(arrow2)) self.wait() - o1 = TextMobject("If the vector lies in the transformed vector space") + o1 = TextMobject("If the ","vector b"," 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.move_to(2.5*DOWN+2*RIGHT) + o1[1].set_color(PURPLE) + o2.move_to(3*DOWN+2.5*RIGHT) o1.scale(0.75) o2.scale(0.75) o1.add_background_rectangle() @@ -53,15 +54,16 @@ class solution(LinearTransformationScene): self.play(FadeOut(arrow2)) arrow1 = Arrow(start = ORIGIN, end = 2*UP+RIGHT) - arrow1.set_color(DARK_BLUE) + arrow1.set_color(ORANGE) arrow1.scale(1.3) self.play(ShowCreation(arrow1)) self.wait() - o1 = TextMobject("If the vector does lies in the transformed") + o1 = TextMobject("If the ","vector b"," 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.move_to(2.5*DOWN+2*RIGHT) + o1[1].set_color(ORANGE) + o2.move_to(3*DOWN+2.5*RIGHT) o1.scale(0.75) o2.scale(0.75) o1.add_background_rectangle() diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/null_space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file4_null_space.py index c686710..3c52677 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/null_space.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file4_null_space.py @@ -6,7 +6,7 @@ class null_space(LinearTransformationScene): self.wait() o = TextMobject(r"This is the original vector space $R^2$(before Linear Transformation)") - o.move_to(DOWN) + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) @@ -64,7 +64,7 @@ class null_space(LinearTransformationScene): self.add_transformable_mobject(arrow6) self.add_transformable_mobject(arrow7) - o1 = TextMobject("Notice, entire set of vectors which belong to the vector") + o1 = TextMobject("Notice, entire set of vectors which belongs to the vector") o2 = TextMobject(r"subspace(Linear Span of $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$) transforms to zero") o1.move_to(2*DOWN+2.5*RIGHT) o2.move_to(2.75*DOWN+2.5*RIGHT) @@ -83,7 +83,7 @@ class null_space(LinearTransformationScene): self.play(FadeOut(o1), FadeOut(o2)) o = TextMobject(r"Hence, the vector space formed by linear span of $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$ is the null space of $A$") - o.move_to(DOWN) + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py new file mode 100644 index 0000000..5259eb4 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py @@ -0,0 +1,68 @@ +from manimlib.imports import * +class LS(Scene): + def construct(self): + text1 = TextMobject(r"Consider a matrix $A =$") + text2 = TextMobject(r"[") + text3 = TextMobject(r"$\begin{array}{c c} 1 & -2\end{array}$") + text4 = TextMobject(r"$\begin{array}{c c} 1 & -1\end{array}$") + text5 = TextMobject(r"]") + + text2.scale(2) + text5.scale(2) + + text1.set_color(DARK_BLUE) + text2.set_color(DARK_BLUE) + text3.set_color(PURPLE) + text4.set_color(YELLOW) + text5.set_color(DARK_BLUE) + + text1.move_to(3.5*LEFT+3*UP+2*RIGHT) + text2.move_to(0.75*LEFT+3*UP+2*RIGHT) + text3.move_to(3.25*UP+2*RIGHT) + text4.move_to(2.75*UP+2*RIGHT) + text5.move_to(0.75*RIGHT+3*UP+2*RIGHT) + + self.play(FadeIn(text1), FadeIn(text2), FadeIn(text3), FadeIn(text4), FadeIn(text5)) + self.wait() + + ttext1 = TextMobject(r"$A^T =$") + ttext2 = TextMobject(r"[") + ttext3 = TextMobject(r"$\begin{array}{c} 1 \\ -2\end{array}$") + ttext4 = TextMobject(r"$\begin{array}{c} 1 \\ -1\end{array}$") + ttext5 = TextMobject(r"]") + + ttext2.scale(2) + ttext5.scale(2) + + ttext1.set_color(DARK_BLUE) + ttext2.set_color(DARK_BLUE) + ttext3.set_color(PURPLE) + ttext4.set_color(YELLOW) + ttext5.set_color(DARK_BLUE) + + ttext1.move_to(2*LEFT+1.5*UP+2*RIGHT) + ttext2.move_to(1*LEFT+1.5*UP+2*RIGHT) + ttext3.move_to(0.5*LEFT+1.5*UP+2*RIGHT) + ttext4.move_to(0.5*RIGHT+1.5*UP+2*RIGHT) + ttext5.move_to(1*RIGHT+1.5*UP+2*RIGHT) + + self.play(FadeIn(ttext1), FadeIn(ttext2), FadeIn(ttext3), FadeIn(ttext4), FadeIn(ttext5)) + + rtext = TextMobject(r"Row Space of $A$ = Column Space of $A^T = a_1$",r"$\left[\begin{array}{c} 1 \\ -2\end{array}\right]$",r"$+a_2$",r"$\left[\begin{array}{c} 1 \\ -1\end{array}\right]$") + rtext[1].set_color(PURPLE) + rtext[3].set_color(YELLOW) + rtext.move_to(2*DOWN+1.5*LEFT) + rtext.scale(0.75) + + self.play(Write(rtext)) + self.wait() + + arrow1 = Arrow(start = 1.5*RIGHT+UP, end = 1.25*(DOWN+RIGHT)) + arrow2 = Arrow(start = 2.5*RIGHT+UP, end = 1.25*DOWN+3.25*RIGHT) + arrow1.scale(1.25) + arrow2.scale(1.25) + arrow1.set_color(PURPLE) + arrow2.set_color(YELLOW) + + self.play(ShowCreation(arrow1), ShowCreation(arrow2)) + self.wait(2) diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file6_Row_Space_part_2.py index b16a32a..b16a32a 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file6_Row_Space_part_2.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/row_space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file7_Row_space_Orthogonal_Complements.py index c81d370..c81d370 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/row_space.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file7_Row_space_Orthogonal_Complements.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py new file mode 100755 index 0000000..fd05e75 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py @@ -0,0 +1,26 @@ +from manimlib.imports import * + +class Left_Null_Space(Scene): + def construct(self): + + A = TextMobject(r"Left Null Space of A") + A.move_to(3*UP) + defn = TextMobject(r"It is a vector space that consists of all the solution $x$ to the equation $A^{T}x=0$") + defn.move_to(2*UP) + defn.scale(0.75) + eqn1 = TextMobject(r"$A^{T}x=0 \cdots (i)$") + eqn1.move_to(UP) + self.play(Write(A), Write(defn), Write(eqn1),run_time=1) + statement = TextMobject(r"Taking transpose of eqn $(i)$") + eqn = TextMobject(r"$(A^{T}x)^{T}=0$") + eqn.move_to(DOWN) + eqn2 = TextMobject(r"$x^{T}(A^{T})^{T}=0$") + eqn2.move_to(DOWN) + eqn3 = TextMobject(r"$x^{T}A=0$") + eqn3.move_to(DOWN) + self.play(Write(statement),Write(eqn),run_time=1) + self.wait(0.5) + self.play(Transform(eqn,eqn2),run_time=1) + self.wait(0.5) + self.play(Transform(eqn,eqn3),run_time=1) + self.wait(0.5)
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py new file mode 100644 index 0000000..61285be --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py @@ -0,0 +1,186 @@ +from manimlib.imports import * +class row_space(LinearTransformationScene): + def construct(self): + + self.setup() + self.wait() + + o = TextMobject(r"This is the original vector space $R^2$(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)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$i.e. the null space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + arrow = Arrow(start = ORIGIN, end = UP+RIGHT) + arrow.set_color(YELLOW) + arrow1 = Arrow(start = ORIGIN, end = 2*(UP+RIGHT)) + arrow1.set_color(YELLOW) + arrow2 = Arrow(start = ORIGIN, end = 3*(UP+RIGHT)) + arrow2.set_color(YELLOW) + arrow3 = Arrow(start = ORIGIN, end = 4*(UP+RIGHT)) + arrow3.set_color(YELLOW) + arrow4 = Arrow(start = ORIGIN, end = DOWN+LEFT) + arrow4.set_color(YELLOW) + arrow5 = Arrow(start = ORIGIN, end = 2*(DOWN+LEFT)) + arrow5.set_color(YELLOW) + arrow6 = Arrow(start = ORIGIN, end = 3*(DOWN+LEFT)) + arrow6.set_color(YELLOW) + arrow7 = Arrow(start = ORIGIN, end = 4*(DOWN+LEFT)) + arrow7.set_color(YELLOW) + + arrow.scale(1.5) + arrow1.scale(1.2) + arrow2.scale(1.15) + arrow3.scale(1.1) + arrow4.scale(1.5) + arrow5.scale(1.2) + arrow6.scale(1.15) + arrow7.scale(1.1) + + self.play(ShowCreation(arrow), + ShowCreation(arrow1), + ShowCreation(arrow2), + ShowCreation(arrow3), + ShowCreation(arrow4), + ShowCreation(arrow5), + ShowCreation(arrow6), + ShowCreation(arrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a vector $\left(\begin{array}{c} 1 \\ -1 \end{array}\right)$i.e. the row space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + rarrow = Arrow(start = ORIGIN, end = -UP+RIGHT) + rarrow.set_color(PURPLE) + rarrow1 = Arrow(start = ORIGIN, end = 2*(-UP+RIGHT)) + rarrow1.set_color(PURPLE) + rarrow2 = Arrow(start = ORIGIN, end = 3*(-UP+RIGHT)) + rarrow2.set_color(PURPLE) + rarrow3 = Arrow(start = ORIGIN, end = 4*(-UP+RIGHT)) + rarrow3.set_color(PURPLE) + rarrow4 = Arrow(start = ORIGIN, end = -DOWN+LEFT) + rarrow4.set_color(PURPLE) + rarrow5 = Arrow(start = ORIGIN, end = 2*(-DOWN+LEFT)) + rarrow5.set_color(PURPLE) + rarrow6 = Arrow(start = ORIGIN, end = 3*(-DOWN+LEFT)) + rarrow6.set_color(PURPLE) + rarrow7 = Arrow(start = ORIGIN, end = 4*(-DOWN+LEFT)) + rarrow7.set_color(PURPLE) + + rarrow.scale(1.5) + rarrow1.scale(1.2) + rarrow2.scale(1.15) + rarrow3.scale(1.1) + rarrow4.scale(1.5) + rarrow5.scale(1.2) + rarrow6.scale(1.15) + rarrow7.scale(1.1) + + self.play(ShowCreation(rarrow), + ShowCreation(rarrow1), + ShowCreation(rarrow2), + ShowCreation(rarrow3), + ShowCreation(rarrow4), + ShowCreation(rarrow5), + ShowCreation(rarrow6), + ShowCreation(rarrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + self.add_transformable_mobject(arrow) + self.add_transformable_mobject(arrow1) + self.add_transformable_mobject(arrow2) + self.add_transformable_mobject(arrow3) + self.add_transformable_mobject(arrow4) + self.add_transformable_mobject(arrow5) + self.add_transformable_mobject(arrow6) + self.add_transformable_mobject(arrow7) + + self.add_transformable_mobject(rarrow) + self.add_transformable_mobject(rarrow1) + self.add_transformable_mobject(rarrow2) + self.add_transformable_mobject(rarrow3) + self.add_transformable_mobject(rarrow4) + self.add_transformable_mobject(rarrow5) + self.add_transformable_mobject(rarrow6) + self.add_transformable_mobject(rarrow7) + + matrix = [[1,-1],[1,-1]] + self.apply_matrix(matrix) + self.wait(3) + + o1 = TextMobject("Consider a set of vectors which are linear span of a vector") + o2 = TextMobject(r"$\left(\begin{array}{c} 1 \\ -1 \end{array}\right)$ which is orthogonal to column space i.e. Left Null Space") + o1.move_to(2*DOWN) + o2.move_to(2.75*DOWN) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + rarrow = Arrow(start = ORIGIN, end = -UP+RIGHT) + rarrow.set_color(YELLOW) + rarrow1 = Arrow(start = ORIGIN, end = 2*(-UP+RIGHT)) + rarrow1.set_color(YELLOW) + rarrow2 = Arrow(start = ORIGIN, end = 3*(-UP+RIGHT)) + rarrow2.set_color(YELLOW) + rarrow3 = Arrow(start = ORIGIN, end = 4*(-UP+RIGHT)) + rarrow3.set_color(YELLOW) + rarrow4 = Arrow(start = ORIGIN, end = -DOWN+LEFT) + rarrow4.set_color(YELLOW) + rarrow5 = Arrow(start = ORIGIN, end = 2*(-DOWN+LEFT)) + rarrow5.set_color(YELLOW) + rarrow6 = Arrow(start = ORIGIN, end = 3*(-DOWN+LEFT)) + rarrow6.set_color(YELLOW) + rarrow7 = Arrow(start = ORIGIN, end = 4*(-DOWN+LEFT)) + rarrow7.set_color(YELLOW) + + rarrow.scale(1.5) + rarrow1.scale(1.2) + rarrow2.scale(1.15) + rarrow3.scale(1.1) + rarrow4.scale(1.5) + rarrow5.scale(1.2) + rarrow6.scale(1.15) + rarrow7.scale(1.1) + + self.play(ShowCreation(rarrow), + ShowCreation(rarrow1), + ShowCreation(rarrow2), + ShowCreation(rarrow3), + ShowCreation(rarrow4), + ShowCreation(rarrow5), + ShowCreation(rarrow6), + ShowCreation(rarrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) |