From bcd70e78f623191176ece96184ec1fa39c6f30b1 Mon Sep 17 00:00:00 2001 From: Padmapriya Mohan Date: Mon, 20 Jul 2020 14:33:10 +0530 Subject: files with gifs --- .../Gradient/Gradient_file8_fluid-flow.py | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py (limited to 'FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/Gradient/Gradient_file8_fluid-flow.py') 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) -- cgit