diff options
author | Somnath Pandit | 2020-06-23 21:11:09 +0530 |
---|---|---|
committer | Somnath Pandit | 2020-06-23 21:11:09 +0530 |
commit | 07ddf72082f5907f441ed73b15642c8d82dec80f (patch) | |
tree | a926dadc1fb7add610334ce2ac14526cf99e61d3 /FSF-2020 | |
parent | 97c037a7a22fc31083ad48e6faa661645dfbcd40 (diff) | |
download | FSF-mathematics-python-code-archive-07ddf72082f5907f441ed73b15642c8d82dec80f.tar.gz FSF-mathematics-python-code-archive-07ddf72082f5907f441ed73b15642c8d82dec80f.tar.bz2 FSF-mathematics-python-code-archive-07ddf72082f5907f441ed73b15642c8d82dec80f.zip |
update as per review
Diffstat (limited to 'FSF-2020')
2 files changed, 31 insertions, 9 deletions
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 Binary files differindex cc10583..e165a15 100644 --- 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 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 + |