summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py7
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py37
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py19
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py5
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py7
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py24
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py19
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py13
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py9
9 files changed, 19 insertions, 121 deletions
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
index 39db6d8..fdb8719 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
@@ -1,13 +1,6 @@
from manimlib.imports import*
import numpy as np
-# def func(t,n):
-# s=0
-# for i in range(1,n+1):
-# s+=((-2/(i*np.pi))*((-1)**i)*np.sin(2*np.pi*i*t))
-# return s
-
-
class intro(GraphScene):
CONFIG = {
"x_min": -3,
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
index 8f3706b..c87e58e 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
@@ -101,27 +101,27 @@ class divideColors(GraphScene):
self.get_graph(lambda x:func(x,6,24),x_min=-1,x_max=1).set_color([DARK_BROWN,RED_C]),
self.get_graph(lambda x:func(x,7,24),x_min=-1,x_max=1).set_color(DARK_BROWN)
]
- #self.y_axis_label="$\\frac { 2 }{ \pi } sin(2\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph1=self.get_graph(lambda x:func(x,1,1),x_min=-1,x_max=1,color=GREEN_E)
- #self.y_axis_label="$\\frac { -1 }{ \pi } sin(4\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph2=self.get_graph(lambda x:func(x,2,2),x_min=-1,x_max=1,color=GREEN_C)
- #self.y_axis_label="$\\frac { 2 }{ 3\pi } sin(6\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph3=self.get_graph(lambda x:func(x,3,3),x_min=-1,x_max=1,color=GOLD_E)
- #self.y_axis_label="$\\frac { -1 }{ 2\pi } sin(8\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph4=self.get_graph(lambda x:func(x,4,4),x_min=-1,x_max=1,color=GOLD_C)
- #self.y_axis_label="$\\frac { 2 }{ 5\pi } sin(10\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph5=self.get_graph(lambda x:func(x,5,5),x_min=-1,x_max=1,color=ORANGE)
- #self.y_axis_label="$\\frac { -1 }{ 3\pi } sin(12\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph6=self.get_graph(lambda x:func(x,6,6),x_min=-1,x_max=1,color=RED_C)
@@ -132,9 +132,7 @@ class divideColors(GraphScene):
self.play(ShowCreation(graphs[0]))
self.play(Write(coeff[0]))
self.wait(1)
- # self.play(ApplyMethod(axes[0].scale,0.4),ApplyMethod(graphs[0].scale,0.4),ApplyMethod(axes[1].scale,0.4),
- # ApplyMethod(axes[2].scale,0.4),ApplyMethod(axes[3].scale,0.4),
- # ApplyMethod(axes[4].scale,0.4),ApplyMethod(axes[5].scale,0.4),ApplyMethod(axes[6].scale,0.4))
+
self.play(ReplacementTransform(graphs[0],graphs[1]),ApplyMethod(groups[0].shift,4*LEFT+UP),ReplacementTransform(coeff[0],coeff[2]),FadeIn(coeff[1]))
self.play(ReplacementTransform(graphs[1],graphs[2]),ApplyMethod(groups[1].shift,4*RIGHT+UP),ReplacementTransform(coeff[2],coeff[4]),FadeIn(coeff[3]))
self.play(ReplacementTransform(graphs[2],graphs[3]),ApplyMethod(groups[2].shift,4*LEFT+2*DOWN),ReplacementTransform(coeff[4],coeff[6]),FadeIn(coeff[5]))
@@ -142,24 +140,7 @@ class divideColors(GraphScene):
self.play(ReplacementTransform(graphs[4],graphs[5]),ApplyMethod(groups[4].shift,2.5*UP),ReplacementTransform(coeff[8],coeff[10]),FadeIn(coeff[9]))
self.play(ReplacementTransform(graphs[5],graphs[6]),ApplyMethod(groups[5].shift,2.5*DOWN),ReplacementTransform(coeff[10],coeff[12]),FadeIn(coeff[11]))
- # self.play(ReplacementTransform(graphs[0],graphs[1]),ApplyMethod(groups[0].shift,3*LEFT))
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
-
-
+
self.wait(2)
- # self.play(ReplacementTransform(function,const))
- # self.play(ShowCreation(sinx),ShowCreation(cosx))
- # self.play(ShowCreation(sin2x),ShowCreation(cos2x))
- # self.play(ShowCreation(sin3x),ShowCreation(cos3x))
- # self.play(ShowCreation(sin4x),ShowCreation(cos4x))
- # sintext=TextMobject("Infinite","sines").shift(5*RIGHT).set_color_by_tex_to_color_map({"Infinite":[YELLOW,RED],"sines":BLUE})
- # costext=TextMobject("Infinite","cosines").shift(5*LEFT).set_color_by_tex_to_color_map({"Infinite":[YELLOW,RED],"cosines":BLUE})
- # sintext.scale(0.6)
- # costext.scale(0.6)
- # self.play(FadeIn(sintext),FadeIn(costext))
- # self.wait(2) \ No newline at end of file
+
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
index 07f884a..d35f8bf 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
@@ -125,22 +125,5 @@ class compare(GraphScene,MovingCameraScene):
self.play(ApplyMethod(left.shift,LEFT*x_each_unit*0.5),ApplyMethod(right.shift,RIGHT*x_each_unit*0.5),ReplacementTransform(result4,result5),ReplacementTransform(coeffResult[2],coeffResult[3]))
- # coeffResult=[
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 1 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } }$").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 4 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 10 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # ]
- # result2a=self.returnPartResult(2,1)
- # result2b=self.returnPartResult(2,4)
- # result2c=self.returnPartResult(2,10)
- # result2d=self.returnPartResult(2,20)
- # self.play(ReplacementTransform(partFunction2,result2a),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2a,result2b),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2b,result2c),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2c,result2d),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.wait(0.5)
-
-
- self.wait(2) \ No newline at end of file
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
index 19b8b8b..8680792 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
@@ -69,10 +69,7 @@ class graphScene(GraphScene):
eqText[i].scale(0.6)
eqText[i].set_color(BLUE)
eqText[i].shift(ORIGIN+UP*2*y_each_unit+RIGHT*3.3*x_each_unit)
- # eqTextTerm=TextMobject("And so on..!")
- # eqTextTerm.set_color(BLUE)
- # eqTextTerm.scale(0.6)
- # eqTextTerm.shift(ORIGIN+UP*2*y_each_unit+3*RIGHT*x_each_unit)
+
equation1 = self.get_graph(lambda x : 1,color = RED,x_min = -8,x_max=8)
equation2 = self.get_graph(lambda x : 1-math.pow(x,2),color = RED,x_min = -1.7,x_max=1.7)
equation3 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4),color = RED,x_min = -1.6,x_max=1.6)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
index f35fea8..af4bdea 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
@@ -105,9 +105,4 @@ class graphScene(GraphScene,MovingCameraScene):
self.wait(1)
self.play(self.camera_frame.set_width,14)
self.wait(1.3)
- # self.camera_frame.save_state()
- # self.camera_frame.set_width(5.5)
- # self.play(self.camera_frame.move_to, ORIGIN)
- # self.wait(1)
- # self.camera_frame.set_width(14)
- # self.wait(1.5)
+
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
index 1f3e26c..b75da59 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
@@ -3,19 +3,15 @@ import math
class uniformlyConvergent(Scene):
def construct(self):
- #introText1=TextMobject("Again consider the","above","example")
introText2=TextMobject("Let","$g(x)=\\frac { 1 }{ 1+{ x }^{ 2 } }$","and","x=0.5 $\in$(-1,1)")
introText3=TextMobject("Lets analyse..","!")
- #introText1.scale(0.8)
+
introText2.scale(0.7)
introText3.scale(0.9)
introText3.shift(DOWN)
- #introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+
introText2.set_color_by_tex_to_color_map({"$g(x)=\\frac { 1 }{ 1+{ x }^{ 2 } }$":BLUE,"x=0.5 $\in$(-1,1)":YELLOW})
introText3.set_color_by_tex_to_color_map({"!":GREEN})
- #self.play(Write(introText1))
- #self.wait(0.5)
- #self.play(FadeOut(introText1))
self.play(Write(introText2))
self.play(FadeIn(introText3))
self.wait(2)
@@ -65,7 +61,7 @@ class graphScene(GraphScene,ZoomedScene):
def setup(self):
GraphScene.setup(self)
- #MovingCameraScene.setup(self)
+
ZoomedScene.setup(self)
@@ -110,19 +106,7 @@ class graphScene(GraphScene,ZoomedScene):
self.activate_zooming(animate=True)
for p in range(0,5):
self.play(Write(lines[p]))
- # self.wait(0.5)
- # self.camera_frame.save_state()
- # self.camera_frame.set_width(0.6)
- # self.play(self.camera_frame.move_to, points[0])
- # self.wait(0.4)
- # self.play(self.camera_frame.move_to, points[1])
- # self.wait(0.4)
- # self.play(self.camera_frame.move_to, points[2])
- # self.wait(0.3)
- # self.play(self.camera_frame.move_to, points[3])
- # self.wait(1)
- # self.play(self.camera_frame.move_to,ORIGIN)
- # self.camera_frame.set_width(14)
+
self.wait(1)
self.get_zoomed_display_pop_out_animation()
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
index b132811..a0c7176 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
@@ -95,7 +95,6 @@ class graphScene(GraphScene,MovingCameraScene):
obj.set_color(GOLD_A)
group=VGroup(coeff[0],coeff[1],coeff[2])
- #group.shift(2*LEFT+2*DOWN)
firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
secondApprox=[self.get_graph(lambda x:1,color=BLUE),
@@ -142,13 +141,6 @@ class graphScene(GraphScene,MovingCameraScene):
bottomText8.scale(0.5)
bottomText1.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText2.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText3.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText4.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText5.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText6.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText7.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText8.shift(4.5*RIGHT+2.5*DOWN)
bottomText2.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText3.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText4.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
@@ -230,16 +222,7 @@ class graphScene(GraphScene,MovingCameraScene):
self.play(FadeOut(self.axes),FadeOut(textFinal),FadeOut(secondGraph),FadeOut(trTextGrup),FadeOut(mainfunction),FadeOut(fx),FadeOut(coeff[0]),FadeOut(coeff[1]),FadeOut(coeff[2]))
self.play(Write(finalFormula))
self.wait(2)
- # self.play(ReplacementTransform(secondApprox[2],secondApprox[3]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[3],secondApprox[4]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[4],secondApprox[5]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[0],secondApprox[0]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[0],secondApprox[0]))
- # self.wait(0.5)
+
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
index 75f200d..5be336b 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
@@ -150,13 +150,6 @@ class graphScene(GraphScene,MovingCameraScene):
bottomText8.scale(0.5)
bottomText1.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText2.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText3.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText4.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText5.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText6.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText7.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText8.shift(4.5*RIGHT+2.5*DOWN)
bottomText2.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText3.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText4.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
@@ -195,8 +188,6 @@ class graphScene(GraphScene,MovingCameraScene):
self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
self.wait(0.5)
self.play(ReplacementTransform(secondApprox[1],secondApprox[2]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[2],secondApprox[0]))
self.wait(1)
self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
self.wait(1)
@@ -208,8 +199,6 @@ class graphScene(GraphScene,MovingCameraScene):
self.play(ReplacementTransform(secondGraph,thirdApprox[0]))
self.wait(0.6)
self.play(ReplacementTransform(thirdApprox[0],thirdApprox[1]))
- # self.wait(0.6)
- # self.play(ReplacementTransform(thirdApprox[1],thirdApprox[2]))
self.wait(0.6)
self.play(ReplacementTransform(thirdApprox[1],thirdApprox[3]))
self.wait(0.6)
@@ -236,4 +225,4 @@ class graphScene(GraphScene,MovingCameraScene):
self.play(FadeOut(self.axes),FadeOut(textFinal),FadeOut(thirdGraph),FadeOut(trTextGrup),FadeOut(mainfunction),FadeOut(fx),FadeOut(coeff[0]),FadeOut(coeff[1]),FadeOut(coeff[2]))
self.play(Write(finalFormula))
- self.wait(2) \ No newline at end of file
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
index 1f41c97..6b368da 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
@@ -43,7 +43,6 @@ class graphScene(GraphScene):
bottomText1=TextMobject("$R_{n}(x)=\\frac { d }{ dx } ($","area bounded","$)$")
bottomText1.set_color_by_tex_to_color_map({"area bounded":ORANGE})
- #bottomText2.set_color_by_tex_to_color_map({"area bounded":BLUE})
arrow=TextMobject("$\downarrow$")
arrow.scale(2.5)
arrow.shift(ORIGIN+x_each_unit*RIGHT*9.5+UP*y_each_unit)
@@ -56,12 +55,8 @@ class graphScene(GraphScene):
increasingText.scale(0.4)
bottomText1.scale(0.5)
- #bottomText2.scale(0.5)
- #bottomText3.scale(0.5)
bottomText1.shift(3.5*LEFT+2*DOWN)
- #bottomText2.shift(3.5*LEFT+2.4*DOWN)
- #bottomText3.shift(3.5*LEFT+2.8*DOWN)
dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
dline.shift(ORIGIN+x_each_unit*4*RIGHT)
@@ -72,11 +67,9 @@ class graphScene(GraphScene):
self.play(Write(dline))
self.wait(0.5)
self.play(ShowCreation(area1),ShowCreation(area2),Write(bottomText1))
- # self.play(Write(bottomText2))
- # self.play(FadeIn(bottomText3))
self.play(Write(arrow))
self.wait(0.7)
self.play(Write(increasingText))
self.play(FadeIn(followupText))
self.wait(2)
- \ No newline at end of file
+