diff options
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals')
27 files changed, 1051 insertions, 0 deletions
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 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md new file mode 100644 index 0000000..0af7aa1 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md @@ -0,0 +1,8 @@ +**file1_flux_through_sphere.py** +![file1_flux_through_sphere](file1_flux_through_sphere.gif) +**file2_mobius_strip.py** +![file2_mobius_strip](file2_mobius_strip.gif) +**file3_normal_vector.py** +![file3_normal_vector](file3_normal_vector.gif) +**file4_cube_surface.py** +![file4_cube_surface](file4_cube_surface.gif) diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif Binary files differnew file mode 100644 index 0000000..43327bf --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py new file mode 100644 index 0000000..e07715e --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py @@ -0,0 +1,50 @@ +from manimlib.imports import * +class fluxsphere(ThreeDScene): + + + def construct(self): + s = Sphere(checkerboard_colors=[BLUE_D,BLUE_D]) + s.scale(2.3) + + n = VGroup( + *[self.n(*self.func(u, v)) + for u in np.arange(0, PI, 0.4) + for v in np.arange(0, TAU, 0.8)] + ) + + + + self.move_camera(0.8 * PI / 2, -0.45 * PI) + self.play(Write(s)) + # self.play(Write(f)) + self.play(ShowCreation(n), run_time=4) + # self.add(n) + self.begin_ambient_camera_rotation(rate=0.1) + self.wait(5) + + + def func(self, u, v): + return [ + np.cos(v) * np.sin(u), + np.sin(v) * np.sin(u), + np.cos(u) + ] + + def vect(self, x, y, z): + return np.array([ + x, y, z + ]) + + def n(self, x, y, z): + vect = np.array([ + x, + y, + z + ]) + + mag = math.sqrt(vect[0] ** 2 + vect[1] ** 2 + vect[2] ** 2) + v = Vector( + (1.5/mag) * vect, + color=RED_B, + stroke_width=4).shift(2*x * RIGHT + 2*y * UP + 2*z * OUT) + return v diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif Binary files differnew file mode 100644 index 0000000..9623046 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py new file mode 100644 index 0000000..31b1990 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py @@ -0,0 +1,81 @@ +from manimlib.imports import * + +class Mobius(ThreeDScene): + def construct(self): + axes=ThreeDAxes() + + + + R=2.5 + + + mobius = ParametricSurface( + lambda u, v: np.array([ + (R+u*np.cos(v/2))*np.cos(v), + (R+u*np.cos(v/2))*np.sin( v), + u*np.sin(v/2) + ]), + u_min = -0.5, u_max = 0.5, v_min = 0, v_max = 2*PI, + + resolution=(6, 32)).fade(0.5) #Resolution of the surfaces + circle=Circle(radius=2.5, color=BLUE) + + + + mobius.rotate(PI/2, axis=RIGHT) + mobius.rotate(PI/2, axis=OUT) + # # mobius.shift(RIGHT+OUT+DOWN) + + + + + + along = ParametricSurface( + lambda u, v: np.array([ + (R+u*np.cos(v/2))*np.cos(v), + (R+u*np.cos(v/2))*np.sin(v), + 0 + ]), + u_min = -0.5, u_max = 0.5, v_min = 0, v_max = 2*PI, + + resolution=(6, 32)).fade(0.5) #Resolution of the surfaces + circle=Circle(radius=2.5, color=BLUE) + + + + + + + + + + + + + + + + + + + + + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-75*DEGREES) + + self.play(Write(mobius)) + + self.wait(1) + self.begin_ambient_camera_rotation(rate=0.65) + + self.wait(10) + self.stop_ambient_camera_rotation() + self.wait(1) + + + + + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif Binary files differnew file mode 100644 index 0000000..a8f2990 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py new file mode 100644 index 0000000..a959210 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py @@ -0,0 +1,47 @@ +from manimlib.imports import * +class S(ThreeDScene): + def construct(self): + axes=ThreeDAxes() + + sphere=Sphere(radius=2,checkerboard_colors=[BLUE_C,BLUE_B],fill_opacity=0.75) + + + v1=Vector(color=YELLOW,buff=5) + v1.rotate(PI/4,axis=DOWN) + v1.shift(1.5*RIGHT+1.5*OUT) + + v2=Vector(color=RED,buff=5) + v2.rotate(PI/4,axis=DOWN) + v2.rotate(PI,axis=DOWN) + v2.shift(0.77*RIGHT+0.77*OUT) + + + + + n1=TextMobject(r"$\vec{n}$",color=YELLOW) + n2=TextMobject(r"$-\vec{n}$",color= RED) + n1.rotate(PI/2,axis=RIGHT) + n1.shift(2*RIGHT+2*OUT) + n2.rotate(PI/2,axis=RIGHT) + n2.shift(0.42*RIGHT+0.42*OUT) + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-45*DEGREES) + # self.add(mobius) + # self.play(ShowCreation(axes)) + self.play(ShowCreation(axes)) + # self.play(ShowCreation(vg)) + self.play(ShowCreation(sphere)) + self.wait(0.7) + self.play(ShowCreation(v1, run_time=2)) + self.play(ShowCreation(n1)) + self.wait(1) + self.begin_ambient_camera_rotation(rate=0.65) + self.wait(2) + self.play(ShowCreation(v2, run_time=3)) + self.wait(3) + self.play(ShowCreation(n2)) + + self.stop_ambient_camera_rotation() + self.wait(1.2) diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif Binary files differnew file mode 100644 index 0000000..c6101cf --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py new file mode 100644 index 0000000..5963996 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py @@ -0,0 +1,71 @@ +from manimlib.imports import* + + + +class cuber(ThreeDScene): + def construct(self): + + axes=ThreeDAxes() + cube=Cube() + # cube.scale(1) + cube.shift(RIGHT+DOWN+OUT) + + + + sq3=Square(color=RED, fill_opacity=0.85) + sq3.rotate(PI/2, axis=UP) + sq3.shift(DOWN+OUT+2*RIGHT) + + x=TextMobject("x") + y=TextMobject("y") + z=TextMobject("z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + v1=Vector(color=YELLOW,buff=15) + v1.rotate(PI/4,axis=RIGHT) + v1.shift(2*RIGHT+1*DOWN+1*OUT) + + + n1=TextMobject(r"$\vec{n}$",color=YELLOW) + n1.scale(0.8) + n1.rotate(PI/2,axis=RIGHT) + n1.shift(3*RIGHT+1.3*OUT+DOWN) + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-15*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.play(ShowCreation(cube, run_time=3)) + self.begin_ambient_camera_rotation(rate=-0.2) + # self.move_camera(phi=150*DEGREES,theta=-45*DEGREES, run_time=3) + self.wait(1) + self.play(ShowCreation(sq3)) + + self.wait(1) + self.play(ShowCreation(v1),ShowCreation(n1)) + self.wait(1) + self.stop_ambient_camera_rotation() + self.wait(2) + + + # self.play(Write(t1)) + # self.play(Transform(vg,t1)) + # self.wait(3) + # self.play(ReplacementTransform(t1,t2)) + # self.wait(3) + # # self.move_camera(phi=50*DEGREES,theta=-45*DEGREES,run_time=3) + # self.wait(8) + # self.move_camera(phi=75 * DEGREES, run_time=3) + # self.wait(3) diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md new file mode 100644 index 0000000..a4a1c84 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md @@ -0,0 +1,8 @@ +**file1_projection.py** +![file1_projection](projection.gif) +**file2_cube.py** +![file2_cube](cube.gif) +**file3_cube_sideC.py** +![file3_cube_sideC](sideC.gif) +**file4_pauseandponder.py** +![file4_pauseandponder](pauseandponder.gif) diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif Binary files differnew file mode 100644 index 0000000..2035d7a --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py new file mode 100644 index 0000000..2d6f067 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py @@ -0,0 +1,89 @@ +from manimlib.imports import * + +class Surface(ThreeDScene): + + def construct(self): + axes=ThreeDAxes() + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + + + para_hyp = ParametricSurface( + lambda u, v: np.array([ + u, + v, + 2+u/4+np.sin(v) + ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1, + resolution=(15, 32)).scale(1) + para_hyp.scale(0.3) + para_hyp.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN) + para_hyp.rotate(PI,axis=RIGHT) + para_hyp.scale(2.5) + # para_hyp.rotate(PI/3.2,axis=OUT) + para_hyp2= ParametricSurface( + lambda u, v: np.array([ + u, + v, + 2+u/4+np.sin(v) + ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1, + resolution=(15, 32)).scale(1) + para_hyp2.scale(0.3) + para_hyp2.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN) + para_hyp2.rotate(PI,axis=RIGHT) + para_hyp2.scale(2.5) + + rec=Rectangle(height=2.11, width=1.58, color=RED, fill_opacity=0.66) + rec.shift(1.3*RIGHT + 2.295*DOWN) + # rec.scale(2.5) + + + l1=DashedLine(start=0.5*RIGHT+1.1*DOWN+1.55*OUT,end=0.5*RIGHT+1.1*DOWN) + l2=DashedLine(start=2.1*RIGHT+1.1*DOWN+1.25*OUT,end=2.1*RIGHT+1.1*DOWN) + l3=DashedLine(start=2.1*RIGHT+3.4*DOWN+1.6*OUT,end=2.1*RIGHT+3.4*DOWN) + l4=DashedLine(start=0.5*RIGHT+3.4*DOWN+2*OUT,end=0.5*RIGHT+3.4*DOWN) + l=VGroup(l1,l2,l3,l4) + + + + s=TextMobject("S",tex_to_color_map={"S": YELLOW}) + s.rotate(PI/4,axis=RIGHT) + s.rotate(PI/15,axis=OUT) + s.shift(RIGHT + 2*OUT + 1.5*DOWN) + d=TextMobject("D",tex_to_color_map={"D": YELLOW}) + d.scale(0.85) + d.shift(1.26*RIGHT + 2.45*DOWN) + + + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-60*DEGREES) + self.begin_ambient_camera_rotation(rate=-0.02) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.wait(1.3) + self.play(ShowCreation(para_hyp)) + self.play(ShowCreation(s)) + self.add(para_hyp2) + self.play(Transform(para_hyp,rec),run_time=2) + self.play(ShowCreation(d)) + + self.wait(3) + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py new file mode 100644 index 0000000..2a094c8 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py @@ -0,0 +1,75 @@ +from manimlib.imports import* +class cuber(ThreeDScene): + + def construct(self): + + axes=ThreeDAxes() + cube=Cube(color=RED) + # cube.scale(1) + cube.shift(RIGHT+DOWN+OUT) + + sq1=Square(side_length=2,color=RED, fill_opacity=0.5) + sq1.shift(RIGHT+DOWN) + # sq1.scale(1.2) + sq2=Square(color=YELLOW, fill_opacity=0.5) + sq2.rotate(PI/2,axis=RIGHT) + sq2.shift(RIGHT+OUT) + + sq3=Square(color=GREEN , fill_opacity=0.5) + sq3.rotate(PI/2, axis=UP) + sq3.shift(DOWN+OUT) + + a=TextMobject("side A",tex_to_color_map={"side A": BLACK}) + b=TextMobject("side B",tex_to_color_map={"side B": BLACK}) + c=TextMobject("side C",tex_to_color_map={"side C": BLACK}) + a.rotate(PI/2, axis=RIGHT) + a.shift(RIGHT+OUT+2*DOWN) + b.rotate(PI/2, axis=OUT) + b.rotate(PI/2, axis=UP) + b.shift(2*RIGHT+DOWN+OUT) + c.shift(RIGHT+DOWN+2*OUT) + c.rotate(PI/4, axis=OUT) + + + axes=ThreeDAxes() + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-67*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.play(ShowCreation(cube)) + self.begin_ambient_camera_rotation(rate=0.04) + self.wait(0.7) + self.play(ShowCreation(sq1)) + self.play(ShowCreation(sq2)) + + self.play(ShowCreation(sq3)) + self.wait(0.6) + self.play(ShowCreation(a)) + + self.play(ShowCreation(b)) + self.move_camera(phi=60*DEGREES,run_time=1) + self.play(ShowCreation(c)) + self.wait(1) + self.wait(2) + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py new file mode 100644 index 0000000..0e6fdaa --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py @@ -0,0 +1,96 @@ +from manimlib.imports import* + + + +class cuber(ThreeDScene): + + def construct(self): + + axes=ThreeDAxes() + cube=Cube(color=RED) + # cube.scale(1) + cube.shift(RIGHT+DOWN+OUT) + + sq1=Square(side_length=1.95,color=BLUE, fill_opacity=1) + sq1.shift(RIGHT+DOWN+2*OUT) + # sq1.scale(1.2) + + sq12=Square(side_length=1.95,color=BLUE, fill_opacity=1) + sq12.shift(RIGHT+DOWN+2*OUT) + + sq2=Square(side_length=1.95,color=RED, fill_opacity=0.6) + sq2.shift(RIGHT+DOWN) + + sq2w=Square(side_length=1.95,color=WHITE, fill_opacity=0.9) + sq2w.shift(RIGHT+DOWN) + + + c=TextMobject("side C",tex_to_color_map={"side C": BLACK}) + + dxdy=TextMobject(r"$dxdy$",tex_to_color_map={r"$dxdy$": WHITE}) + dxdy.scale(0.7) + dxdy.rotate(PI/2, axis=RIGHT) + dxdy.rotate(PI/7, axis=OUT) + dxdy.shift(0.85*RIGHT+0.65*DOWN) + + + + c.shift(RIGHT+DOWN+2*OUT) + c.rotate(PI/4, axis=OUT) + + + + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + v=Vector(color=YELLOW) + # v.scale(2) + v.rotate(PI/2,axis=DOWN) + v.shift(0.4*RIGHT+0.9*DOWN+2.5*OUT) + + + + + + + self.set_camera_orientation(phi=60 * DEGREES,theta=-67*DEGREES) + self.begin_ambient_camera_rotation(rate=0.008) + self.add(axes) + self.add(axis_label) + + self.add(cube) + # self.move_camera(phi=150*DEGREES,theta=-45*DEGREES, run_time=3) + self.wait(1.2) + self.add(sq1) + self.add(sq12) + self.play(ShowCreation(c)) + self.wait(0.7) + self.play(FadeOut(cube)) + self.wait(0.7) + # self.move_camera(phi=75*DEGREES,run_time=2) + self.play(ShowCreation(v)) + self.wait(1) + self.play(Transform(sq1,sq2)) + self.wait(0.7) + self.play(ApplyMethod(sq2w.scale, 0.08)) + self.play(ShowCreation(dxdy)) + self.wait(2) + + + + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py new file mode 100644 index 0000000..a8b5070 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py @@ -0,0 +1,77 @@ +from manimlib.imports import * + +class Surface(ThreeDScene): + def construct(self): + axes=ThreeDAxes() + cylinder = ParametricSurface( + lambda u, v: np.array([ + np.cos(TAU * v), + v, + u + ]), + resolution=(6, 32)).fade(0.5) #Resolution of the surfaces + + + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + cylinder.rotate(PI/2, axis=RIGHT) + cylinder.shift(2*RIGHT+OUT+DOWN) + cylinder.scale(1.5) + + self.set_camera_orientation(phi=75 * DEGREES,theta=-85*DEGREES) + self.begin_ambient_camera_rotation(rate=0.1) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.play(ShowCreation(cylinder)) + # self.wait(0.7) + + + + self.wait(2) + self.stop_ambient_camera_rotation() + self.wait(0.7) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif Binary files differnew file mode 100644 index 0000000..4308c60 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif Binary files differnew file mode 100644 index 0000000..c0ca611 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif Binary files differnew file mode 100644 index 0000000..17b72ff --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md new file mode 100644 index 0000000..2166a79 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md @@ -0,0 +1,6 @@ +**file1_3D_crossproduct.py** +![file1_3D_crossproduct](file1_3D_crossproduct.gif) +**file2_cylindrical_coordinates.py** +![file2_cylindrical_coordinates](file2_cylindrical_coordinates.gif) +**file2_spherical_coordinates.py** +![file2_spherical_coordinates](file2_spherical_coordinates.gif) diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif Binary files differnew file mode 100644 index 0000000..9bde5a1 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py new file mode 100644 index 0000000..6720e7e --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py @@ -0,0 +1,120 @@ +from manimlib.imports import* + + + +class TripleBox(ThreeDScene): + + def construct(self): + + axes=ThreeDAxes() + cube=Cube(fill_color=RED,fill_opacity=0.5) + cube.scale(0.5) + cube.shift(0.5*RIGHT+0.5*DOWN+0.5*OUT) + cube.shift(2*RIGHT+2*DOWN+1*OUT) + + + + x=TextMobject("x") + y=TextMobject("y") + z=TextMobject("z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + + a=TextMobject("a") + b=TextMobject("b") + c=TextMobject("c") + d=TextMobject("d") + e=TextMobject("e") + f=TextMobject("f") + + + + a.rotate(PI/2, axis=RIGHT) + a.rotate(PI/2, axis=OUT) + a.shift(2*DOWN+0.3*OUT+0.3*LEFT) + + b.rotate(PI/2, axis=RIGHT) + b.rotate(PI/2, axis=OUT) + b.shift(3*DOWN+0.3*OUT+0.3*LEFT) + + + c.rotate(PI/2, axis=RIGHT) + c.shift(2*RIGHT+0.3*OUT) + + d.rotate(PI/2, axis=RIGHT) + d.shift(3*RIGHT+0.3*OUT) + + + e.rotate(PI/2, axis=RIGHT) + e.rotate(PI/4, axis=OUT) + e.shift(1*OUT+0.3*DOWN+0.2*LEFT) + + + f.rotate(PI/2, axis=RIGHT) + f.rotate(PI/4, axis=OUT) + f.shift(2*OUT+0.3*DOWN+0.2*LEFT) + + + + rec1=Rectangle(height=1, width=8,color=RED, fill_color=RED_C, fill_opacity=0.40) + rec1.shift(2.5*DOWN+4*RIGHT) + + rec2=Rectangle(height=1, width=14,color=RED, fill_color=RED_C, fill_opacity=0.40) + rec2.rotate(PI/2, axis=OUT) + rec2.shift(7*DOWN+2.5*RIGHT) + + + sq=Square(color=RED,fill_opacity=60,side_length=1) + sq.shift(2.5*RIGHT+2.5*DOWN) + + + + self.set_camera_orientation(phi=70 * DEGREES,theta=-70*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.begin_ambient_camera_rotation(rate=0.04) + self.play(ShowCreation(a),ShowCreation(b)) + self.wait(0.5) + self.play(ShowCreation(rec1)) + self.play(ShowCreation(c),ShowCreation(d)) + self.play(ShowCreation(rec2)) + self.add(sq) + self.wait(0.5) + + self.play(FadeOut(rec1),FadeOut(rec2)) + self.wait(1) + + self.play(ShowCreation(e),ShowCreation(f)) + self.wait(0.5) + self.play(ApplyMethod(sq.shift, 1*OUT)) + self.wait(0.5) + self.play(Transform(sq,cube)) + + + self.wait(0.5) + + + + self.wait(0.5) + + + + + self.wait(3) + self.stop_ambient_camera_rotation() + self.wait(1.5) + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif Binary files differnew file mode 100644 index 0000000..e913750 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py new file mode 100644 index 0000000..d441dc0 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py @@ -0,0 +1,164 @@ +from manimlib.imports import* +class Cy(ThreeDScene): + + def construct(self): + + axes=ThreeDAxes() + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + + + + + x1=TextMobject("$x_{1}$") + y1=TextMobject("$y_{1}$") + z1=TextMobject("$z_{1}$") + + + + + x1.rotate(PI/2, axis=RIGHT) + x1.rotate(PI/2, axis=OUT) + x1.shift(2*DOWN+0.3*OUT+0.3*LEFT) + + y1.rotate(PI/2, axis=RIGHT) + y1.shift(2*RIGHT+0.3*OUT) + + z1.rotate(PI/2, axis=RIGHT) + z1.rotate(PI/4, axis=OUT) + z1.shift(2*OUT+0.3*DOWN+0.2*LEFT) + + + d1=Dot(color=RED,radius=0.05) + d2=Dot(color=RED,radius=0.05) + d3=Dot(color=RED,radius=0.05) + + + d1.shift(2*DOWN) + d1.rotate(PI/2,axis=UP) + + d2.rotate(PI/2, axis=RIGHT) + d2.shift(2*RIGHT) + + d3.rotate(PI/2, axis=RIGHT) + d3.rotate(PI/4, axis=OUT) + d3.shift(2*OUT) + + + + l1=DashedLine(color=RED) + l1.scale(5) + l1.shift(2*DOWN+5*RIGHT) + + l2=DashedLine(color=RED) + l2.scale(5) + l2.rotate(PI/2, axis=IN) + l2.shift(2*RIGHT+5*DOWN) + + l3=DashedLine(color=RED) + l3.scale(5) + l3.rotate(PI/4,axis=IN) + l3.shift(2*OUT+4*RIGHT+4*DOWN) + + point=Sphere(radius=0.02, checkerboard_colors=[BLUE,BLUE]) + point.shift(2*RIGHT+2*DOWN) + + proj=Line() + proj.scale(1.414) + proj.rotate(PI/4,axis=IN) + proj.shift(1*RIGHT+1*DOWN) + + + projl=DashedLine() + projl.rotate(PI/2, axis=DOWN) + projl.shift(1*OUT+2*RIGHT+2*DOWN) + + p=TextMobject("$P(x,y,z)$") + p.scale(0.6) + p.rotate(PI/2, axis=RIGHT) + p.rotate(PI/9, axis=OUT) + p.shift(2.9*RIGHT+2.5*DOWN+2.3*OUT) + + rho=TextMobject(r"$\rho$",tex_to_color_map={r"$\rho$": YELLOW}) + rho.rotate(PI/2, axis=RIGHT) + rho.shift(1.5*RIGHT+1.36*DOWN+0.2*OUT) + + + + + carrow=CurvedArrow(start_point=1*DOWN, end_point=0.5*RIGHT+0.5*DOWN) + + + phi=TextMobject(r"$\phi$",tex_to_color_map={"$\phi$": YELLOW}) + phi.scale(0.93) + phi.rotate(PI/2, axis=RIGHT) + phi.shift(0.3*RIGHT+1.3*DOWN) + + + + + + + + + + + self.set_camera_orientation(phi=70 * DEGREES,theta=-15*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.begin_ambient_camera_rotation(rate=-0.1) + + self.play(ShowCreation(x1),ShowCreation(d1)) + self.wait(0.5) + self.play(ShowCreation(l1)) + self.wait(1) + self.play(ShowCreation(y1),ShowCreation(d2)) + self.wait(0.5) + self.play(ShowCreation(l2)) + self.wait(1) + self.add(point) + self.wait(0.5) + self.play(FadeOut(l1),FadeOut(l2)) + self.wait(0.5) + self.play(ShowCreation(proj)) + self.wait(0.64) + self.stop_ambient_camera_rotation() + self.play(ShowCreation(rho)) + self.wait(1) + + self.play(ShowCreation(z1),ShowCreation(d3)) + self.wait(0.5) + self.play(ShowCreation(l3)) + self.wait(1) + self.play(ApplyMethod(point.shift, 2*OUT), ShowCreation(projl)) + self.play(FadeOut(l3)) + self.play(ShowCreation(p),FadeOut(projl)) + self.wait(0.5) + # self.play(ShowCreation(vec)) + + + + + + self.wait(1) + self.play(ShowCreation(carrow),ShowCreation(phi)) + + self.wait(5) + + diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif Binary files differnew file mode 100644 index 0000000..6dc8b17 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py new file mode 100644 index 0000000..7dcc81a --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py @@ -0,0 +1,159 @@ +from manimlib.imports import* +class Sp(ThreeDScene): + + def construct(self): + + axes=ThreeDAxes() + x=TextMobject("X") + y=TextMobject("Y") + z=TextMobject("Z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + + + + + + + x1=TextMobject("$x_{1}$") + y1=TextMobject("$y_{1}$") + z1=TextMobject("$z_{1}$") + + + + + x1.rotate(PI/2, axis=RIGHT) + x1.rotate(PI/2, axis=OUT) + x1.shift(2*DOWN+0.3*OUT+0.3*LEFT) + + y1.rotate(PI/2, axis=RIGHT) + y1.shift(2*RIGHT+0.3*OUT) + + z1.rotate(PI/2, axis=RIGHT) + z1.rotate(PI/4, axis=OUT) + z1.shift(2*OUT+0.3*DOWN+0.2*LEFT) + + + d1=Dot(color=RED,radius=0.05) + d2=Dot(color=RED,radius=0.05) + d3=Dot(color=RED,radius=0.05) + + + d1.shift(2*DOWN) + d1.rotate(PI/2,axis=UP) + + d2.rotate(PI/2, axis=RIGHT) + d2.shift(2*RIGHT) + + d3.rotate(PI/2, axis=RIGHT) + d3.rotate(PI/4, axis=OUT) + d3.shift(2*OUT) + + + + l1=DashedLine(color=RED) + l1.scale(5) + l1.shift(2*DOWN+5*RIGHT) + + l2=DashedLine(color=RED) + l2.scale(5) + l2.rotate(PI/2, axis=IN) + l2.shift(2*RIGHT+5*DOWN) + + l3=DashedLine(color=RED) + l3.scale(5) + l3.rotate(PI/4,axis=IN) + l3.shift(2*OUT+4*RIGHT+4*DOWN) + + point=Sphere(radius=0.02, checkerboard_colors=[RED,RED]) + + + proj=DashedLine(color=RED_C) + proj.scale(1.414) + proj.rotate(PI/4,axis=IN) + proj.shift(1*RIGHT+1*DOWN) + + + projl=DashedLine() + projl.rotate(PI/2, axis=UP) + projl.shift(1*OUT+2*RIGHT+2*DOWN) + + p=TextMobject("$P(x,y,z)$") + p.scale(0.6) + p.rotate(PI/2, axis=RIGHT) + p.rotate(PI/9, axis=OUT) + p.shift(2.65*RIGHT+2.5*DOWN+2.3*OUT) + + rho=TextMobject(r"$\rho$",tex_to_color_map={r"$\rho$": YELLOW}) + rho.rotate(PI/2, axis=RIGHT) + rho.shift(1.45*RIGHT+1.9*DOWN+1.94*OUT) + + + + + + carrow=ArcBetweenPoints(start=1*DOWN, end=0.5*RIGHT+0.5*DOWN) + carrow2=ArcBetweenPoints(start=0.5*RIGHT+0.5*DOWN+0.5*OUT, end=0.4*OUT) + # carrow2.rotate(PI/2, axis=LEFT) + # carrow2.rotate(PI/2, axis=UP) + + theta=TextMobject(r"$\theta$",tex_to_color_map={r"$\theta$": YELLOW}) + theta.shift((0.75*OUT+0.2*RIGHT)) + theta.rotate(PI/2,axis=RIGHT) + theta.scale(0.9) + + + + + phi=TextMobject(r"$\phi$",tex_to_color_map={"$\phi$": YELLOW}) + phi.scale(0.93) + phi.rotate(PI/2, axis=RIGHT) + phi.shift(0.42*RIGHT+1.3*DOWN) + + + + + + + + + + + self.set_camera_orientation(phi=70 * DEGREES,theta=-85*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.begin_ambient_camera_rotation(rate=0.009) + self.wait(1) + self.add(point) + self.play(ApplyMethod(point.shift, 2*RIGHT+2*DOWN+2*OUT)) + self.wait(0.5) + self.play(ShowCreation(p)) + self.wait(0.5) + self.play(ShowCreation(vec),ShowCreation(rho)) + self.wait(1.5) + self.play(ApplyMethod(point.shift,2*IN), ShowCreation(projl)) + self.wait(1) + self.play(ShowCreation(proj)) + self.wait(1.2) + self.play(ShowCreation(carrow)) + self.wait(0.64) + self.play(ShowCreation(phi)) + self.wait(1.3) + self.play(ShowCreation(carrow2)) + self.wait(0.5) + self.play(ShowCreation(theta)) + self.wait(3) + + + |