summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
diff options
context:
space:
mode:
authorG Sri Harsha2020-07-08 13:01:30 +0530
committerGitHub2020-07-08 13:01:30 +0530
commit19916e39ad44abf72c9e73f8df1984e11612d3bf (patch)
treee51e46f8da3ec04b5d241b27c948920873bd5b3c /FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
parent0191f641b3463cd6f5471321708fa5c8c50550b2 (diff)
downloadFSF-mathematics-python-code-archive-19916e39ad44abf72c9e73f8df1984e11612d3bf.tar.gz
FSF-mathematics-python-code-archive-19916e39ad44abf72c9e73f8df1984e11612d3bf.tar.bz2
FSF-mathematics-python-code-archive-19916e39ad44abf72c9e73f8df1984e11612d3bf.zip
updated
Diffstat (limited to 'FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py')
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
index 5d33fbe..fdf4bb3 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
@@ -33,9 +33,9 @@ class fourierSeries(GraphScene,MovingCameraScene):
x_each_unit = self.x_axis_width / (self.x_max - self.x_min)
y_each_unit = self.y_axis_height / (self.y_max - self.y_min)
- equation=TextMobject("$f(x)=\\frac { 4 }{ \pi } \sum _{ k=1,3,5.. }^{ \infty }{ \\frac { 1 }{ k } \sin { 2\pi kx } }$").shift(5*RIGHT+3*UP).set_color(RED).scale(0.4)
+ equation=TextMobject("$f(x)=\\frac { 4 }{ \pi } \sum _{ k=1,3,5.. }^{ \infty }{ \\frac { 1 }{ k } \sin { 2\pi kx } }$").shift(5*RIGHT+3*UP).set_color(RED).scale(0.5)
self.add(equation)
- self.setup_axes(animate=True)
+ self.setup_axes(animate=True,scalee=1)
line1=Line(start=(-x_each_unit,y_each_unit,0),end=(-(1/2)*x_each_unit,y_each_unit,0),color=RED)
line2=Line(start=(-(1/2)*x_each_unit,y_each_unit,0),end=(-(1/2)*x_each_unit,-y_each_unit,0),color=RED)
line3=Line(start=(-(1/2)*x_each_unit,-y_each_unit,0),end=(0,-y_each_unit,0),color=RED)
@@ -87,6 +87,11 @@ class fourierSeries(GraphScene,MovingCameraScene):
self.wait(1)
self.camera_frame.save_state()
self.play(self.camera_frame.set_width, 2.25,self.camera_frame.move_to, y_each_unit*UP+RIGHT*x_each_unit*0.3)
- self.wait(1)
- self.play(self.camera_frame.set_width,14,self.camera_frame.move_to,0)
+ circleMark=Circle(radius=0.1,color=GREEN).shift(x_each_unit*RIGHT*0.47+UP*y_each_unit*1.1)
+ text=TextMobject("Gibbs","phenomenon").set_color_by_tex_to_color_map({"Gibbs":BLUE,"phenomenon":YELLOW}).scale(0.1).shift(RIGHT*x_each_unit*0.65+UP*y_each_unit*1.1)
+ self.wait(0.7)
+ self.play(ShowCreation(circleMark))
+ self.play(Write(text))
+ self.wait(0.5)
+ self.play(self.camera_frame.set_width,14,self.camera_frame.move_to,0,FadeOut(circleMark),FadeOut(text))
self.wait(2)