diff options
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.py | 27 |
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) |