fasdfsa commited on
Commit
0e27fa9
·
1 Parent(s): 906a291

ScalingNumerically

Browse files
Files changed (2) hide show
  1. manim.py +3 -1
  2. old_projects/eola/chapter1.py +6 -6
manim.py CHANGED
@@ -44,7 +44,9 @@ if __name__ == "__main__":
44
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'AddingNumbersOnNumberLine', '-pl'])
45
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'VectorAdditionNumerically', '-pl'])
46
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'MultiplicationByANumberIntro', '-pl'])
47
- sys.argv.extend(['old_projects/eola/chapter1.py', 'ShowScalarMultiplication', '-pl'])
 
 
48
 
49
 
50
  manimlib.main()
 
44
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'AddingNumbersOnNumberLine', '-pl'])
45
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'VectorAdditionNumerically', '-pl'])
46
  # sys.argv.extend(['old_projects/eola/chapter1.py', 'MultiplicationByANumberIntro', '-pl'])
47
+ # sys.argv.extend(['old_projects/eola/chapter1.py', 'ShowScalarMultiplication', '-pl'])
48
+ sys.argv.extend(['old_projects/eola/chapter1.py', 'ScalingNumerically', '-pl'])
49
+
50
 
51
 
52
  manimlib.main()
old_projects/eola/chapter1.py CHANGED
@@ -1044,25 +1044,25 @@ class ScalingNumerically(VectorScene):
1044
  two_v_elems = two_v_coords.get_mob_matrix().flatten()
1045
  x_sym, y_sym = list(map(TexMobject, ["x", "y"]))
1046
  two_x_sym, two_y_sym = list(map(TexMobject, ["2x", "2y"]))
1047
- VMobject(x_sym, two_x_sym).set_color(X_COLOR)
1048
- VMobject(y_sym, two_y_sym).set_color(Y_COLOR)
1049
  syms = [x_sym, y_sym, two_x_sym, two_y_sym]
1050
- VMobject(*syms).scale(VECTOR_LABEL_SCALE_FACTOR)
1051
  for sym, num in zip(syms, [x, y] + list(two_v_elems)):
1052
  sym.move_to(num)
1053
  self.play(
1054
  Transform(x, x_sym),
1055
  Transform(y, y_sym),
1056
- FadeOut(VMobject(*two_v_elems))
1057
  )
1058
  self.wait()
1059
  self.play(
1060
  Transform(
1061
- VMobject(two_dot.copy(), x.copy()),
1062
  two_x_sym
1063
  ),
1064
  Transform(
1065
- VMobject(two_dot.copy(), y.copy() ),
1066
  two_y_sym
1067
  )
1068
  )
 
1044
  two_v_elems = two_v_coords.get_mob_matrix().flatten()
1045
  x_sym, y_sym = list(map(TexMobject, ["x", "y"]))
1046
  two_x_sym, two_y_sym = list(map(TexMobject, ["2x", "2y"]))
1047
+ VGroup(x_sym, two_x_sym).set_color(X_COLOR)
1048
+ VGroup(y_sym, two_y_sym).set_color(Y_COLOR)
1049
  syms = [x_sym, y_sym, two_x_sym, two_y_sym]
1050
+ VGroup(*syms).scale(VECTOR_LABEL_SCALE_FACTOR)
1051
  for sym, num in zip(syms, [x, y] + list(two_v_elems)):
1052
  sym.move_to(num)
1053
  self.play(
1054
  Transform(x, x_sym),
1055
  Transform(y, y_sym),
1056
+ FadeOut(VGroup(*two_v_elems))
1057
  )
1058
  self.wait()
1059
  self.play(
1060
  Transform(
1061
+ VGroup(two_dot.copy(), x.copy()),
1062
  two_x_sym
1063
  ),
1064
  Transform(
1065
+ VGroup(two_dot.copy(), y.copy() ),
1066
  two_y_sym
1067
  )
1068
  )