From 19916e39ad44abf72c9e73f8df1984e11612d3bf Mon Sep 17 00:00:00 2001 From: G Sri Harsha Date: Wed, 8 Jul 2020 13:01:30 +0530 Subject: updated --- .../Fourier Transform/video4_FourierSeriesOfSquarePulse.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py') 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) -- cgit