From 147be193e665211eeef5170119084a93d122feec Mon Sep 17 00:00:00 2001 From: vishal786-commits Date: Thu, 9 Jul 2020 08:52:12 +0530 Subject: Create file1_flux@_various_points.py --- .../file1_flux@_various_points.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py (limited to 'FSF-2020') diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py new file mode 100644 index 0000000..85567bb --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py @@ -0,0 +1,43 @@ +from manimlib.imports import * +def pendulum_vector_field_func(point): + #theta, omega = point[:2] + return np.array([ + 5*point[2]+point[1], + 3*point[0]+3*point[1], + 0, + ]) +class SimpleField(Scene): + CONFIG = { + #"func": cylinder_flow_vector_field, + "flow_time": 5, + } + def initialize_vector_field(self): + self.vector_field = VectorField( + pendulum_vector_field_func, + ) + self.vector_field.sort(get_norm) + def construct(self): + # plane = NumberPlane(color=RED) + # plane.add(plane.get_axis_labels()) + # self.add(plane) + # self.initialize_vector_field() + + c1=Circle(radius=3,color=RED) + field = self.vector_field + self.play(c1) + self.play(ShowCreation(field), run_time=10) + self.wait(3) + lines = StreamLines( + pendulum_vector_field_func, + virtual_time=3, + min_magnitude=0, + max_magnitude=2, + ) + self.add(AnimatedStreamLines( + lines, + line_anim_class=ShowPassingFlash + )) + self.wait(2) + phase_point = VectorizedPoint(1*UP+1*RIGHT) + self.add(move_along_vector_field(phase_point, pendulum_vector_field_func)) + self.wait(2) -- cgit