summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.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/gradient/file3_gradient-example-2.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/gradient/file3_gradient-example-2.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py
deleted file mode 100644
index e37581d..0000000
--- a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-
-def function(coordinate):
- x,y = coordinate[:2]
- return np.array([
- x,
- y,
- x**2 - y**2
- ])
-
-class ThreeDVector_three(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- self.add(axes)
- self.set_camera_orientation(phi=45*DEGREES,theta=85*DEGREES,distance=40)
- self.begin_ambient_camera_rotation(rate=0.5)
-
- surface = ParametricSurface(
- lambda x, y: np.array([
- x,
- y,
- x**2 - y**2
- ]),u_min=-2,u_max=2, v_min=-1.5,v_max=1.5).set_color(BLUE_E).fade(0.7).scale(1.7)
-
- text_func = TexMobject(r"\textbf{Input: Function}").shift(4.4*LEFT+3.3*UP).scale(0.7)
- text_field = TexMobject(r"\textbf{Output: Vector Field}").shift(4.4*LEFT+3.3*UP).scale(0.7)
-
- self.add_fixed_in_frame_mobjects(text_func)
- self.play(ShowCreation(surface))
- self.wait(3)
-
- field = VectorField(function)
- self.play(FadeIn(field), FadeOut(text_func))
- self.add_fixed_in_frame_mobjects(text_field)
- self.wait()
- self.play(FadeOut(surface))
- self.wait(2) \ No newline at end of file