summaryrefslogtreecommitdiff
path: root/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)')
-rwxr-xr-xFSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py70
1 files changed, 38 insertions, 32 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py
index e0476a3..96e456d 100755
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py
@@ -27,37 +27,37 @@ class Linear(GraphScene):
self.wait()
before = TextMobject("Before Linear Transformation")
- before.set_color(DARK_BLUE)
+ before.set_color(ORANGE)
before.move_to(3*UP+4*RIGHT)
before.scale(0.75)
dot1 = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
dot2 = Dot().shift(self.graph_origin+2*XTD*RIGHT+1*YTD*UP)
- dot1.set_color(DARK_BLUE)
- dot2.set_color(DARK_BLUE)
+ dot1.set_color(ORANGE)
+ dot2.set_color(ORANGE)
p1 = TextMobject(r"$P_1$")
p1.scale(0.75)
- p1.set_color(DARK_BLUE)
+ p1.set_color(ORANGE)
p1.move_to(self.graph_origin+1*XTD*RIGHT+1.5*YTD*UP)
p2 = TextMobject(r"$P_2$")
- p2.set_color(DARK_BLUE)
+ p2.set_color(ORANGE)
p2.scale(0.75)
p2.move_to(self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP)
after = TextMobject("After applying Linear Transformation")
- after.set_color(RED)
+ after.set_color(YELLOW)
after.move_to(3*UP+4.5*RIGHT)
after.scale(0.5)
dot3 = Dot().shift(self.graph_origin+3*XTD*RIGHT+0*YTD*UP)
dot4 = Dot().shift(self.graph_origin+4*XTD*RIGHT+1*YTD*UP)
- dot3.set_color(RED)
- dot4.set_color(RED)
+ dot3.set_color(YELLOW)
+ dot4.set_color(YELLOW)
p3 = TextMobject(r"$T(P_1)$")
p3.scale(0.7)
- p3.set_color(RED)
+ p3.set_color(YELLOW)
p3.move_to(self.graph_origin+3*XTD*RIGHT-1.1*YTD*UP)
p4 = TextMobject(r"$T(P_2)$")
p4.scale(0.7)
- p4.set_color(RED)
+ p4.set_color(YELLOW)
p4.move_to(self.graph_origin+4*XTD*RIGHT+1.5*YTD*UP)
self.play(Write(before), ShowCreation(dot1), ShowCreation(dot2),Write(p1), Write(p2))
@@ -76,52 +76,54 @@ class withgrid(LinearTransformationScene):
self.wait()
before = TextMobject("Before Linear Transformation")
- before.set_color(DARK_BLUE)
+ before.set_color(ORANGE)
before.move_to(3.5*UP+4*RIGHT)
before.scale(0.75)
dot1 = Dot().shift(1*RIGHT+1*UP)
dot2 = Dot().shift(2*RIGHT+1*UP)
- dot1.set_color(DARK_BLUE)
- dot2.set_color(DARK_BLUE)
+ dot1.set_color(ORANGE)
+ dot2.set_color(ORANGE)
dot1_c = Dot(radius = 0.05).shift(1*RIGHT+1*UP)
dot2_c = Dot(radius = 0.05).shift(2*RIGHT+1*UP)
- dot1_c.set_color(RED)
- dot2_c.set_color(RED)
+ dot1_c.set_color(YELLOW)
+ dot2_c.set_color(YELLOW)
self.add_transformable_mobject(dot1_c)
self.add_transformable_mobject(dot2_c)
p1 = TextMobject(r"$P_1$")
p1.scale(0.75)
- p1.set_color(DARK_BLUE)
+ p1.set_color(ORANGE)
p1.move_to(1*RIGHT+1.5*UP)
p2 = TextMobject(r"$P_2$")
p2.scale(0.75)
- p2.set_color(DARK_BLUE)
+ p2.set_color(ORANGE)
p2.move_to(2*RIGHT+1.5*UP)
after = TextMobject("After applying Linear Transformation")
- after.set_color(RED)
+ after.set_color(YELLOW)
after.move_to(3.5*UP+3.5*RIGHT)
after.scale(0.75)
dot3 = Dot().shift(3*RIGHT+0*UP)
dot4 = Dot().shift(4*RIGHT+1*UP)
- dot3.set_color(RED)
- dot4.set_color(RED)
+ dot3.set_color(YELLOW)
+ dot4.set_color(YELLOW)
p3 = TextMobject(r"$T(P_1)$")
p3.scale(0.75)
- p3.set_color(RED)
+ p3.set_color(YELLOW)
p3.move_to(3*RIGHT-0.6*UP)
p4 = TextMobject(r"$T(P_2)$")
p4.scale(0.75)
- p4.set_color(RED)
+ p4.set_color(YELLOW)
p4.move_to(4*RIGHT+1.5*UP)
self.play(Write(before), ShowCreation(dot1), ShowCreation(dot2),Write(p1), Write(p2))
self.wait(3)
matrix = [[1,2],[1,-1]]
+ dot1.set_color(GREY)
+ dot2.set_color(GREY)
+ self.play(FadeIn(dot1),FadeIn(dot2))
self.apply_matrix(matrix)
- self.play(FadeOut(dot1),FadeOut(dot2))
self.play(Transform(before,after), Transform(p2,p4), Transform(p1,p3))
self.play(Transform(before,after))
self.wait(3)
@@ -145,7 +147,7 @@ class ThreeDExplanation(ThreeDScene):
before = TextMobject("Before Linear Transformation")
self.add_fixed_in_frame_mobjects(before)
- before.set_color(YELLOW)
+ before.set_color(ORANGE)
before.move_to(3.5*UP+4*RIGHT)
before.scale(0.75)
@@ -158,9 +160,9 @@ class ThreeDExplanation(ThreeDScene):
dot1 = Dot().shift(1*RIGHT+1*UP)
dot2 = Dot().shift(2*RIGHT+1*UP)
dot3 = Dot().shift(1*RIGHT+1*DOWN)
- dot1.set_color(YELLOW)
- dot2.set_color(YELLOW)
- dot3.set_color(YELLOW)
+ dot1.set_color(ORANGE)
+ dot2.set_color(ORANGE)
+ dot3.set_color(ORANGE)
self.play(ShowCreation(before))
p1.move_to(1*RIGHT+1*UP+[0,0,0.5])
@@ -170,9 +172,9 @@ class ThreeDExplanation(ThreeDScene):
dot1_c = Dot(radius = 0.05).shift(1*RIGHT+1*UP)
dot2_c = Dot(radius = 0.05).shift(0*RIGHT+2*UP)
dot3_c = Dot(radius = 0.05).shift(1*RIGHT-1*UP)
- dot1_c.set_color(RED)
- dot2_c.set_color(RED)
- dot3_c.set_color(RED)
+ dot1_c.set_color(YELLOW)
+ dot2_c.set_color(YELLOW)
+ dot3_c.set_color(YELLOW)
axes = ThreeDAxes(x_min = -7,x_max=7,y_min=-4,y_max=4,z_min=-4,z_max=4)
self.play(ShowCreation(axes))
@@ -191,7 +193,7 @@ class ThreeDExplanation(ThreeDScene):
self.play(FadeOut(before))
after = TextMobject("After applying Linear Transformation")
self.add_fixed_in_frame_mobjects(after)
- after.set_color(RED)
+ after.set_color(YELLOW)
after.move_to(3.5*UP+3.5*RIGHT)
after.scale(0.75)
@@ -223,4 +225,8 @@ class ThreeDExplanation(ThreeDScene):
self.add_fixed_in_frame_mobjects(ending)
self.play(FadeOut(plane))
- self.wait(9)
+ self.wait(3)
+
+ self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait(5)
+ self.stop_ambient_camera_rotation()