From 07ddf72082f5907f441ed73b15642c8d82dec80f Mon Sep 17 00:00:00 2001 From: Somnath Pandit Date: Tue, 23 Jun 2020 21:11:09 +0530 Subject: update as per review --- .../file3_constructing_vector_field.gif | Bin 969466 -> 615613 bytes .../file3_constructing_vector_field.py | 40 ++++++++++++++++----- 2 files changed, 31 insertions(+), 9 deletions(-) (limited to 'FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields') diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.gif index cc10583..e165a15 100644 Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.gif differ diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py index 1fce3da..13211e9 100644 --- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py +++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py @@ -102,20 +102,41 @@ class VectorFields(GraphScene): i+=1 def go_to_machine(self,dot): - self.play(ApplyMethod( - dot.move_to, - self.func_machine,[0,1,0], + if self.run_time>.5: + self.play(ApplyMethod( + dot.next_to, + self.func_machine,4*UP, ), - run_time=self.run_time - ) - self.play(FadeOut(dot),run_time=self.run_time) + run_time=self.run_time + ) + self.dot=dot def take_vec_from_machine(self,vect,position): - vect.next_to(self.func_machine,DOWN,buff=-.4) - self.play(ApplyMethod( + vect.next_to(self.func_machine,DOWN,buff=.1) + if self.run_time>.5: + self.play( + ApplyMethod( + self.dot.shift,DOWN, + run_time=self.run_time + )), + self.play( + FadeOut(self.dot), + run_time=.2 + ) + self.play( + FadeIn(vect), + run_time=.4 + ) + else: + self.remove(self.dot) + self.add(vect) + self.wait(.1) + + self.play( + ApplyMethod( vect.move_to,position ), - run_time=self.run_time + run_time=self.run_time ) def get_vector_field(self,func,**kwargs): @@ -133,3 +154,4 @@ class VectorFields(GraphScene): #uploaded by Somnath Pandit. FSF2020_Vector_fields + -- cgit