summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py
diff options
context:
space:
mode:
authorPurusharth Saxena2020-07-20 14:49:01 +0530
committerGitHub2020-07-20 14:49:01 +0530
commit2a002d6106850ac3002c1ef8893df1a3352ea0ce (patch)
tree5bb70edfb838ffe86e0a0a5850df9fcab5702eaf /FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py
parent5525ce2c688e64385c43f0e31679bc76e3875aae (diff)
parentbcd70e78f623191176ece96184ec1fa39c6f30b1 (diff)
downloadFSF-mathematics-python-code-archive-2a002d6106850ac3002c1ef8893df1a3352ea0ce.tar.gz
FSF-mathematics-python-code-archive-2a002d6106850ac3002c1ef8893df1a3352ea0ce.tar.bz2
FSF-mathematics-python-code-archive-2a002d6106850ac3002c1ef8893df1a3352ea0ce.zip
Merge pull request #84 from mohan-padmapriya/add-gifs
Add gifs
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py
new file mode 100644
index 0000000..02a348d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py
@@ -0,0 +1,27 @@
+from manimlib.imports import *
+
+
+def funk(x,y):
+ x,y = coordinate[:2]
+ return np.array([
+ np.sin(x)**np.cos(y),
+ np.sin(y)**np.cos(x),
+ 0
+ ])
+
+class Fluid(Scene):
+ def construct(self):
+ vf = VectorField(funk).fade(0.5)
+ self.add(vf)
+ self.wait()
+ lines = StreamLines(
+ funk,
+ virtual_time=3,
+ min_magnitude=0,
+ max_magnitude=2,
+ )
+ self.add(AnimatedStreamLines(
+ lines,
+ line_anim_class=ShowPassingFlashWithThinningStrokeWidth
+ ))
+ self.wait(3)