diff options
author | vishal786-commits | 2020-06-16 13:19:53 +0530 |
---|---|---|
committer | GitHub | 2020-06-16 13:19:53 +0530 |
commit | 52e633214992ecf0145815d8518e1acf5028c2de (patch) | |
tree | 401535b5840ee525c66d3ac3990225e01d1585ca /FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py | |
parent | 510a0387a035d5b9d8908c6db2dbf531568f1b6e (diff) | |
download | FSF-mathematics-python-code-archive-52e633214992ecf0145815d8518e1acf5028c2de.tar.gz FSF-mathematics-python-code-archive-52e633214992ecf0145815d8518e1acf5028c2de.tar.bz2 FSF-mathematics-python-code-archive-52e633214992ecf0145815d8518e1acf5028c2de.zip |
Create file2_mobius_strip.py
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py')
-rw-r--r-- | FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py | 81 |
1 files changed, 81 insertions, 0 deletions
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) + + + + + + |