summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py
diff options
context:
space:
mode:
authorPadmapriya Mohan2020-07-20 14:33:10 +0530
committerPadmapriya Mohan2020-07-20 14:33:10 +0530
commitbcd70e78f623191176ece96184ec1fa39c6f30b1 (patch)
treeaf86d500ce2438c971fd45a61c3bc7be11a4a1da /FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py
parentd72ba1b05700096a2c42e9616e30a939e9b921a6 (diff)
downloadFSF-mathematics-python-code-archive-bcd70e78f623191176ece96184ec1fa39c6f30b1.tar.gz
FSF-mathematics-python-code-archive-bcd70e78f623191176ece96184ec1fa39c6f30b1.tar.bz2
FSF-mathematics-python-code-archive-bcd70e78f623191176ece96184ec1fa39c6f30b1.zip
files with gifs
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py
new file mode 100644
index 0000000..20972ee
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Curl and conservative fields/CurlTheorem_file5_connected-regions.py
@@ -0,0 +1,54 @@
+from manimlib.imports import *
+
+class Connected(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+
+ connected2D = Circle(radius = 2, fill_color = BLUE_E, fill_opacity = 0.8).set_color(BLUE_E)
+ connected2D_label = TextMobject("Two dimensional, simply connected").move_to(np.array([0, -3, 0])).set_color(YELLOW_E)
+
+ connected3D = Sphere(radius = 2, checkerboard_colors = [BLUE_E, BLUE_E], stroke_color = BLUE_E).fade(0.5)
+ connected3D_label = TextMobject("Three dimensional, simply connected").move_to(np.array([0, -3, 0])).set_color(YELLOW_E)
+
+ self.set_camera_orientation(phi = 0, theta = 0, distance = 40)
+
+ self.add(connected2D)
+ self.add_fixed_in_frame_mobjects(connected2D_label)
+ self.wait(2)
+ self.play(FadeOut(connected2D), FadeIn(connected3D))
+ self.play(FadeOut(connected2D_label))
+ self.add_fixed_in_frame_mobjects(connected3D_label)
+ self.move_camera(phi = 45*DEGREES, theta = 45*DEGREES)
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.wait(2)
+
+
+
+class NotConnected(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+
+ Nconnected2D = Annulus(fill_color = BLUE_E, fill_opacity = 0.8).set_color(BLUE_E)
+ Nconnected2D_label = TextMobject("Two dimensional, not simply connected").move_to(np.array([0, -3, 0])).set_color(YELLOW_E)
+
+ Nconnected3D = ParametricSurface(lambda u, v: np.array([(2.5 + np.cos(v))*np.cos(u),
+ (2.5 + np.cos(v))*np.sin(u),
+ np.sin(v)]),
+ u_min = 0, u_max = 2*np.pi, v_min = 0, v_max = 2*np.pi,
+ checkerboard_colors = [BLUE_E, BLUE_E], stroke_color = BLUE_E).fade(0.5)
+ Nconnected3D_label = TextMobject("Three dimensional, not simply connected").move_to(np.array([0, -3, 0])).set_color(YELLOW_E)
+
+ self.set_camera_orientation(phi = 0, theta = 0, distance = 40)
+
+ self.play(ShowCreation(Nconnected2D))
+ self.add_fixed_in_frame_mobjects(Nconnected2D_label)
+ self.wait(2)
+ self.play(FadeOut(Nconnected2D), FadeIn(Nconnected3D))
+ self.play(FadeOut(Nconnected2D_label))
+ self.add_fixed_in_frame_mobjects(Nconnected3D_label)
+ self.move_camera(phi = 45*DEGREES, theta = 45*DEGREES)
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.wait(2)
+