From 147be193e665211eeef5170119084a93d122feec Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 08:52:12 +0530 Subject: Create file1_flux@_various_points.py --- .../file1_flux@_various_points.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py new file mode 100644 index 0000000..85567bb --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py @@ -0,0 +1,43 @@ +from manimlib.imports import * +def pendulum_vector_field_func(point): + #theta, omega = point[:2] + return np.array([ + 5*point[2]+point[1], + 3*point[0]+3*point[1], + 0, + ]) +class SimpleField(Scene): + CONFIG = { + #"func": cylinder_flow_vector_field, + "flow_time": 5, + } + def initialize_vector_field(self): + self.vector_field = VectorField( + pendulum_vector_field_func, + ) + self.vector_field.sort(get_norm) + def construct(self): + # plane = NumberPlane(color=RED) + # plane.add(plane.get_axis_labels()) + # self.add(plane) + # self.initialize_vector_field() + + c1=Circle(radius=3,color=RED) + field = self.vector_field + self.play(c1) + self.play(ShowCreation(field), run_time=10) + self.wait(3) + lines = StreamLines( + pendulum_vector_field_func, + virtual_time=3, + min_magnitude=0, + max_magnitude=2, + ) + self.add(AnimatedStreamLines( + lines, + line_anim_class=ShowPassingFlash + )) + self.wait(2) + phase_point = VectorizedPoint(1*UP+1*RIGHT) + self.add(move_along_vector_field(phase_point, pendulum_vector_field_func)) + self.wait(2) -- cgit From a78063c421876d66fd1c1750a5a5e87cdd5274ca Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 08:55:35 +0530 Subject: Update file1_flux@_various_points.py --- .../file1_flux@_various_points.py | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py index 85567bb..6727982 100644 --- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py @@ -2,11 +2,11 @@ from manimlib.imports import * def pendulum_vector_field_func(point): #theta, omega = point[:2] return np.array([ - 5*point[2]+point[1], - 3*point[0]+3*point[1], + 5*point[0]+point[1], + 3*point[1]+3*point[1], 0, ]) -class SimpleField(Scene): +class SF(Scene): CONFIG = { #"func": cylinder_flow_vector_field, "flow_time": 5, @@ -20,13 +20,30 @@ class SimpleField(Scene): # plane = NumberPlane(color=RED) # plane.add(plane.get_axis_labels()) # self.add(plane) - # self.initialize_vector_field() - c1=Circle(radius=3,color=RED) + A=TextMobject("The net flux through the green circular region is zero",tex_to_color_map={"green": GREEN}) + B=TextMobject("The net flux through the blue circular region is non-zero",tex_to_color_map={"blue": BLUE}) + + c1=Circle(color=GREEN, radius=1.5) + c1.shift(4*LEFT+2.2*UP) + c2=Circle(color=BLUE, radius=1.5) + + + + + self.play(ShowCreation(A)) + self.wait(0.5) + self.play(ApplyMethod(A.shift, (0.8*UP+0.2*LEFT))) + self.play(ShowCreation(B)) + # self.play(ApplyMethod(B.shift, (2*UP))) + self.wait(2) + self.play(FadeOut(A),FadeOut(B)) + self.initialize_vector_field() field = self.vector_field - self.play(c1) - self.play(ShowCreation(field), run_time=10) - self.wait(3) + self.play(ShowCreation(field), run_time=4) + self.play(ShowCreation(c1)) + self.play(ShowCreation(c2)) + self.wait(1) lines = StreamLines( pendulum_vector_field_func, virtual_time=3, -- cgit From 52bda3b678e7c9ab56e3e141f4d80a6cb32156a2 Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 08:57:30 +0530 Subject: Add files via upload --- .../file1_flux@_various_points.gif | Bin 0 -> 4439959 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif new file mode 100644 index 0000000..6c32b94 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif differ -- cgit From f491a97683c327d4b8d515ef5af235f13e4fab14 Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 08:59:12 +0530 Subject: Create file2_different_valuesof_Div.py --- .../file2_different_valuesof_Div.py | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py new file mode 100644 index 0000000..921047d --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py @@ -0,0 +1,91 @@ +from manimlib.imports import * +class Div(Scene): + def construct(self): + one=TextMobject(r"Div$ \vec{F} < 0$ ").set_color(RED) + two=TextMobject(r"Div$ \vec{F} = 0$ ").set_color(BLUE) + three=TextMobject(r"Div$ \vec{F} > 0$ ").set_color(YELLOW) + + one.shift(2.3*DOWN) + two.shift(2.3*DOWN) + three.shift(2.3*DOWN) + + + a=Dot(color=RED) + a.shift(0.1*LEFT) + b=Dot(color=BLUE) + b.shift(0.1*LEFT) + c=Dot(color=YELLOW) + c.shift(0.1*LEFT) + + rot=[0*DEGREES,45*DEGREES,90*DEGREES,135*DEGREES,180*DEGREES,225*DEGREES,270*DEGREES,315*DEGREES] + rot2=[180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES] + shift=[RIGHT,0.7*RIGHT+0.7*UP,UP,0.7*LEFT+0.7*UP,LEFT,0.7*LEFT+0.7*DOWN,DOWN,0.7*RIGHT+0.7*DOWN] + shift2=[RIGHT,RIGHT+UP,RIGHT+DOWN,UP,DOWN,LEFT,LEFT+UP,LEFT+DOWN] + + + + u=[Vector(color=RED),Vector(color=RED),Vector(color=RED),Vector(color=RED), + Vector(color=RED),Vector(color=RED),Vector(color=RED),Vector(color=RED)] + + + [u[i].rotate(rot[i]) for i in range(8) ] + [u[i].rotate(rot2[i]) for i in range(8) ] + [u[i].shift(shift[i]) for i in range(8) ] + + + divone=VGroup(*u) + divone.shift(0.6*LEFT) + + + v=[Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE), + Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE)] + + + [v[i].rotate(45*DEGREES) for i in range(8)] + [v[i].shift(shift2[i]) for i in range(8) ] + + divtwo=VGroup(*v) + divtwo.shift(0.6*LEFT) + + + w=[Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW), + Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW)] + + + [w[i].rotate(rot[i]) for i in range(8)] + [w[i].shift(shift[i]) for i in range(8) ] + + + divthree=VGroup(*w) + divthree.shift(0.6*LEFT) + + + + + self.play(ShowCreation(a),ShowCreation(divone)) + self.play(ShowCreation(one)) + self.wait(1) + self.play(FadeOut(a),FadeOut(divone),FadeOut(one)) + + self.play(ShowCreation(b),ShowCreation(divtwo)) + self.play(ShowCreation(two)) + self.wait(1) + self.play(FadeOut(b),FadeOut(divtwo),FadeOut(two)) + + + self.play(ShowCreation(c),ShowCreation(divthree)) + self.play(ShowCreation(three)) + self.wait(1) + self.play(FadeOut(c),FadeOut(divthree),FadeOut(three)) + self.wait(0.5) + + + + + + + + + + + -- cgit From 5492814bf7ce6b0f5f5a93581ce445e219075203 Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 09:00:06 +0530 Subject: Add files via upload --- .../file2_different_valuesof_Div.gif | Bin 0 -> 595705 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif new file mode 100644 index 0000000..477c311 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif differ -- cgit From ca86e164677dea499a972538c0d9aad8c0577588 Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 09:02:57 +0530 Subject: Update README.md --- .../triple-and-surface-integrals/divergence-gauss-theorem/README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md index e69de29..17fcde0 100644 --- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md @@ -0,0 +1,4 @@ +**file1_flux@_various_points.py** +![file1_flux@_various_points](file1_flux@_various_points.gif) +**file2_different_valuesof_Div.py** +![file2_different_valuesof_Div](file2_different_valuesof_Div.gif) -- cgit