summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md9
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md14
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file1_area_under_func.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif)bin1277788 -> 1277788 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file2_volume_under_surface.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif)bin6614909 -> 6614909 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file3_y_limit_dependent_on_x.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif)bin1165354 -> 1165354 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file4_non_rect_region.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif)bin2529511 -> 2529511 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file5_elementary_area.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif)bin547368 -> 547368 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file6_doing_integration.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif)bin3349455 -> 3349455 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file7_int_process_of_example.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif)bin3031924 -> 3031924 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md8
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file1_surface1.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif)bin3752052 -> 3752052 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file2_surface2.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif)bin3791121 -> 3791121 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3.o_iteration_methods_checkpoint.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.gif)bin465521 -> 465521 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3_iteration_methods.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif)bin1813461 -> 1813461 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file4_curvy_region.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif)bin1282583 -> 1282583 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md6
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gifbin4012467 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py55
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gifbin1403902 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py2
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file1_grad_of_scalar_function.gifbin0 -> 4058562 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file2_line_int_independent_of_path.gifbin0 -> 1409001 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file3_line_int_example.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif)bin1385308 -> 1385308 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md13
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py12
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gifbin5612895 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py18
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_vector_line_integral.py374
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file5_helix.py (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.py)0
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file1_scalar_line_int_as_sum.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif)bin1051018 -> 1058303 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file2_scalar_line_integral.gifbin0 -> 3301509 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file3_vector_line_int_as_sum.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif)bin1670998 -> 1670998 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file4_vector_line_integral.gifbin0 -> 2243758 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file5_helix.gif (renamed from FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif)bin1237895 -> 1237895 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/README.md11
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file1_vector_fields.py350
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file2_grad_of_scalar_function.py320
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py196
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file4_slope_field.py247
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file1_vector_fields.gifbin0 -> 5384744 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file2_grad_of_scalar_function.gifbin0 -> 6913246 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file3_constructing_vector_field.gifbin0 -> 3838142 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file4_slope_field.gifbin0 -> 1860382 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md4
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gifbin0 -> 4439959 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py60
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gifbin0 -> 595705 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py91
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md6
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.gifbin0 -> 3561130 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.py43
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gifbin7695314 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py50
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gifbin20725583 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py81
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gifbin3620201 -> 14969816 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py174
-rw-r--r--FSF-2020/calculus/intro-to-calculus/introderivative/derivative1.py55
-rw-r--r--FSF-2020/calculus/intro-to-calculus/introderivative/derivative2.py78
-rw-r--r--FSF-2020/calculus/intro-to-calculus/introderivative/derivative3.py57
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/Test1.py34
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/Test2.py26
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limit1.py105
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limit3.py95
-rw-r--r--FSF-2020/calculus/intro-to-calculus/limit/limitdef.py73
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/README.md18
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/RiemannRectanglesAnimation.py64
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/mimi.py53
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect1.py31
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect2.py31
-rw-r--r--FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect3.py31
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/README.md5
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file3.gifbin558677 -> 955375 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file6.gifbin0 -> 955375 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file7.gifbin0 -> 793582 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py7
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py37
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py44
-rw-r--r--FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py13
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/README.md2
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4a_UniformConvergence.gifbin0 -> 476231 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py5
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py7
-rw-r--r--FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py24
-rw-r--r--FSF-2020/calculus/series-and-transformations/README.md11
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/README.md2
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gifbin308980 -> 640160 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2a_TaylorExpansionGeneralForm.gifbin0 -> 640160 bytes
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py19
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py97
-rw-r--r--FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py9
91 files changed, 2713 insertions, 464 deletions
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md
index 4de6c1d..9115c78 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md
@@ -3,11 +3,12 @@ FSF2020--Somnath Pandit
# **Topics:**
## Double Integral
-
+Check the note [here](https://math.animations.fossee.in/contents/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals)
## Fubini's Theorem
-
+Check the note [here](https://math.animations.fossee.in/contents/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem)
## Line Integrals
-
+Check the note [here](https://math.animations.fossee.in/contents/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals)
## Fundamental Theorem of Line integrals
-
+Check the note [here](https://math.animations.fossee.in/contents/calculus-of-several-variables/div,-grad,-curl-and-all-that/the-fundamental-theorem-of-line-integrals)
## Vector Fields
+Check the note [here](https://math.animations.fossee.in/contents/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md
index 5fa2146..f86f7e3 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md
@@ -1,21 +1,21 @@
**file1_area_under_func**
-![file1_area_under_func](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif)
+![file1_area_under_func](gifs/file1_area_under_func.gif)
**file2_volume_under_surface**
-![file2_volume_under_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif)
+![file2_volume_under_surface](gifs/file2_volume_under_surface.gif)
**file3_y_limit_dependent_on_x**
-![file3_y_limit_dependent_on_x](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif)
+![file3_y_limit_dependent_on_x](gifs/file3_y_limit_dependent_on_x.gif)
**file4_non_rect_region**
-![file4_non_rect_region](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif)
+![file4_non_rect_region](gifs/file4_non_rect_region.gif)
**file5_elementary_area**
-![file5_elementary_area](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif)
+![file5_elementary_area](gifs/file5_elementary_area.gif)
**file6_doing_integration**
-![file6_doing_integration](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif)
+![file6_doing_integration](gifs/file6_doing_integration.gif)
**file7_int_process_of_example**
-![file7_int_process_of_example](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif)
+![file7_int_process_of_example](gifs/file7_int_process_of_example.gif)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file1_area_under_func.gif
index 223218b..223218b 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file1_area_under_func.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file2_volume_under_surface.gif
index 1455573..1455573 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file2_volume_under_surface.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file3_y_limit_dependent_on_x.gif
index dcfacb6..dcfacb6 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file3_y_limit_dependent_on_x.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file4_non_rect_region.gif
index c8e7c8c..c8e7c8c 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file4_non_rect_region.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file5_elementary_area.gif
index 5c9ac03..5c9ac03 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file5_elementary_area.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file6_doing_integration.gif
index 7a9271b..7a9271b 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file6_doing_integration.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file7_int_process_of_example.gif
index 9fbdde8..9fbdde8 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/gifs/file7_int_process_of_example.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md
index c1c6e8e..3aa9be2 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md
@@ -1,14 +1,14 @@
**file1_surface1**
-![file1_surface1](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif)
+![file1_surface1](gifs/file1_surface1.gif)
**file2_surface2**
-![file2_surface2](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif)
+![file2_surface2](gifs/file2_surface2.gif)
**file3_iteration_methods**
-![file3_iteration_methods](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif)
+![file3_iteration_methods](gifs/file3_iteration_methods.gif)
**file4_curvy_limits**
-![file4_curvy_limits](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif)
+![file4_curvy_limits](gifs/file4_curvy_region.gif)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file1_surface1.gif
index 8c9fa0a..8c9fa0a 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file1_surface1.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file2_surface2.gif
index 37c4b1d..37c4b1d 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file2_surface2.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3.o_iteration_methods_checkpoint.gif
index 2e507f9..2e507f9 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3.o_iteration_methods_checkpoint.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3_iteration_methods.gif
index 4e1611b..4e1611b 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file3_iteration_methods.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file4_curvy_region.gif
index b0620e5..b0620e5 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/gifs/file4_curvy_region.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md
index aa8c7f8..3cdddae 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md
@@ -1,9 +1,9 @@
**file1_grad_of_scalar_function**
-![file1_grad_of_scalar_function](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif)
+![file1_grad_of_scalar_function](gifs/file1_grad_of_scalar_function.gif)
**file2_line_int_independent_of_path**
-![file2_line_int_independent_of_path](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif)
+![file2_line_int_independent_of_path](gifs/file2_line_int_independent_of_path.gif)
**file3_line_int_example**
-![file3_line_int_example](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif)
+![file3_line_int_example](gifs/file3_line_int_example.gif)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif
deleted file mode 100644
index 5a6e102..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
index c9f479c..fd3d9b5 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
@@ -1,6 +1,6 @@
from manimlib.imports import *
-class GradOfScalar(ThreeDScene):
+class GradOfScalarFunc(ThreeDScene):
CONFIG = {
"axes_config": {
@@ -27,7 +27,7 @@ class GradOfScalar(ThreeDScene):
"num_axis_pieces": 1,
},
"default_graph_style": {
- "stroke_width": 2,
+ "stroke_width": 5,
"stroke_color": WHITE,
},
"default_vector_field_config": {
@@ -38,8 +38,8 @@ class GradOfScalar(ThreeDScene):
"y_min": -3,
"y_max": 3,
"min_magnitude": 0,
- "max_magnitude": 2,
- "colors": [TEAL,GREEN,GREEN,GREEN,YELLOW,RED],
+ "max_magnitude": 3,
+ "colors": [TEAL,GREEN,YELLOW,RED],
"length_func": lambda norm : norm*np.exp(-.38*norm)/2,
"opacity": 1.0,
"vector_config": {
@@ -49,9 +49,9 @@ class GradOfScalar(ThreeDScene):
"default_surface_config": {
"fill_opacity": 0.5,
"checkerboard_colors": [BLUE_E],
- "stroke_width": .5,
+ "stroke_width": .2,
"stroke_color": WHITE,
- "stroke_opacity": 0.75,
+ "stroke_opacity": 0.5,
},
}
@@ -66,17 +66,24 @@ class GradOfScalar(ThreeDScene):
theta=-135 * DEGREES,
)
- scalar_fn_text=TexMobject("f(x,y,z)=","xy").set_color(BLUE)
+ scalar_fn_text=TexMobject("f(x,y)=","xy").set_color(BLUE)
scalar_fn_text.to_corner(UR,buff=.6)
operator=TexMobject("\\vec\\nabla").next_to(
scalar_fn_text,LEFT,buff=.2
).set_color(GOLD)
- grad_text=TexMobject(r"\dfrac{\partial f}{\partial x} \hat i+\dfrac{\partial f}{\partial y} \hat j+\dfrac{\partial f}{\partial z} \hat k").set_color(GOLD)
+
+ grad_text=TexMobject(r"\dfrac{\partial f}{\partial x} \hat i+\dfrac{\partial f}{\partial y} \hat j").set_color(GOLD)
grad_text.next_to(scalar_fn_text,DOWN).scale(.9)
- VGroup(grad_text[0][1],grad_text[0][9],grad_text[0][17]).set_color(BLUE)
- VGroup(grad_text[0][5:8],grad_text[0][13:16],grad_text[0][21:23]).set_color(WHITE)
+ VGroup(
+ grad_text[0][1],
+ grad_text[0][9]
+ ).set_color(BLUE)
+ VGroup(
+ grad_text[0][5:8],
+ grad_text[0][13:16]
+ ).set_color(WHITE)
vector_field_text=TexMobject("\\vec F=y\hat i+x\hat j").set_color_by_gradient(*self.default_vector_field_config["colors"])
vector_field_text.next_to(scalar_fn_text,DOWN)
@@ -108,30 +115,33 @@ class GradOfScalar(ThreeDScene):
self.play(Write(grad_text))
self.wait(2)
- self.play(FadeOut(grad_text))
- self.add_fixed_in_frame_mobjects(vector_field_text)
- show_vec_field=[
+
+ show_vects=[
FadeIn(v_field1),
- Write(vector_field_text),
]
self.begin_ambient_camera_rotation(rate=.2)
self.move_camera(
# distance=20,
phi=60 * DEGREES,
- added_anims=show_vec_field,
+ added_anims=show_vects,
run_time=4.5
)
-
+
+ self.play(FadeOut(grad_text))
self.wait(2)
self.stop_ambient_camera_rotation()
- fadeout= [FadeOut(s_field1)]
+ self.add_fixed_in_frame_mobjects(vector_field_text)
+ vector_field= [
+ FadeOut(s_field1),
+ Write(vector_field_text),
+ ]
self.move_camera(
# distance=20,
phi=0 * DEGREES,
theta=-90 * DEGREES,
- added_anims=fadeout,
+ added_anims=vector_field,
run_time=2
)
self.wait(2)
@@ -165,6 +175,7 @@ class GradOfScalar(ThreeDScene):
config.update(self.default_vector_field_config)
config.update(kwargs)
vector_field= VectorField(func,**config)
+ vector_field.move_to(self.axes.c2p(0,0,0))
self.vector_field=vector_field
if on_surface:
@@ -175,15 +186,14 @@ class GradOfScalar(ThreeDScene):
def get_vectors_on_surface(self):
- config = dict()
- config.update(self.default_vector_field_config["vector_config"])
vectors_on_surface = VGroup(*[
- self.vector_field.get_vector(point,**config)
+ self.vector_field.get_vector(point)
for point in self.surface_points
])
return vectors_on_surface
-
+
+
def get_surface(self, func, **kwargs):
axes=self.axes
@@ -305,4 +315,3 @@ class GradOfScalar(ThreeDScene):
-
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif
deleted file mode 100644
index 29c6d02..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py
index b9597b6..b8f7cfa 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py
@@ -95,7 +95,7 @@ class LineIntegration(GraphScene):
def get_endpoints_of_curve(self):
points=[[-3,0],[2,2]]
- point_labels= ["P_i","P_f"]
+ point_labels= ["P_f","P_i"]
for point,label in zip(points,point_labels):
dot=Dot(self.coords_to_point(*point)).set_color(RED)
dot_label=TexMobject(label)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file1_grad_of_scalar_function.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file1_grad_of_scalar_function.gif
new file mode 100644
index 0000000..1fd2e15
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file1_grad_of_scalar_function.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file2_line_int_independent_of_path.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file2_line_int_independent_of_path.gif
new file mode 100644
index 0000000..8d375bb
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file2_line_int_independent_of_path.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file3_line_int_example.gif
index 20ed081..20ed081 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/gifs/file3_line_int_example.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md
index 17077b6..7e4299d 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md
@@ -1,14 +1,15 @@
**file1_scalar_line_int_as_sum**
-![file1_scalar_line_int_as_sum](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif)
+![file1_scalar_line_int_as_sum](gifs/file1_scalar_line_int_as_sum.gif)
**file2_scalar_line_integral**
-![file2_scalar_line_integral](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif)
+![file2_scalar_line_integral](gifs/file2_scalar_line_integral.gif)
**file3_vector_line_int_as_sum**
-![file3_vector_line_int_as_sum](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif)
+![file3_vector_line_int_as_sum](gifs/file3_vector_line_int_as_sum.gif)
+**file4_vector_line_integral**
+![file4_vector_line_integral](gifs/file4_vector_line_integral.gif)
-
-**file4_helix**
-![file4_helix](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif)
+**file5_helix**
+![file5_helix](gifs/file5_helix.gif)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py
index e3f3574..af32ebf 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py
@@ -155,17 +155,13 @@ class LineIntegrationAsSum(GraphScene):
sum_up_text.set_color_by_tex("summed",PURPLE)
sum_up_text.next_to(multiply_text,DOWN)
- dot.set_color(ORANGE).scale(1.2)
self.play(FadeIn(VGroup(
point_coord,dot
)))
self.play(Write(self.evaluate_text))
self.play(Write(func_val))
- self.play(FadeIn(VGroup(*[
- dot.set_color(ORANGE).scale(1.4)
- for dot in dots ]
- )))
+
self.wait(2)
self.remove(point_coord)
self.get_ds(dots,index)
@@ -182,7 +178,11 @@ class LineIntegrationAsSum(GraphScene):
func_val, RIGHT,buff=.2
))
self.play(Write(sum_up_text))
-
+ dot.set_color(ORANGE).scale(1.2)
+ self.play(FadeIn(VGroup(*[
+ dot.set_color(ORANGE).scale(1.4)
+ for dot in dots ]
+ )))
self.func_val=func_val
self.sum_text_group=VGroup(multiply_text,sum_up_text)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif
deleted file mode 100644
index 71c97d6..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py
index 996ead1..200f768 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py
@@ -47,8 +47,8 @@ class LineIntegrationProcess(SpecialThreeDScene):
axes=self.axes
self.set_camera_orientation(distance=35,
- phi=65 * DEGREES,
- theta=-65 * DEGREES,
+ phi=60 * DEGREES,
+ theta=-60 * DEGREES,
)
fn_text=TextMobject("$z=2+x^2y$").set_color(BLUE)
@@ -86,7 +86,14 @@ class LineIntegrationProcess(SpecialThreeDScene):
self.play(Write(area_text))
self.play(Write(self.area),run_time=2)
self.play(FadeOut(VGroup(surface,fn_text)))
- self.wait()
+ self.move_camera(
+ # distance=20,
+ phi=90 * DEGREES,
+ # theta=-90 * DEGREES,
+ # added_anims=into_graph,
+ run_time=2
+ )
+ self.wait(2)
self.stop_ambient_camera_rotation()
# self.get_lines()
@@ -307,7 +314,8 @@ class LineIntegrationProcess(SpecialThreeDScene):
line=DashedLine(start,end,color=color)
return line
-
+
+#-------------------------------------------------------
#customize 3D axes
def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
config = dict(self.axes_config)
@@ -417,5 +425,3 @@ class LineIntegrationProcess(SpecialThreeDScene):
#uploaded by Somnath Pandit.FSF2020_Line_Integrals
-
-
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_vector_line_integral.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_vector_line_integral.py
new file mode 100644
index 0000000..6730820
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_vector_line_integral.py
@@ -0,0 +1,374 @@
+from manimlib.imports import *
+
+class LineIntegrationProcess(GraphScene):
+
+ CONFIG = {
+ "x_min" : -0,
+ "x_max" : 1,
+ "y_min" : -0,
+ "y_max" : 1,
+ "axes_color":WHITE,
+ "graph_origin": ORIGIN+6.3*LEFT+3*DOWN,
+ "x_axis_width": 5.5,
+ "y_axis_height": 5.5,
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "min_magnitude": 0,
+ "max_magnitude": 15,
+ "colors": [BLUE],
+ "length_func": lambda norm : norm/35,
+ "opacity": 1.0,
+ "vector_config": {
+ "stroke_width":2
+ },
+ },
+ "default_graph_style": {
+ "stroke_width": 2,
+ "stroke_color": WHITE,
+ },
+ }
+
+
+ def construct(self):
+ X = RIGHT*self.x_axis_width/(self.x_max- self.x_min)
+ Y = UP*self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+
+ self.setup_axes(animate=False)
+
+ fn_text=TexMobject(
+ r"\vec F = x^2\hat i-xy\hat j",
+ stroke_width=2.5
+ ).set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ )
+ fn_text.to_edge(TOP,buff=.1).shift(2*LEFT)
+
+ origin=self.graph_origin
+ v_field=self.get_vector_field(
+ lambda v: np.array([
+ (v[0]-origin[0])**2,
+ -(v[0]-origin[0])*(v[1]-origin[1]),
+ 0,
+ ]),
+ x_min= -.001+origin[0],
+ x_max= 5.4+origin[0],
+ y_min= -0+origin[1],
+ y_max= 5.5+origin[1],
+ )
+
+ self.add(v_field, fn_text)
+ self.play(Write(fn_text))
+ self.wait(2)
+ self.get_line_of_int()
+ self.get_dot_product_values()
+ self.wait(2)
+ self.remove(v_field,fn_text)
+ self.write_area_as_intgral_value()
+ self.wait(2)
+
+
+ def get_vector_field(self,func,**kwargs):
+ config = dict()
+ config.update(self.default_vector_field_config)
+ config.update(kwargs)
+ vector_field= VectorField(func,**config)
+ self.vector_field=vector_field
+
+ return vector_field
+
+ def get_line_of_int(self):
+ line_of_int_text=TextMobject(
+ r"Line of integration is\\",
+ "$\\vec r(t)=\cos(t)\hat i+\sin(t)\hat j$"
+ )
+ line_of_int_text[1].set_color(PINK)
+ line_of_int_text.to_corner(UR,buff=.8)
+
+
+ line_of_int= self.get_graph(
+ lambda x : np.sqrt(1-x**2),
+ x_min=1,
+ x_max=0,
+ )
+ line_of_int.set_style(
+ stroke_width=3,
+ stroke_color=PINK,
+ )
+
+ self.play(Write(line_of_int_text))
+ self.wait(.5)
+ self.play(ShowCreation(line_of_int),run_time=2)
+ # self.add(line_of_int)
+
+ self.line_of_int=line_of_int
+ self.line_of_int_text=line_of_int_text
+
+
+ def get_dot_product_values(self):
+ t_tracker = ValueTracker(0)
+ self.t_tracker = t_tracker
+ self.get_vector_and_tangent()
+ self.get_dot_product_graph()
+ self.wait(1.5)
+ self.play(ApplyMethod(
+ self.t_tracker.set_value, PI/6,
+ rate_func=linear,
+ run_time=2.5,
+ )
+ )
+ self.wait(1)
+ self.play(ApplyMethod(
+ self.t_tracker.set_value, PI/2,
+ rate_func=linear,
+ run_time=4,
+ )
+ )
+ self.dot_prod_graph.suspend_updating()
+
+ def get_vector_and_tangent(self):
+ vect_tangent_text=TextMobject(
+ "Get the"," vector",r" and\\"," tangent",
+ " on the"," line"
+ )
+ vect_tangent_text.set_color_by_tex_to_color_map({
+ "tangent": ORANGE, "vector": YELLOW, "line":PINK
+ })
+ vect_tangent_text.to_corner(UR,buff=.8)
+ self.vect_tangent_text= vect_tangent_text
+
+ self.play(FadeOut(self.axes))
+ self.remove(self.line_of_int_text)
+ self.play(Write(vect_tangent_text))
+ self.show_vector()
+ self.show_tangent()
+ self.wait(1.3)
+
+ def show_vector(self):
+ t = self.t_tracker.get_value
+ vect_label=TextMobject(
+ "$\\vec F(x_i,y_i)$",
+ color=YELLOW,
+ stroke_width=2
+ ).scale(.8)
+
+ vector = always_redraw( lambda:
+ self.vector_field.get_vector(
+ self.coords_to_point(
+ np.cos(t()), np.sin(t())
+ ),
+ stroke_width=6,
+ max_stroke_width_to_length_ratio= 8,
+ ).set_color(YELLOW),
+ )
+
+ vect_label.next_to(vector,RIGHT,buff=.1)
+ vector_group= VGroup(vector,vect_label)
+
+ # self.add(vector_group)
+ self.play(Write(vector_group),run_time=1)
+ self.wait(.4)
+
+ self.vect_label = vect_label
+ self.vector_group= vector_group
+
+ def show_tangent(self):
+ tangent_label=TextMobject(
+ "$\\vec T(x_i,y_i)$",
+ color=ORANGE,
+ stroke_width=2
+ ).scale(.8)
+
+ t = self.t_tracker.get_value
+
+ tangent = always_redraw(lambda:
+ Vector(
+ color=ORANGE,
+ stroke_width=6,
+ ).scale(1).next_to(
+ self.coords_to_point(
+ np.cos(t()), np.sin(t())
+ ),DR,buff=-.1
+ ).rotate(
+ self.angle_of_tangent(
+ np.cos(t()),
+ self.line_of_int,
+ dx=-0.00001
+ ),
+ about_point=self.coords_to_point(
+ np.cos(t()), np.sin(t())
+ )
+ )
+ )
+ tangent_label.next_to(tangent,UP,buff=.1)
+ tangent_group=VGroup(tangent,tangent_label)
+
+ # self.add(tangent_group)
+ self.play(Write(tangent_group))
+ self.wait(.6)
+
+ self.tangent_label=tangent_label
+ self.tangent_group=tangent_group
+
+ def get_dot_product_graph(self):
+ t = self.t_tracker.get_value
+
+ self.start_x= 1.3 ; self.end_x=2.3
+
+ t_axis= self.get_graph(
+ lambda x : 2.0/5,
+ x_min= self.start_x,
+ x_max= self.end_x,
+ ).set_style(
+ stroke_width=4,
+ )
+
+ dot_prod_axis= Vector(3*UP).next_to(
+ t_axis,LEFT,buff=-.1
+ ).set_color(GREEN)
+ dot_prod_label=TexMobject(
+ "\\vec F","\\cdot","\\vec T",
+ stroke_width= 1.5,
+ ).next_to(dot_prod_axis,UP).scale(.8)
+ dot_prod_label[0].set_color(YELLOW)
+ dot_prod_label[2].set_color(ORANGE)
+
+ dot_prod_graph_axes= VGroup(t_axis,dot_prod_axis)
+
+ self.write_about_graph()
+ self.wait(1)
+ # self.add(dot_prod_graph_axes)
+ self.play(Write(dot_prod_graph_axes))
+ self.show_the_parameter(t,t_axis)
+ self.wait(.6)
+ self.play(ReplacementTransform(
+ self.vect_label,dot_prod_label[0]
+ ))
+ self.play(ReplacementTransform(
+ self.tangent_label,dot_prod_label[1:3]
+ ))
+ self.show_graph_area(t_axis)
+
+ self.dot_prod_graph_axes= dot_prod_graph_axes
+ self.dot_prod_label= dot_prod_label
+
+ def write_about_graph(self):
+ graph_text=TextMobject(
+ "Graph",r" of the "," vector",r" $-$\\ ",
+ r"tangent",r" dot product\\",
+ " with the parameter ","$t$"
+ )
+ graph_text.set_color_by_tex_to_color_map({
+ "Graph":GREEN, "vector": YELLOW,
+ "tangent":ORANGE, "$t$":RED
+ })
+ graph_text.to_corner(UR,buff=.5)
+ self.graph_text=graph_text
+
+ self.remove(self.vect_tangent_text)
+ self.play(Write(graph_text),run_time=4)
+
+ def show_the_parameter(self,t,t_axis):
+ t_dot=Dot(color=RED).next_to(t_axis,LEFT,buff=0)
+ t_dot.add_updater(lambda obj :
+ obj.move_to(self.c2g([t(),0])
+ ))
+ t_text=TextMobject("$t$=").next_to(t_dot,UP,buff=.25)
+ t_val=always_redraw(
+ lambda: DecimalNumber(
+ t()/PI,
+ color=GOLD
+ ).next_to(t_text,RIGHT,buff=0).scale(.8)
+ )
+ t_label=VGroup(
+ t_text,t_val
+ ).set_color(RED)
+
+
+ pi = TexMobject(
+ "\\pi ",
+ color=GOLD,
+ ).next_to(t_val,RIGHT,buff=0.05)
+ t_label.add(pi)
+
+ t_label.add_updater(lambda label :
+ label.next_to(t_dot,UP)
+ )
+
+ t_group=VGroup(t_dot,t_label)
+
+ # self.add(t_group)
+ self.play(Write(t_group))
+
+ self.t_group= t_group
+
+
+ def show_graph_area(self,t_axis):
+ t = self.t_tracker.get_value
+ dot_prod_graph= always_redraw(lambda: Polygon(
+ *[
+ self.c2g([t,-2*np.cos(t)**2*np.sin(t)])
+ for t in np.arange(0,t(),0.01)
+ ],
+ *[
+ self.c2g([t,0])
+ for t in [ t(),0 ]
+ ],
+ stroke_width=2.5,
+ fill_color=TEAL_D,
+ fill_opacity=.6,
+ ))
+
+ self.add(dot_prod_graph)
+
+ self.dot_prod_graph=dot_prod_graph
+
+ def c2g(self,coord):
+ """ get points for the dot product graph
+ from its coordinates"""
+
+ return self.coords_to_point(
+ self.start_x+coord[0]/(PI/2),
+ 2.0/5+coord[1]/2,
+ )
+
+
+ def write_area_as_intgral_value(self):
+ area_text=TextMobject(
+ "Value of the "," line"," integral in the",
+ r"Vector field\\",
+ "is equal to this ","area"
+ )
+ area_text.set_color_by_tex_to_color_map({
+ "Vector field": BLUE, "line":PINK, "area":TEAL_C
+ })
+ area_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+
+ self.play(FadeOut(VGroup(
+ self.line_of_int,
+ self.vector_group,
+ self.tangent_group,
+ self.t_group,
+ self.dot_prod_graph_axes,
+ self.dot_prod_label,
+ self.graph_text
+ )
+ ))
+ area= self.dot_prod_graph.copy().scale(1.3)
+ area.next_to(area_text,DOWN,buff=1.5)
+
+ # self.add(area_text)
+ self.play(Write(area_text),run_time=4)
+ self.play(ReplacementTransform(
+ self.dot_prod_graph,
+ area
+ ))
+ self.wait(.5)
+
+ #uploaded by Somnath Pandit.FSF2020_Line_Integrals
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file5_helix.py
index 50aeb33..50aeb33 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file5_helix.py
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file1_scalar_line_int_as_sum.gif
index 1984b08..17ea3f0 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file1_scalar_line_int_as_sum.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file2_scalar_line_integral.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file2_scalar_line_integral.gif
new file mode 100644
index 0000000..f9a8f98
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file2_scalar_line_integral.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file3_vector_line_int_as_sum.gif
index 46b35bc..46b35bc 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file3_vector_line_int_as_sum.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file4_vector_line_integral.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file4_vector_line_integral.gif
new file mode 100644
index 0000000..1be7e1e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file4_vector_line_integral.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file5_helix.gif
index ceedb1f..ceedb1f 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/gifs/file5_helix.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/README.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/README.md
new file mode 100644
index 0000000..d8c0956
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/README.md
@@ -0,0 +1,11 @@
+**file1_vector_fields**
+![file1_vector_fields](gifs/file1_vector_fields.gif)
+
+**file2_grad_of_scalar_function**
+![file2_grad_of_scalar_function](gifs/file2_grad_of_scalar_function.gif)
+
+**file3_constructing_vector_field**
+![file3_constructing_vector_field](gifs/file3_constructing_vector_field.gif)
+
+**file4_slope_field**
+![file4_slope_field](gifs/file4_slope_field.gif)
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file1_vector_fields.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file1_vector_fields.py
new file mode 100644
index 0000000..6b1b686
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file1_vector_fields.py
@@ -0,0 +1,350 @@
+from manimlib.imports import *
+
+class VectorFields(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": -4,
+ "x_max": 4,
+ "y_min": -4,
+ "y_max": 4,
+ "z_min": -3,
+ "z_max": 3,
+ "a":-4 ,"b": 4, "c":-4 , "d":4,
+ "axes_shift": ORIGIN+2*LEFT,
+ "x_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "y_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "z_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "num_axis_pieces": 10,
+ },
+ "default_graph_style": {
+ "stroke_width": 2,
+ "stroke_color": WHITE,
+ },
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "x_min": -3,
+ "x_max": 3,
+ "y_min": -3,
+ "y_max": 3,
+ "min_magnitude": 0,
+ "max_magnitude": 4,
+ "colors": [BLUE,GREEN,ORANGE,RED],
+ "length_func": lambda norm : .45*sigmoid(norm),
+ "opacity": 1.0,
+ "vector_config": {
+ "stroke_width":3.5,
+ "max_tip_length_to_length_ratio": 0.35,
+ "max_stroke_width_to_length_ratio": 8,
+ },
+ },
+
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+
+ self.set_camera_orientation(distance=35,
+ phi=0 * DEGREES,
+ theta=-90 * DEGREES,
+ )
+ self.move_camera(frame_center=axes.c2p(0,0,0))
+
+ self.show_2d_field()
+ self.wait(3)
+
+ self.show_3d_field()
+ self.begin_ambient_camera_rotation(rate=-.3,)
+ self.wait(1.5)
+ axes.x_axis.rotate(
+ -90 * DEGREES, LEFT,
+ about_point=axes.c2p(0, 0, 0),
+ ),
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ ),
+ self.move_camera(
+ # distance=20,
+ phi=85 * DEGREES,
+ rate_func=linear,
+ run_time=8
+ )
+ self.wait(5)
+
+
+ def show_2d_field(self):
+ d2_field_text=TexMobject(
+ r"\vec F(x,y)=-y\hat i+x\hat j",
+ stroke_width=1.5
+ ).set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ )
+ d2_field_text.to_corner(UR,buff=.5)
+
+ d2_field = self.get_vector_field(
+ lambda v: np.array([
+ -v[1],
+ v[0],
+ 0
+ ]),
+ )
+ self.add_fixed_in_frame_mobjects(d2_field_text)
+ # self.add(d2_field)
+ self.play(Write(d2_field_text))
+ self.play(FadeIn(d2_field))
+
+ self.d2_field=d2_field
+ self.d2_field_text=d2_field_text
+
+ def show_3d_field(self):
+ d3_field_text=TexMobject(
+ r"\vec F(x,y,z)=-y\hat i+x\hat j+0 \hat k",
+ stroke_width=1.5
+ ).set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ )
+ d3_field_text.to_corner(UR,buff=.5)
+
+ d3_field= self.get_vector_field(
+ lambda v: np.array([
+ -v[1],
+ v[0],
+ 0
+ # v[0]*v[2]
+ ]),
+ z_min=-2,
+ z_max= 2,
+ delta_x= 1,
+ delta_y= 1,
+ delta_z= 1,
+ length_func=lambda norm : .5*sigmoid(norm),
+ opacity= 1,
+ ThreeD=True
+ )
+
+ self.remove(self.d2_field,self.d2_field_text)
+ self.add_fixed_in_frame_mobjects(d3_field_text)
+ # self.add(d3_field)
+ self.play(Write(d3_field_text))
+ self.play(FadeIn(d3_field))
+
+ def get_vector_field(self,func,ThreeD=False,**kwargs):
+ config = dict()
+ config.update(self.default_vector_field_config)
+ config.update(kwargs)
+ if ThreeD:
+ vector_field= VectorField3D(func,**config)
+ else:
+ vector_field= VectorField(func,**config)
+
+ vector_field.move_to(self.axes.c2p(0,0,0))
+ self.vector_field=vector_field
+
+ return vector_field
+
+
+
+#-------------------------------------------------------
+ #customize 3D axes
+ def get_three_d_axes(self, include_labels=True, include_numbers=False, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+ self.axes=axes
+
+ if include_numbers:
+ self.add_axes_numbers(axes)
+
+ if include_labels:
+ self.add_axes_labels(axes)
+
+ # Adjust axis orientation
+ axes.x_axis.rotate(
+ -0 * DEGREES, LEFT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 0 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.scale(1)
+ # axes.center()
+ axes.shift(axes.axes_shift)
+
+ self.add(axes)
+ self.axes = axes
+
+ def add_axes_numbers(self, axes):
+ x_axis = axes.x_axis
+ y_axis = axes.y_axis
+ tex_vals_x = [
+
+ ("1", axes.b),
+ ]
+ tex_vals_y=[
+
+ ("1", axes.d)
+ ]
+ x_labels = VGroup()
+ y_labels = VGroup()
+ for tex, val in tex_vals_x:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(x_axis.n2p(val), DOWN)
+ # label.rotate(180 * DEGREES)
+ x_labels.add(label)
+ x_axis.add(x_labels)
+ x_axis.numbers = x_labels
+
+ for tex, val in tex_vals_y:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(y_axis.n2p(val), LEFT)
+ label.rotate(90 * DEGREES)
+ y_labels.add(label)
+
+ y_axis.add(y_labels)
+ y_axis.numbers = y_labels
+
+ return axes
+
+ def add_axes_labels(self, axes):
+ x_label = TexMobject("x")
+ x_label.next_to(axes.x_axis.get_end(), RIGHT)
+ axes.x_axis.label = x_label
+
+ y_label = TextMobject("y")
+ y_label.rotate(90 * DEGREES, OUT)
+ y_label.next_to(axes.y_axis.get_end(), UP)
+ axes.y_axis.label = y_label
+
+ z_label = TextMobject("z")
+ z_label.rotate(90 * DEGREES, RIGHT)
+ z_label.next_to(axes.z_axis.get_zenith(), LEFT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+#-----------------------------------------------------------
+
+class VectorField3D(VGroup):
+ CONFIG = {
+ "delta_x": 1,
+ "delta_y": 1,
+ "delta_z": 1,
+ "x_min": int(np.floor(-FRAME_WIDTH / 2)),
+ "x_max": int(np.ceil(FRAME_WIDTH / 2)),
+ "y_min": int(np.floor(-FRAME_HEIGHT / 2)),
+ "y_max": int(np.ceil(FRAME_HEIGHT / 2)),
+ "z_min":-1,
+ "z_max": 1,
+ "min_magnitude": 0,
+ "max_magnitude": 4,
+ "colors": DEFAULT_SCALAR_FIELD_COLORS,
+ # Takes in actual norm, spits out displayed norm
+ "length_func": lambda norm: 0.45 * sigmoid(norm),
+ "opacity": 1.0,
+ "vector_config": {},
+ }
+ '''Position of the tip of vector to be fixed'''
+ def __init__(self, func, **kwargs):
+ VGroup.__init__(self, **kwargs)
+ self.func = func
+ self.rgb_gradient_function = get_rgb_gradient_function(
+ self.min_magnitude,
+ self.max_magnitude,
+ self.colors,
+ flip_alphas=False
+ )
+ x_range = np.arange(
+ self.x_min,
+ self.x_max + self.delta_x,
+ self.delta_x
+ )
+ y_range = np.arange(
+ self.y_min,
+ self.y_max + self.delta_y,
+ self.delta_y
+ )
+ z_range = np.arange(
+ self.z_min,
+ self.z_max + self.delta_z,
+ self.delta_z
+ )
+ for x, y, z in it.product(x_range, y_range, z_range):
+ point = x * RIGHT + y * UP + z * OUT
+ # print(point)
+ self.add(self.get_vector(point))
+ self.set_opacity(self.opacity)
+
+ def get_vector(self, point, **kwargs):
+ output = np.array(self.func(point))
+ norm = get_norm(output)
+ if norm == 0:
+ output *= 0
+ else:
+ output *= self.length_func(norm) / norm
+ # norm=np.linalg.norm(output)
+ vector_config = dict(self.vector_config)
+ vector_config.update(kwargs)
+
+ vect = Vector(
+ output,
+ **vector_config
+ )
+ vect_perp=vect.copy().rotate(PI/2, axis=output)
+ vect= VGroup(vect,vect_perp)
+ # vect= self.position_vector(vect,point,output,norm)
+ vect.shift(point)
+ fill_color = rgb_to_color(
+ self.rgb_gradient_function(np.array([norm]))[0]
+ )
+ vect.set_color(fill_color)
+ return vect
+
+ '''def position_vector(self,vect,point,output,norm):
+ theta,phi=self.get_theta_phi(output,norm)
+ vect.rotate(PI-phi, axis=RIGHT)
+ vect.rotate(theta, axis=IN)
+ # or apply rotation matrix?
+ return vect
+
+ def get_theta_phi(self,output,norm):
+ if norm==0:
+ phi,theta=0,0
+ else:
+ phi= np.arccos(output[-1]/norm)
+ if output[0]!=0:
+ theta= np.arccos(output[0]/(norm*np.sin(phi)))
+ else:
+ theta= 0
+ return phi,theta'''
+
+
+
+ #uploaded by Somnath Pandit. FSF2020_Vector_fields
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file2_grad_of_scalar_function.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file2_grad_of_scalar_function.py
new file mode 100644
index 0000000..231b15c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file2_grad_of_scalar_function.py
@@ -0,0 +1,320 @@
+from manimlib.imports import *
+
+class GradOfScalarFunc(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": -3,
+ "x_max": 3,
+ "y_min": -3,
+ "y_max": 3,
+ "z_min": 0,
+ "z_max": 3,
+ "a":-3 ,"b": 3, "c":-3 , "d":3,
+ "axes_shift": ORIGIN+IN+LEFT,
+ "x_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "y_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "z_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "num_axis_pieces": 1,
+ },
+ "default_graph_style": {
+ "stroke_width": 2,
+ "stroke_color": WHITE,
+ },
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "x_min": -3,
+ "x_max": 3,
+ "y_min": -3,
+ "y_max": 3,
+ "min_magnitude": 0,
+ "max_magnitude": 2,
+ "colors": [BLUE,GREEN,GREEN,ORANGE,RED],
+ "length_func": lambda norm : .45*sigmoid(norm),
+ "opacity": 1.0,
+ "vector_config": {
+ "stroke_width":6
+ },
+ },
+ "default_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [BLUE_D],
+ "stroke_width": .5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.2,
+ },
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ scalar_fn_text=TexMobject("f(x,y)=","\cos(xy)").set_color(BLUE)
+ scalar_fn_text.to_corner(UR,buff=.6)
+
+ operator=TexMobject("\\vec\\nabla").next_to(
+ scalar_fn_text,LEFT,buff=.2
+ ).set_color(GOLD)
+
+ grad_text=TexMobject(r"\dfrac{\partial f}{\partial x} \hat i+\dfrac{\partial f}{\partial y} \hat j+\dfrac{\partial f}{\partial z} \hat k").set_color(GOLD)
+ grad_text.next_to(scalar_fn_text,DOWN).scale(.9)
+
+ VGroup(
+ grad_text[0][1],
+ grad_text[0][9],
+ grad_text[0][17]
+ ).set_color(BLUE)
+ VGroup(
+ grad_text[0][5:8],
+ grad_text[0][13:16],
+ grad_text[0][21:23]
+ ).set_color(WHITE)
+
+ vector_field_text=TexMobject(
+ r"\vec F&=-y\sin(xy)\hat i\\ &-x\sin(xy)\hat j"
+ ).set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ )
+ vector_field_text.next_to(scalar_fn_text,DOWN)
+
+
+ '''always generate the scalar field first'''
+ s_field=self.get_scalar_field(
+ func= lambda x ,y : np.cos(x*y/2),
+ dn=.25
+ )
+ v_field=self.get_vector_field(
+ lambda v: np.array([
+ -(v[1]-axes.c2p(0,0,0)[1])*np.sin((v[0]-axes.c2p(0,0,0)[0])*(v[1]-axes.c2p(0,0,0)[1])),
+ -(v[0]-axes.c2p(0,0,0)[0])*np.sin((v[0]-axes.c2p(0,0,0)[0])*(v[1]-axes.c2p(0,0,0)[1])),
+ 0,
+ ]),
+ on_surface=True,
+ )
+
+ self.add_fixed_in_frame_mobjects(scalar_fn_text)
+
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.play(Write(s_field),run_time=2)
+ self.wait(4)
+ self.stop_ambient_camera_rotation()
+
+ self.add_fixed_in_frame_mobjects(operator)
+ self.play(Write(operator),FadeOut(scalar_fn_text[1]))
+ self.add_fixed_in_frame_mobjects(grad_text)
+ self.play(Write(grad_text))
+ self.wait(1.5)
+
+ self.play(FadeOut(grad_text))
+ self.add_fixed_in_frame_mobjects(vector_field_text)
+ show_vec_field=[
+ FadeIn(v_field),
+ Write(vector_field_text),
+ ]
+ # self.play(*show_vec_field,run_time=.5)
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.move_camera(
+ # distance=20,
+ phi=50 * DEGREES,
+ added_anims=show_vec_field,
+ run_time=3
+ )
+
+ self.wait(5)
+ self.stop_ambient_camera_rotation()
+
+ fadeout= [FadeOut(s_field)]
+ # self.play(*fadeout)
+ self.move_camera(
+ # distance=20,
+ phi=0 * DEGREES,
+ theta=-90 * DEGREES,
+ added_anims=fadeout,
+ run_time=2
+ )
+ self.wait(2)
+
+
+
+
+
+ def get_scalar_field(self,func,dn=.5):
+ surface= self.get_surface(
+ lambda x , y:
+ func(x,y),
+ )
+
+ self.surface_points=self.get_points(func,dn)
+ return surface
+
+ def get_points(self,func,dn):
+ axes=self.axes
+
+ x_vals=np.arange(axes.a,axes.b,dn)
+ y_vals=np.arange(axes.c,axes.d,dn)
+ points=[]
+ for x_val in x_vals:
+ for y_val in y_vals:
+ points+=[axes.c2p(x_val,y_val,func(x_val,y_val)+.05)]
+ return points
+
+ def get_vector_field(self,func,on_surface=True,**kwargs):
+ config = dict()
+ config.update(self.default_vector_field_config)
+ config.update(kwargs)
+ vector_field= VectorField(func,**config)
+ vector_field.move_to(self.axes.c2p(0,0,0))
+ self.vector_field=vector_field
+
+ if on_surface:
+ vector_field=self.get_vectors_on_surface()
+
+ return vector_field
+
+
+
+ def get_vectors_on_surface(self):
+ vectors_on_surface = VGroup(*[
+ self.vector_field.get_vector(point)
+ for point in self.surface_points
+ ])
+
+ return vectors_on_surface
+
+
+ def get_surface(self, func, **kwargs):
+ axes=self.axes
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ 4*(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ 4*(axes.x_max - axes.x_min) // axes.x_axis.tick_frequency,
+ ),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+
+#-------------------------------------------------------
+ #customize 3D axes
+ def get_three_d_axes(self, include_labels=True, include_numbers=False, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+ self.axes=axes
+
+ if include_numbers:
+ self.add_axes_numbers(axes)
+
+ if include_labels:
+ self.add_axes_labels(axes)
+
+ # Adjust axis orientation
+ axes.x_axis.rotate(
+ -90 * DEGREES, LEFT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.scale(1)
+ # axes.center()
+ axes.shift(axes.axes_shift)
+
+ self.add(axes)
+ self.axes = axes
+
+ def add_axes_numbers(self, axes):
+ x_axis = axes.x_axis
+ y_axis = axes.y_axis
+ tex_vals_x = [
+
+ ("1", axes.b),
+ ("-1", axes.a),
+ ]
+ tex_vals_y=[
+
+ ("1", axes.d)
+ ]
+ x_labels = VGroup()
+ y_labels = VGroup()
+ for tex, val in tex_vals_x:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(x_axis.n2p(val), DOWN)
+ # label.rotate(180 * DEGREES)
+ x_labels.add(label)
+ x_axis.add(x_labels)
+ x_axis.numbers = x_labels
+
+ for tex, val in tex_vals_y:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(y_axis.n2p(val), LEFT)
+ label.rotate(90 * DEGREES)
+ y_labels.add(label)
+
+ y_axis.add(y_labels)
+ y_axis.numbers = y_labels
+
+ return axes
+
+ def add_axes_labels(self, axes):
+ x_label = TexMobject("x")
+ x_label.next_to(axes.x_axis.get_end(), RIGHT)
+ axes.x_axis.label = x_label
+
+ y_label = TextMobject("y")
+ y_label.rotate(90 * DEGREES, OUT)
+ y_label.next_to(axes.y_axis.get_end(), UP)
+ axes.y_axis.label = y_label
+
+ z_label = TextMobject("z")
+ z_label.rotate(90 * DEGREES, RIGHT)
+ z_label.next_to(axes.z_axis.get_zenith(), LEFT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
+
+ #uploaded by Somnath Pandit. FSF2020_Vector_fields
+
+
+
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
new file mode 100644
index 0000000..fc56306
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file3_constructing_vector_field.py
@@ -0,0 +1,196 @@
+from manimlib.imports import *
+
+
+class VectorFields(GraphScene):
+ CONFIG = {
+ "x_min" : -4,
+ "x_max" : 4,
+ "y_min" : -4,
+ "y_max" : 4,
+ "graph_origin": ORIGIN+2.5*LEFT,
+ "x_axis_width": 7,
+ "y_axis_height": 7,
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "min_magnitude": 0,
+ "max_magnitude": 4,
+ "colors": [GREEN,GREEN,YELLOW,RED],
+ "length_func": lambda n: n/2.5,
+ "opacity": .75,
+ "vector_config": {
+ "stroke_width":6,
+ "max_stroke_width_to_length_ratio":4
+ },
+ },
+
+ "a":-3.5 ,"b": 4, "c": -3.5 ,"d": 4,
+ }
+
+ def construct(self):
+ X = RIGHT*self.x_axis_width/(self.x_max- self.x_min)
+ Y = UP*self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+
+ self.setup_axes(animate=False)
+ vector_function = lambda v: np.array([
+ (v[0]-self.graph_origin[0])*(v[1]-self.graph_origin[1]),
+ -(v[0]-self.graph_origin[0]),
+ 0,
+ ])
+
+ vector_field=self.get_vector_field(
+ vector_function,
+ colors= [GREEN]
+ )
+
+ self.show_points()
+ self.wait(.5)
+ self.show_func_machine()
+ self.wait(1)
+ self.produce_vectors(vector_field)
+ self.wait(.5)
+ self.scale_down_vectors(vector_function)
+ self.wait(2)
+
+
+
+ def show_points(self):
+ dn=1
+ x_vals=np.arange(self.a,self.b,dn)
+ y_vals=np.arange(self.c,self.d,dn)
+ dots=VGroup()
+ for x_val in x_vals:
+ for y_val in y_vals:
+ dot=Dot(
+ self.coords_to_point(x_val,y_val),
+ radius=.05,
+ color=TEAL,
+ )
+ dots.add(dot)
+ self.play(ShowCreation(dots, run_time=1))
+ self.dots=dots
+
+ def show_func_machine(self):
+ machine=RoundedRectangle(
+ height=2,
+ width=3.5,
+ color=PURPLE,
+ stroke_width=8
+ ).to_edge(RIGHT, buff=.4)
+
+ machine_label=TexMobject(
+ r"\vec F=xy\hat i-x\hat j",
+ stroke_width=1.5,
+ ).set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ ).next_to(machine,IN)
+
+ machine=VGroup(machine,machine_label)
+ self.add(machine)
+
+ self.func_machine=machine
+
+
+ def produce_vectors(self,vector_field):
+ count,i=3,0
+ self.run_time=1
+ non_scaled_vectors=VGroup()
+ for dot in self.dots:
+ if i==count:
+ self.run_time=.05
+ position=dot.get_center()
+ vect= vector_field.get_vector(position)
+ self.go_to_machine(dot)
+ self.take_vec_from_machine(vect,position)
+ non_scaled_vectors.add(vect)
+ i+=1
+
+ self.non_scaled_vectors=non_scaled_vectors
+
+ def go_to_machine(self,dot):
+ if self.run_time>.5:
+ self.play(ApplyMethod(
+ dot.next_to,
+ self.func_machine,4*UP,
+ ),
+ run_time=self.run_time
+ )
+ self.dot=dot
+
+ def take_vec_from_machine(self,vect,position):
+ vect.next_to(self.func_machine,DOWN,buff=.1)
+
+ if self.run_time>.5:
+ point_coord=TexMobject(
+ "(x_i,y_i)"
+ ).next_to(self.dot,RIGHT,buff= .01).scale(.75)
+ input_point=VGroup(point_coord, self.dot)
+ self.play(
+ ApplyMethod(
+ input_point.shift,DOWN,
+ run_time=self.run_time
+ )),
+ self.play(
+ FadeOut(input_point),
+ run_time=.2
+ )
+ self.play(
+ FadeIn(vect),
+ run_time=.4
+ )
+ else:
+ self.remove(self.dot)
+ self.add(vect)
+ self.wait(1.0/15)
+
+ self.play(
+ vect.move_to,position,
+ run_time=self.run_time
+ )
+
+ def scale_down_vectors(self,vector_function):
+ scale_down_text=TextMobject(
+ r"Vectors are rescaled\\ for clarity\\ and \\",
+ r"colors are used to \\ indicate magnitudes",
+ stroke_width=1.2
+ )
+ scale_down_text[0][:7].set_color(BLUE)
+ scale_down_text[1].set_color_by_gradient(
+ *self.default_vector_field_config["colors"]
+ )
+ scale_down_text.to_corner(UR).shift(DOWN)
+ scaled_vector_field= self.get_vector_field(
+ vector_function,
+ length_func= lambda norm : .75*sigmoid(norm)
+ )
+ for vector in self.non_scaled_vectors:
+ scaled_vect= scaled_vector_field.get_vector(vector.get_center())
+ vector.target= scaled_vect
+
+ self.play(FadeOut(self.func_machine))
+ self.play(Write(scale_down_text))
+ self.wait(1.2)
+ self.play(LaggedStartMap(
+ MoveToTarget, self.non_scaled_vectors,
+ run_time=3
+ ))
+
+ def get_vector_field(self,func,**kwargs):
+ config = dict()
+ config.update(self.default_vector_field_config)
+ config.update(kwargs)
+ vector_field= VectorField(func,**config)
+
+ return vector_field
+
+
+
+
+
+#uploaded by Somnath Pandit. FSF2020_Vector_fields
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file4_slope_field.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file4_slope_field.py
new file mode 100644
index 0000000..8ebb6f5
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/file4_slope_field.py
@@ -0,0 +1,247 @@
+from manimlib.imports import *
+
+
+class SlopeFields(GraphScene):
+ CONFIG = {
+ "x_min" : -2,
+ "x_max" : 2,
+ "y_min" : -2,
+ "y_max" : 2,
+ "graph_origin": ORIGIN+2.5*LEFT,
+ "x_axis_width": 7,
+ "y_axis_height": 7,
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_slope_field_config": {
+ "delta_x": .2,
+ "delta_y": .2,
+ "opacity": 1,
+ "color": BLUE_A,
+ "slope_length_factor": .2,
+ "line_config": {
+ "stroke_width":2.5,
+ },
+ },
+
+ "a":-1.9 ,"b": 2, "c": -1.9 ,"d": 2,
+ }
+
+ def construct(self):
+ X = RIGHT*self.x_axis_width/(self.x_max- self.x_min)
+ Y = UP*self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+
+ self.setup_axes(animate=False)
+
+ slope_field=self.get_slope_field(
+ lambda x,y:-2.0*(x-self.graph_origin[0])*(y-self.graph_origin[1]),
+ x_min=self.graph_origin[0]+self.a,
+ x_max=self.graph_origin[0]+self.b,
+ y_min=self.graph_origin[1]+self.c,
+ y_max=self.graph_origin[1]+self.d,
+ color= GREEN_B
+ )
+
+ self.show_points()
+ self.wait(.5)
+ self.show_func_machine()
+ self.wait(1)
+ self.produce_slopes(slope_field)
+ # self.add(slope_field)
+ self.glimpse_of_solutions()
+ self.wait(2)
+
+
+
+
+ def show_points(self):
+ dn=1.0/5
+ x_vals=np.arange(self.a,self.b,dn)
+ y_vals=np.arange(self.c,self.d,dn)
+ dots=VGroup()
+ for x_val in x_vals:
+ for y_val in y_vals:
+ dot=Dot(
+ self.coords_to_point(x_val,y_val),
+ radius=.04,
+ color=TEAL,
+ )
+ dots.add(dot)
+ self.play(ShowCreation(dots, run_time=1))
+ self.dots=dots
+
+ def show_func_machine(self):
+ machine=RoundedRectangle(
+ height=3,
+ width=4,
+ color=PURPLE,
+ stroke_width=8
+ ).to_edge(RIGHT, buff=.4)
+
+ machine_label=TextMobject(
+ r"Line segment\\ with slope\\"," $y'=-2xy$",
+ stroke_width=1.2,
+ color=BLUE
+ ).next_to(machine,IN)
+ machine_label[1].set_color(GREEN)
+ machine=VGroup(machine, machine_label)
+ self.play(FadeIn(machine))
+
+ self.func_machine = machine
+
+
+ def produce_slopes(self,slope_field):
+ count,i=3,0
+ self.run_time=1
+ for dot in self.dots:
+ if i==count:
+ self.run_time=.05
+ position=dot.get_center()
+ line= slope_field.get_slope(position)
+ self.go_to_machine(dot)
+ self.take_line_from_machine(line,position)
+ i+=1
+
+ def go_to_machine(self,dot):
+ if self.run_time>.5:
+ self.play(ApplyMethod(
+ dot.next_to,
+ self.func_machine,4*UP,
+ ),
+ run_time=self.run_time
+ )
+ self.dot=dot
+
+ def take_line_from_machine(self,vect,position):
+
+ if self.run_time>.5:
+ vect.next_to(self.func_machine,DOWN,buff=.1)
+ 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
+ )
+ self.play(
+ ApplyMethod(
+ vect.move_to,position
+ ),
+ run_time=self.run_time
+ )
+ else:
+ self.remove(self.dot)
+ self.add(vect)
+ vect.move_to(position)
+
+
+ def get_slope_field(self,func,**kwargs):
+ config = dict()
+ config.update(self.default_slope_field_config)
+ config.update(kwargs)
+ slope_field= SlopeField(func,**config)
+
+ return slope_field
+
+ def glimpse_of_solutions(self):
+ sol_text= TextMobject(
+ r"The solution curves\\ seem to be like...",
+ color= BLUE,
+ stroke_width=1.2
+ )
+ sol_text.to_corner(UR, buff=1)
+ condition_text= TextMobject(
+ r"for different\\ initial conditions",
+ color= GOLD,
+ stroke_width=1.1
+ )
+ condition_text.next_to(sol_text,DOWN,buff=1)
+ solution1 = self.get_graph(
+ lambda x : np.exp(-x**2),
+ x_min = self.a,
+ x_max = self.b,
+ color = PINK)
+ solution2 = self.get_graph(
+ lambda x : .5*np.exp(-x**2),
+ x_min = self.a,
+ x_max = self.b,
+ color = YELLOW)
+ solution3 = self.get_graph(
+ lambda x : 1.5*np.exp(-x**2),
+ x_min = self.a,
+ x_max = self.b,
+ color = BLUE)
+ solution4 = self.get_graph(
+ lambda x : -np.exp(-x**2),
+ x_min = self.a,
+ x_max = self.b,
+ color = RED_E)
+
+ self.play(FadeOut(self.func_machine))
+ self.play(Write(sol_text))
+ self.wait(.6)
+ self.play(ShowCreation(solution1))
+ self.play(Write(condition_text))
+ self.play(ShowCreation(solution2))
+ self.wait(.5)
+ self.play(ShowCreation(solution3))
+ self.wait(.5)
+ self.play(ShowCreation(solution4))
+
+
+class SlopeField(VGroup):
+ CONFIG = {
+ "delta_x": 0.5,
+ "delta_y": 0.5,
+ "x_min": int(np.floor(-FRAME_WIDTH / 2)),
+ "x_max": int(np.ceil(FRAME_WIDTH / 2)),
+ "y_min": int(np.floor(-FRAME_HEIGHT / 2)),
+ "y_max": int(np.ceil(FRAME_HEIGHT / 2)),
+ "opacity": 1.0,
+ "color": WHITE,
+ "slope_length_factor": .25,
+ "line_config": {},
+ }
+
+ def __init__(self, func, **kwargs):
+ VGroup.__init__(self, **kwargs)
+ self.func = func
+
+ x_range = np.arange(
+ self.x_min,
+ self.x_max + self.delta_x,
+ self.delta_x
+ )
+ y_range = np.arange(
+ self.y_min,
+ self.y_max + self.delta_y,
+ self.delta_y
+ )
+ for x, y in it.product(x_range, y_range):
+ point = x * RIGHT + y * UP
+ self.add(self.get_slope(point))
+ self.set_opacity(self.opacity)
+
+ def get_slope(self, point, **kwargs):
+ slope = self.func(*point[:2])
+ line_config = dict(self.line_config)
+ line_config.update(kwargs)
+ line = Line(ORIGIN,self.slope_length_factor*RIGHT, **line_config)
+ line.move_to(point).rotate(np.arctan(slope/3.2))
+
+ line.set_color(self.color)
+ return line
+
+
+
+
+#uploaded by Somnath Pandit. FSF2020_Vector_fields
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file1_vector_fields.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file1_vector_fields.gif
new file mode 100644
index 0000000..96e50ac
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file1_vector_fields.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file2_grad_of_scalar_function.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file2_grad_of_scalar_function.gif
new file mode 100644
index 0000000..c1ab66a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file2_grad_of_scalar_function.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file3_constructing_vector_field.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file3_constructing_vector_field.gif
new file mode 100644
index 0000000..6a57cab
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file3_constructing_vector_field.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file4_slope_field.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file4_slope_field.gif
new file mode 100644
index 0000000..c39ec54
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/vector-fields/gifs/file4_slope_field.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md
index e69de29..17fcde0 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md
@@ -0,0 +1,4 @@
+**file1_flux@_various_points.py**
+![file1_flux@_various_points](file1_flux@_various_points.gif)
+**file2_different_valuesof_Div.py**
+![file2_different_valuesof_Div](file2_different_valuesof_Div.gif)
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif
new file mode 100644
index 0000000..6c32b94
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.gif
Binary files differ
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..6727982
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file1_flux@_various_points.py
@@ -0,0 +1,60 @@
+from manimlib.imports import *
+def pendulum_vector_field_func(point):
+ #theta, omega = point[:2]
+ return np.array([
+ 5*point[0]+point[1],
+ 3*point[1]+3*point[1],
+ 0,
+ ])
+class SF(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)
+
+ A=TextMobject("The net flux through the green circular region is zero",tex_to_color_map={"green": GREEN})
+ B=TextMobject("The net flux through the blue circular region is non-zero",tex_to_color_map={"blue": BLUE})
+
+ c1=Circle(color=GREEN, radius=1.5)
+ c1.shift(4*LEFT+2.2*UP)
+ c2=Circle(color=BLUE, radius=1.5)
+
+
+
+
+ self.play(ShowCreation(A))
+ self.wait(0.5)
+ self.play(ApplyMethod(A.shift, (0.8*UP+0.2*LEFT)))
+ self.play(ShowCreation(B))
+ # self.play(ApplyMethod(B.shift, (2*UP)))
+ self.wait(2)
+ self.play(FadeOut(A),FadeOut(B))
+ self.initialize_vector_field()
+ field = self.vector_field
+ self.play(ShowCreation(field), run_time=4)
+ self.play(ShowCreation(c1))
+ self.play(ShowCreation(c2))
+ self.wait(1)
+ 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)
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif
new file mode 100644
index 0000000..477c311
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py
new file mode 100644
index 0000000..921047d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/file2_different_valuesof_Div.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+class Div(Scene):
+ def construct(self):
+ one=TextMobject(r"Div$ \vec{F} < 0$ ").set_color(RED)
+ two=TextMobject(r"Div$ \vec{F} = 0$ ").set_color(BLUE)
+ three=TextMobject(r"Div$ \vec{F} > 0$ ").set_color(YELLOW)
+
+ one.shift(2.3*DOWN)
+ two.shift(2.3*DOWN)
+ three.shift(2.3*DOWN)
+
+
+ a=Dot(color=RED)
+ a.shift(0.1*LEFT)
+ b=Dot(color=BLUE)
+ b.shift(0.1*LEFT)
+ c=Dot(color=YELLOW)
+ c.shift(0.1*LEFT)
+
+ rot=[0*DEGREES,45*DEGREES,90*DEGREES,135*DEGREES,180*DEGREES,225*DEGREES,270*DEGREES,315*DEGREES]
+ rot2=[180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES,180*DEGREES]
+ shift=[RIGHT,0.7*RIGHT+0.7*UP,UP,0.7*LEFT+0.7*UP,LEFT,0.7*LEFT+0.7*DOWN,DOWN,0.7*RIGHT+0.7*DOWN]
+ shift2=[RIGHT,RIGHT+UP,RIGHT+DOWN,UP,DOWN,LEFT,LEFT+UP,LEFT+DOWN]
+
+
+
+ u=[Vector(color=RED),Vector(color=RED),Vector(color=RED),Vector(color=RED),
+ Vector(color=RED),Vector(color=RED),Vector(color=RED),Vector(color=RED)]
+
+
+ [u[i].rotate(rot[i]) for i in range(8) ]
+ [u[i].rotate(rot2[i]) for i in range(8) ]
+ [u[i].shift(shift[i]) for i in range(8) ]
+
+
+ divone=VGroup(*u)
+ divone.shift(0.6*LEFT)
+
+
+ v=[Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE),
+ Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE),Vector(color=BLUE)]
+
+
+ [v[i].rotate(45*DEGREES) for i in range(8)]
+ [v[i].shift(shift2[i]) for i in range(8) ]
+
+ divtwo=VGroup(*v)
+ divtwo.shift(0.6*LEFT)
+
+
+ w=[Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW),
+ Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW),Vector(color=YELLOW)]
+
+
+ [w[i].rotate(rot[i]) for i in range(8)]
+ [w[i].shift(shift[i]) for i in range(8) ]
+
+
+ divthree=VGroup(*w)
+ divthree.shift(0.6*LEFT)
+
+
+
+
+ self.play(ShowCreation(a),ShowCreation(divone))
+ self.play(ShowCreation(one))
+ self.wait(1)
+ self.play(FadeOut(a),FadeOut(divone),FadeOut(one))
+
+ self.play(ShowCreation(b),ShowCreation(divtwo))
+ self.play(ShowCreation(two))
+ self.wait(1)
+ self.play(FadeOut(b),FadeOut(divtwo),FadeOut(two))
+
+
+ self.play(ShowCreation(c),ShowCreation(divthree))
+ self.play(ShowCreation(three))
+ self.wait(1)
+ self.play(FadeOut(c),FadeOut(divthree),FadeOut(three))
+ self.wait(0.5)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
index 0af7aa1..97d6d10 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
@@ -1,7 +1,5 @@
-**file1_flux_through_sphere.py**
-![file1_flux_through_sphere](file1_flux_through_sphere.gif)
-**file2_mobius_strip.py**
-![file2_mobius_strip](file2_mobius_strip.gif)
+**file1_flux_through_circle.py**
+![file1_flux_through_circle](file1_flux_through_circle.gif)
**file3_normal_vector.py**
![file3_normal_vector](file3_normal_vector.gif)
**file4_cube_surface.py**
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.gif
new file mode 100644
index 0000000..c00076b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.py
new file mode 100644
index 0000000..e418a96
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_circle.py
@@ -0,0 +1,43 @@
+from manimlib.imports import *
+def pendulum_vector_field_func(point):
+ #theta, omega = point[:2]
+ return np.array([
+ point[0],
+ point[1],
+ point[2],
+ ])
+class F2D(Scene):
+ CONFIG = {
+ # "func": cylinder_flow_vec or_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()
+
+ field = self.vector_field
+ c1=Circle(radius=3,color=BLUE)
+ self.play(ShowCreation(field), run_time=7)
+ self.play(ShowCreation(c1))
+ 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)
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif
deleted file mode 100644
index 43327bf..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py
deleted file mode 100644
index e07715e..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from manimlib.imports import *
-class fluxsphere(ThreeDScene):
-
-
- def construct(self):
- s = Sphere(checkerboard_colors=[BLUE_D,BLUE_D])
- s.scale(2.3)
-
- n = VGroup(
- *[self.n(*self.func(u, v))
- for u in np.arange(0, PI, 0.4)
- for v in np.arange(0, TAU, 0.8)]
- )
-
-
-
- self.move_camera(0.8 * PI / 2, -0.45 * PI)
- self.play(Write(s))
- # self.play(Write(f))
- self.play(ShowCreation(n), run_time=4)
- # self.add(n)
- self.begin_ambient_camera_rotation(rate=0.1)
- self.wait(5)
-
-
- def func(self, u, v):
- return [
- np.cos(v) * np.sin(u),
- np.sin(v) * np.sin(u),
- np.cos(u)
- ]
-
- def vect(self, x, y, z):
- return np.array([
- x, y, z
- ])
-
- def n(self, x, y, z):
- vect = np.array([
- x,
- y,
- z
- ])
-
- mag = math.sqrt(vect[0] ** 2 + vect[1] ** 2 + vect[2] ** 2)
- v = Vector(
- (1.5/mag) * vect,
- color=RED_B,
- stroke_width=4).shift(2*x * RIGHT + 2*y * UP + 2*z * OUT)
- return v
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif
deleted file mode 100644
index 9623046..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py
deleted file mode 100644
index 31b1990..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py
+++ /dev/null
@@ -1,81 +0,0 @@
-from manimlib.imports import *
-
-class Mobius(ThreeDScene):
- def construct(self):
- axes=ThreeDAxes()
-
-
-
- R=2.5
-
-
- mobius = ParametricSurface(
- lambda u, v: np.array([
- (R+u*np.cos(v/2))*np.cos(v),
- (R+u*np.cos(v/2))*np.sin( v),
- u*np.sin(v/2)
- ]),
- u_min = -0.5, u_max = 0.5, v_min = 0, v_max = 2*PI,
-
- resolution=(6, 32)).fade(0.5) #Resolution of the surfaces
- circle=Circle(radius=2.5, color=BLUE)
-
-
-
- mobius.rotate(PI/2, axis=RIGHT)
- mobius.rotate(PI/2, axis=OUT)
- # # mobius.shift(RIGHT+OUT+DOWN)
-
-
-
-
-
- along = ParametricSurface(
- lambda u, v: np.array([
- (R+u*np.cos(v/2))*np.cos(v),
- (R+u*np.cos(v/2))*np.sin(v),
- 0
- ]),
- u_min = -0.5, u_max = 0.5, v_min = 0, v_max = 2*PI,
-
- resolution=(6, 32)).fade(0.5) #Resolution of the surfaces
- circle=Circle(radius=2.5, color=BLUE)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- self.set_camera_orientation(phi=75 * DEGREES,theta=-75*DEGREES)
-
- self.play(Write(mobius))
-
- self.wait(1)
- self.begin_ambient_camera_rotation(rate=0.65)
-
- self.wait(10)
- self.stop_ambient_camera_rotation()
- self.wait(1)
-
-
-
-
-
-
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif
index c6101cf..001edb8 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
index 9301a00..146d955 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
@@ -1,7 +1,4 @@
from manimlib.imports import*
-
-
-
class cuber(ThreeDScene):
def construct(self):
@@ -41,6 +38,7 @@ class cuber(ThreeDScene):
n1=TextMobject(r"$\vec{n}$",color=YELLOW)
n1.scale(0.8)
n1.rotate(PI/2,axis=RIGHT)
+ n1.rotate(PI,axis=OUT)
n1.shift(3*RIGHT+1.3*OUT+DOWN)
spaceloc = [[0,0,2],[1,0,2],[-1,0,2],[2,0,2],[-2,0,2],[3,0,2],[-3,0,2],
@@ -59,158 +57,128 @@ class cuber(ThreeDScene):
[0,3,2],[1,3,2],[-1,3,2],[2,3,2],[-2,3,2],[3,3,2],[-3,3,2]]
- veclist1=[Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E)]
+ veclist1=[Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY)]
- [veclist1[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
- [veclist1[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
- [veclist1[i].rotate(PI/6,axis=OUT) for i in range(98)]
- [veclist1[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ [veclist1[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist1[i].rotate(PI/6,axis=OUT) for i in range(42)]
+ [veclist1[i].rotate(PI/8,axis=DOWN) for i in range(42)]
vectorfield1=VGroup(*veclist1)
- [veclist1[i].shift(spaceloc[i]) for i in range(98)]
+ [veclist1[i].shift(spaceloc[i]) for i in range(42)]
- veclist2=[Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
- Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E)]
+ veclist2=[Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY)]
- [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
- [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
- [veclist2[i].rotate(PI/6,axis=OUT) for i in range(98)]
- [veclist2[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist2[i].rotate(PI/6,axis=OUT) for i in range(42)]
+ [veclist2[i].rotate(PI/8,axis=DOWN) for i in range(42)]
vectorfield2=VGroup(*veclist2)
- [veclist2[i].shift(spaceloc[i]) for i in range(98)]
+ [veclist2[i].shift(spaceloc[i]) for i in range(42)]
- veclist3=[Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector()]
+ veclist3=[Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY)]
- [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
- [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
- [veclist3[i].rotate(PI/6,axis=OUT) for i in range(98)]
- [veclist3[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist3[i].rotate(PI/6,axis=OUT) for i in range(42)]
+ [veclist3[i].rotate(PI/8,axis=DOWN) for i in range(42)]
vectorfield3=VGroup(*veclist3)
- [veclist3[i].shift(spaceloc[i]) for i in range(98)]
+ [veclist3[i].shift(spaceloc[i]) for i in range(42)]
- veclist4=[Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
- Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector()]
+ veclist4=[Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY)]
- [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
- [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
- [veclist4[i].rotate(PI/6,axis=OUT) for i in range(98)]
- [veclist4[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(42)]
+ [veclist4[i].rotate(PI/6,axis=OUT) for i in range(42)]
+ [veclist4[i].rotate(PI/8,axis=DOWN) for i in range(42)]
vectorfield4=VGroup(*veclist4)
- [veclist4[i].shift(spaceloc[i]) for i in range(98)]
+ [veclist4[i].shift(spaceloc[i]) for i in range(42)]
vectorfield1.shift(1.5*DOWN)
vectorfield2.shift(IN+1.5*DOWN)
vectorfield3.shift(2*IN+1.5*DOWN)
- vectorfield4.shift(3*IN+1.5*DOWN)
+ vectorfield4.shift(3*IN+1.5*DOWN)
+
vectors=[vectorfield1,vectorfield2,vectorfield3,vectorfield4]
vectorfield=VGroup(*vectors)
- vectorfield.scale(1.25)
+ vectorfield.scale(1.3)
+
- fv=[Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
- Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
- Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
- Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
+ fv=[Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),Vector(color=GREY),
+ Vector(color=GREY)
]
- spaceloc2 = [[1.5,0.5,0.5],[1.5,1,0.5],[1.5,1.5,0.5],[1.5,2,0.5],
- [1.5,0.5,1],[1.5,1,1],[1.5,1.5,1],[1.5,2,1],
- [1.5,0.5,1.5],[1.5,1,1.5],[1.5,1.5,1.5],[1.5,2,1.5],
- [1.5,0.5,2],[1.5,1,2],[1.5,1.5,2],[1.5,2,2]]
-
- [fv[i].rotate(PI/4,axis=RIGHT) for i in range(1)]
- [fv[i].rotate(PI/6,axis=OUT) for i in range(16)]
- [fv[i].rotate(PI/8,axis=DOWN) for i in range(16)]
- [fv[i].shift(spaceloc2[i]) for i in range(16)]
+ spaceloc2 = [[1.5,0.5,0.5],[1.5,1,0.5],[1.5,1.5,0.5],
+ [1.5,0.5,1],[1.5,1,1],[1.5,1.5,1],
+ [1.5,0.5,1.5],[1.5,1,1.5],[1.5,1.5,1.5]
+ ]
+ [fv[i].rotate(PI/4,axis=RIGHT) for i in range(9)]
+ [fv[i].rotate(PI/6,axis=OUT) for i in range(9)]
+ [fv[i].rotate(PI/8,axis=DOWN) for i in range(9)]
+ [fv[i].shift(spaceloc2[i]) for i in range(9)]
fvfield=VGroup(*fv)
- fvfield.shift(0.5*IN+2*DOWN)
+ fvfield.shift(2*DOWN)
+ fvfield.scale(1.3)
- flux=TextMobject("Flux through one side of the cube").set_color(ORANGE)
- flux.shift(3*UP+1.5*LEFT)
+ flux=TextMobject("Flux through one side of the cube").set_color(GOLD)
+ flux.shift(3.5*UP+0.5*LEFT)
+ alll=[vectorfield1,vectorfield2,vectorfield3,vectorfield4,fvfield]
+ alllvectors=VGroup(*alll)
self.set_camera_orientation(phi=70 * DEGREES,theta=-75*DEGREES)
self.play(ShowCreation(axes),ShowCreation(axis_label))
- self.play(ShowCreation(vectorfield))
- self.add(fvfield)
- self.begin_ambient_camera_rotation(rate=0.01)
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.play(ShowCreation(alllvectors))
+ # self.add(fvfield)
self.play(ShowCreation(cube, run_time=1))
@@ -223,6 +191,6 @@ class cuber(ThreeDScene):
# self.play(ShowCreation(flux))
self.wait(1)
self.play(ShowCreation(v1),ShowCreation(n1))
- self.wait(6)
- # self.stop_ambient_camera_rotation()
-
+ self.wait(5)
+ self.stop_ambient_camera_rotation()
+ self.wait(1)
diff --git a/FSF-2020/calculus/intro-to-calculus/introderivative/derivative1.py b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative1.py
new file mode 100644
index 0000000..79a6fc6
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative1.py
@@ -0,0 +1,55 @@
+from manimlib.imports import *
+class derivative1(GraphScene, Scene):
+ def setup(self):
+ GraphScene.setup(self)
+ CONFIG = {
+ "y_max" : 4,
+ "y_min" : -2,
+ "x_max" : 4,
+ "x_min" : -2,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+2*DOWN+4*LEFT,
+ "x_labeled_nums": list(range(-2,5)),
+ "y_labeled_nums": list(range(-2,5)),
+ "x_axis_label":"$x$",
+ "y_axis_label":r"$f(x)=y= 3-\frac { 3 }{ 2 } x$",
+ "x_axis_width": 5,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ #XTD = self.x_axis_width/(self.x_max - self.x_min)
+ #YTD = self.y_axis_height/(self.y_max - self.y_min)
+
+ text1 = TextMobject("")
+ text2 = TexMobject("{y}_{2}-{y}_{1}")
+ text2 = TexMobject("{x}_{2}-{x}_{1}")
+ text3 = TexMobject(r"m\quad =\frac { { y }_{ 2 }-{ y }_{ 1 } }{ { x }_{ 2 }-{ x }_{ 1 } }").move_to(np.array([3,0,0]))
+ text4 = TexMobject(r"m\quad =\frac { 3 }{ -2 }").move_to(np.array([3,0,0]))
+ text5 = TexMobject(r"m\quad =\quad -1.5").move_to(np.array([3,0,0]))
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : 3-1.5*x, color = GREEN_SCREEN, x_min = -1, x_max = 3)
+ graph_2 = self.get_graph(lambda x : 3.1-1.5*x, color = ORANGE, x_min = 0, x_max = 2)
+ dot1 = Dot()
+ dot2 = SmallDot(self.graph_origin+1.7*RIGHT, color = PINK)
+ dot3 = SmallDot(self.graph_origin+2.5*UP, color = RED_B)
+ vec1 = Vector(2.5*DOWN, color = PINK).shift(self.graph_origin+2.5*UP)
+ vec2 = Vector(1.7*RIGHT, color = RED_B).shift(self.graph_origin)
+ brace1 = Brace(vec1, LEFT)
+ brace2 = Brace(vec2, DOWN)
+ br1text = brace1.get_text(r"${y}_{2}-{y}_{1}$").next_to(brace1, LEFT)
+ br2text = brace2.get_text(r"${x}_{2}-{x}_{1}$").next_to(brace2, DOWN)
+ self.play(ShowCreation(graph_1), ShowCreation(dot2), ShowCreation(dot3))
+ self.play(MoveAlongPath(dot1, graph_2), ShowCreation(vec1), ShowCreation(vec2), run_time = 3)
+ self.wait(1)
+ self.play(ShowCreation(brace1), ShowCreation(brace2))
+ self.play(ShowCreation(br1text), ShowCreation(br2text))
+ self.wait(2)
+ self.play(GrowFromCenter(text3))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text3, text4))
+ self.wait(2)
+ self.play(ReplacementTransform(text4, text5))
+ self.wait(2)
diff --git a/FSF-2020/calculus/intro-to-calculus/introderivative/derivative2.py b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative2.py
new file mode 100644
index 0000000..d6aab15
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative2.py
@@ -0,0 +1,78 @@
+from manimlib.imports import *
+class derivative2(GraphScene, MovingCameraScene):
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
+ CONFIG = {
+ "y_max" : 100,
+ "y_min" : 0,
+ "x_max" : 10,
+ "x_min" : 0,
+ "y_tick_frequency" : 100,
+ "x_tick_frequency" : 10,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN,
+ "x_labeled_nums": None,#list(range(0,11)),
+ "y_labeled_nums": None,#list(range(0,101))[::10],
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 5,
+ "y_axis_height": 5,
+ "start_x" : 2,
+ "start_dx" : 6,
+ "df_color" : YELLOW,
+ "dx_color" : GREEN,
+ "secant_line_color" : MAROON_B,
+ "zoomed_camera_frame_starting_position": ORIGIN+2*DOWN+6*LEFT,
+ }
+ def construct(self):
+ self.setup()
+ self.camera_frame.save_state()
+ self.graph_origin = ORIGIN+2*DOWN+6*LEFT
+ self.setup_axes()
+ graph23 = self.get_graph(lambda x : x**2+7, color = GREEN_SCREEN, x_min = 0, x_max = 10)
+ graph24 = self.get_graph(lambda x : x**2+7, color = GREEN_SCREEN, x_min = 8, x_max = 2.01)
+ line_1 = DashedVMobject(Line(np.array([-5,-2,0]), np.array([-5,-1.42,0])))
+ textdef = TextMobject("")
+ text1 = TexMobject("{ x }_{ 0 }").move_to(np.array([-5,-2.2,0]))
+ text2 = TextMobject("The line becomes tangential to the curve").move_to(self.graph_origin+RIGHT+0.5*UP).scale(0.01)
+ text3 = TexMobject(r"\frac { df }{ dx } =\frac { f({ x }_{ 0 }+h)-f({ x }_{ 0 }) }{ h-0 }").move_to(2*RIGHT)
+ text4 = TexMobject(r"\frac { df }{ dx } =\lim _{ h\rightarrow 0 }{ \frac { f({ x }_{ 0 }+h)-f({ x }_{ 0 }) }{ h } }").move_to(2*RIGHT)
+ squareobj = Square(side_length = 15).move_to(self.graph_origin+RIGHT+0.53*UP)
+ ss_group = self.get_secant_slope_group(
+ self.start_x, graph23,
+ dx = self.start_dx,
+ dx_label = "h",
+ df_label = "df",
+ df_line_color = self.df_color,
+ dx_line_color = self.dx_color,
+ secant_line_color = self.secant_line_color,
+ dot_df_top = True,
+ dot_dx_start = True,
+ dot_df_top_label = "Q",
+ dot_dx_start_label = "P",
+ secant_line_length = 8
+ )
+ self.play(ShowCreation(graph23))
+ self.wait()
+ self.play(ShowCreation(ss_group.secant_line))
+ self.add(text1)
+ self.play(ShowCreation(line_1))
+ self.wait(3)
+ self.play(ShowCreation(ss_group.dx_line))
+ self.play(ShowCreation(ss_group.dx_label))
+ self.play(ShowCreation(ss_group.df_line))
+ self.play(Write(ss_group.df_label))
+ self.play(ShowCreation(ss_group.dot_df_top), ShowCreation(ss_group.dot_dx_start))
+ self.play(ShowCreation(ss_group.dot_df_top_label), ShowCreation(ss_group.dot_dx_start_label))
+ self.wait()
+ self.play(ShowCreation(text3))
+ self.wait(2)
+ self.play(ReplacementTransform(text3, text4))
+ self.animate_secant_slope_group_change(ss_group, target_dx = 0.01, run_time = 5)
+ self.wait(2)
+ self.play(self.camera_frame.set_width,0.2,self.camera_frame.move_to,squareobj,run_time = 2)
+ self.wait()
+ self.play(ShowCreation(text2))
+ self.wait(3)
diff --git a/FSF-2020/calculus/intro-to-calculus/introderivative/derivative3.py b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative3.py
new file mode 100644
index 0000000..ebbacb1
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/introderivative/derivative3.py
@@ -0,0 +1,57 @@
+from manimlib.imports import *
+class derivative3(GraphScene, Scene):
+ def setup(self):
+ Scene.setup(self)
+ #ZoomedScene.setup(self)
+ CONFIG = {
+ "y_max" : 8,
+ "y_min" : 0,
+ "x_max" : 11,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+3*DOWN+6.5*LEFT,
+ "x_labeled_nums": list(range(0,12))[::1],
+ "y_labeled_nums": list(range(0,9))[::1],
+ "x_axis_label":"$t$",
+ "y_axis_label":"$s$",
+ "x_axis_width": 5,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ XTD = self.x_axis_width/(self.x_max - self.x_min)
+ YTD = self.y_axis_height/(self.y_max - self.y_min)
+
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : -(x-2)**2+4, color = GOLD_A, x_min = 0, x_max = 1.5)
+ graph_2 = self.get_graph(lambda x : 1*x+2.25, color = GOLD_A, x_min = 1.5, x_max = 5)
+ graph_3 = self.get_graph(lambda x : 7.25, color = GOLD_A, x_min = 5, x_max = 8)
+ graph_4 = self.get_graph(lambda x : -3.625*x + 36.25, color = GOLD_A, x_min = 8, x_max = 10)
+
+ self.y_max = 5
+ self.x_max = 10
+ self.x_min = 0
+ self.y_min = -5
+ self.x_labeled_nums = list(range(0,11))
+ self.y_labeled_nums = list(range(-5,6))[::1]
+ self.x_axis_label = r"$t$"
+ self.y_axis_label = r"$v$"
+ self.y_tick_frequency = 1
+ self.x_tick_frequency = 1
+ self.graph_origin = ORIGIN+1*RIGHT
+ self.setup_axes()
+ graph_5 = self.get_graph(lambda x : 2*(x-2)+4, color = GREEN_SCREEN, x_min = 0, x_max = 1.5)
+ graph_6 = self.get_graph(lambda x : 3, color = GREEN_SCREEN, x_min = 1.5, x_max = 5)
+ graph_7 = self.get_graph(lambda x : 0, color = GREEN_SCREEN, x_min = 5, x_max = 8)
+ graph_8 = self.get_graph(lambda x : -3.625, color = GREEN_SCREEN, x_min = 8, x_max = 10)
+ line1 = DashedVMobject(Line(self.graph_origin+2.5*RIGHT, self.graph_origin+2.5*RIGHT+1.5*UP))
+ line2 = DashedVMobject(Line(self.graph_origin+4*RIGHT, self.graph_origin+4*RIGHT+1.835*DOWN))
+ self.play(ShowCreation(graph_1), ShowCreation(graph_5), run_time = 3)
+ self.play(ShowCreation(graph_2), ShowCreation(graph_6), run_time = 3)
+ self.add(line1)
+ self.play(ShowCreation(graph_3), ShowCreation(graph_7), run_time = 3)
+ self.add(line2)
+ self.play(ShowCreation(graph_4), ShowCreation(graph_8), run_time = 3)
+ self.wait(3)
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/Test1.py b/FSF-2020/calculus/intro-to-calculus/limit/Test1.py
new file mode 100644
index 0000000..bd7d2a6
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/Test1.py
@@ -0,0 +1,34 @@
+from manimlib.imports import *
+class Test1(GraphScene):
+ CONFIG = {
+ "y_max" : 5,
+ "y_min" : -5,
+ "x_max" : 5,
+ "x_min" : -5,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : BLUE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN,
+ "x_labeled_nums": list(range(-5,6)),
+ "y_labeled_nums": list(range(-5,6)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"${ f }_{ 1 }(x)$"
+ }
+ def construct(self):
+ self.setup_axes()
+ cir1 = Circle(radius = 0.1, color = BLUE)
+ graph_1 = self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = -5, # Domain 1
+ x_max = +1.9
+ )
+ graph_2 =self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = 2.1, # Domain 2
+ x_max = 5
+ )
+ cir1.move_to(np.array([1,2,0]))
+ self.play(ShowCreation(graph_1))
+ self.play(ShowCreation(cir1))
+ self.play(ShowCreation(graph_2))
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/Test2.py b/FSF-2020/calculus/intro-to-calculus/limit/Test2.py
new file mode 100644
index 0000000..0efb565
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/Test2.py
@@ -0,0 +1,26 @@
+from manimlib.imports import *
+class Test2(GraphScene):
+ CONFIG = {
+ "y_max" : 5,
+ "y_min" : -5,
+ "x_max" : 5,
+ "x_min" : -5,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : BLUE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN,
+ "x_labeled_nums": list(range(-5,6)),
+ "y_labeled_nums": list(range(-5,6)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"${ f }_{ 1 }(x)$"
+ }
+ def construct(self):
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : x+2,
+ color = GREEN,
+ x_min = -5, # Domain 1
+ x_max = +5
+ )
+ self.play(ShowCreation(graph_1))
+ self.wait()
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limit1.py b/FSF-2020/calculus/intro-to-calculus/limit/limit1.py
new file mode 100644
index 0000000..fe5cb1e
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limit1.py
@@ -0,0 +1,105 @@
+from manimlib.imports import *
+class limit1(GraphScene,MovingCameraScene):
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
+ CONFIG = {
+ "y_max" : 1,
+ "y_min" : 0,
+ "x_max" : 1,
+ "x_min" : -1,
+ "y_tick_frequency" : 0.2,
+ "x_tick_frequency" : 0.2,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+3*DOWN,
+ "x_labeled_nums": list(range(-1,2)),
+ "y_labeled_nums": list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ XTD = self.x_axis_width/(self.x_max - self.x_min)
+ YTD = self.y_axis_height/(self.y_max - self.y_min)
+
+ dot1 = SmallDot(np.array([0.025,-2.975,0]))
+ dot2 = SmallDot(np.array([-0.025,-2.975,0]))
+ sqr = Square(side_length = 15.0).move_to(np.array([0,-3,0]))
+ brline1 = DashedVMobject(Line(np.array([0.15,-3,0]), np.array([0.15,-2.85,0])))
+ brline2 = DashedVMobject(Line(np.array([0.025,-3,0]), np.array([0.025,-2.975,0])))
+ brline3 = DashedVMobject(Line(np.array([-0.15,-3,0]), np.array([-0.15,-2.85,0])))
+ brline4 = DashedVMobject(Line(np.array([-0.025,-3,0]), np.array([-0.025,-2.975,0])))
+ textdef = TextMobject("")
+ text003 = TextMobject("0.03").move_to(np.array([0.15,-3.05,0])).scale(0.1)
+ textazero1 = TexMobject(r"\approx 0").move_to(np.array([0.04,-3.05,0])).scale(0.1)
+ textazero2 = TexMobject(r"\approx 0").move_to(np.array([-0.04,-3.05,0])).scale(0.1)
+ textm003 = TextMobject("-0.03").move_to(np.array([-0.15,-3.05,0])).scale(0.1)
+ text2 = TextMobject("Let f(x) = |x|. We'll check neighbourhood of origin")
+ text3 = TextMobject("h has to be a very small number greater than 0").move_to(np.array([0,-3.3,0])).scale(0.2)
+ text4 = TextMobject("The point travels through range of neighbourhood").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text5 = TextMobject("let h be equal to 0.03").move_to(np.array([0,-3.3,0])).scale(0.25)
+ text6 = TextMobject("Notice how the point never touches the origin").move_to(np.array([0,-3.3,0])).scale(0.2)
+ text7 = TextMobject("Green line shows the Right hand neighbourhood of origin").move_to(np.array([0,-3.3,0])).scale(0.17)
+ text8 = TextMobject("The point is approaching (0,0) for the values of x which are positive").move_to(np.array([0,-3.3,0])).scale(0.1)
+ text9 = TextMobject("Values of x are tending to 0 from positive side").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text10 = TexMobject(r"\text {Notation for this is }",r"x\rightarrow { 0 }^{ + }").move_to(np.array([0,-3.3,0])).scale(0.25)
+ text11 = TextMobject("Similar case can be made for negative values of x").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text12 = TextMobject("The point is approaching (0,0) for the values of x which are negative").move_to(np.array([0,-3.3,0])).scale(0.1)
+ text13 = TextMobject("Values of x are tending to 0 from negative side").move_to(np.array([0,-3.3,0])).scale(0.19)
+ text14 = TexMobject(r"\text {Notation for this is }",r"x\rightarrow { 0 }^{ - }").move_to(np.array([0,-3.3,0])).scale(0.25)
+
+
+ self.play(FadeIn(text2), run_time = 1.5)
+ self.wait(2.5)
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x : x, color = RED, x_min = 0, x_max = 1)
+ graph_2 = self.get_graph(lambda x : -x, color = RED, x_min = 0, x_max = -1)
+ graph_3 = self.get_graph(lambda x : x,color = RED, x_min = 0.005, x_max = 0.03)
+ graph_4 = self.get_graph(lambda x : x,color = GREEN_SCREEN, x_min = 0.03, x_max = 0.005)
+ graph_5 = self.get_graph(lambda x : -x,color = GREEN_SCREEN, x_min = -0.03, x_max = -0.005)
+ grp1 = VGroup(graph_1,graph_2)
+ grp2 = VGroup(brline2, textazero1)
+ grp3 = VGroup(textazero2, textm003, brline3, brline4)
+ self.play(ShowCreation(grp1))
+ self.add(sqr)
+ self.play(ReplacementTransform(text2, text3))
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr,run_time = 2)
+ self.wait(2.5)
+ self.play(ReplacementTransform(text3, text4), ShowCreation(dot1))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text4, text5), ShowCreation(brline1), ShowCreation(text003))
+ self.wait(2.5)
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot1,graph_3), run_time = 0.5)
+ self.play(MoveAlongPath(dot1,graph_4), run_time = 0.5)
+ self.play(ReplacementTransform(text5, text6), ShowCreation(grp2))
+ self.wait(2)
+ self.play(FadeOut(dot1))
+ self.add(graph_4)
+ self.play(ReplacementTransform(text6, text7))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text7,text8))
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot1,graph_4), run_time = 0.7)
+ self.play(ReplacementTransform(text8, text9))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text9, text10))
+ self.wait(2.5)
+ self.play(ShowCreation(grp3), ReplacementTransform(text10, text11), FadeOut(dot1))
+ self.add(graph_5)
+ for i in range(0,3):
+ self.play(MoveAlongPath(dot2, graph_5), run_time = 0.7)
+ self.play(ReplacementTransform(text11, text12))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text12, text13))
+ self.wait(2.5)
+ self.play(ReplacementTransform(text13, text14))
+ self.wait(2)
+ self.play(FadeOut(dot2), ReplacementTransform(text14, textdef))
+ self.wait(2)
+ self.play(Restore(self.camera_frame))
+
+ self.wait(2.5)
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limit3.py b/FSF-2020/calculus/intro-to-calculus/limit/limit3.py
new file mode 100644
index 0000000..a4f07d7
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limit3.py
@@ -0,0 +1,95 @@
+from manimlib.imports import *
+class limit3(GraphScene, MovingCameraScene):
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
+ CONFIG = {
+ "y_max" : 10,
+ "y_min" : 0,
+ "x_max" : 100,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 10,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+3*DOWN+4*LEFT,
+ "x_labeled_nums": list(range(0,101))[::10],
+ "y_labeled_nums": list(range(0,11)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ XTD = self.x_axis_width/(self.x_max - self.x_min)
+ YTD = self.y_axis_height/(self.y_max - self.y_min)
+ sqr1 = Square(side_length = 15).move_to(np.array([1,0.5,0]))
+ sqr2 = Square(side_length = 15).move_to(np.array([-4,-3,0]))
+
+ textdef = TextMobject("")
+ text20 = TextMobject("f(x) is not defined at x=50").move_to(np.array([1,0.3,0])).scale(0.2)
+ text21 = TexMobject(r"\text {f(x) is not defined in interval }",r" (-\infty ,\quad 1]").move_to(np.array([-4,-3.2,0])).scale(0.18)
+ text22 = TextMobject("1").move_to(np.array([-3.9,-3.05,0])).scale(0.2)
+ text1 = TexMobject(r"\text {Let }" ,r"f\left( x \right) =\begin{cases} \sqrt { x-1 } ,x\in \quad (1,\infty )-50 \end{cases}")
+ text2 = TextMobject("Graph of f(x) is ")
+ text3 = TextMobject("Right hand neighbour of 50 will approximately be 50.000001").move_to(np.array([1,0.3,0])).scale(0.15)
+ text4 = TextMobject("Left hand neighbour of 50 will approximately be 49.999999").move_to(np.array([1,0.3,0])).scale(0.15)
+ text5 = TexMobject(r"\text {Hence R.H.L }", r"=\lim _{ x\rightarrow { 50 }^{ + } }{ \sqrt { 50.000001 - 1 } } \approx 7.000000071").move_to(np.array([1,0.3,0])).scale(0.13)
+ text6 = TexMobject(r"\text{Hence L.H.L }", r" = \lim _{ x\rightarrow { 50 }^{ - } }{ \sqrt { 49.999999-1 } }\approx 6.999999929").move_to(np.array([1,0.3,0])).scale(0.13)
+ text7 = TextMobject("7.000000071").move_to(np.array([1.9,0.25,0])).scale(0.1)
+ text8 = TextMobject("6.999999929").move_to(np.array([0.1,0.25,0])).scale(0.1)
+ text9 = TexMobject(r"6.999999929\quad \approx \quad 7.000000071 \quad \approx 7").move_to(np.array([1,0.25,0])).scale(0.2)
+ text10 = TexMobject(r"\text{Because LHL }" ,r"\approx" ,r"\text{ RHL, Limit exists at x=50 and equals 7").move_to(np.array([1,0.25,0])).scale(0.13)
+ text11 = TextMobject("There is no Left hand neighbour of x=1").move_to(np.array([-4,-3.2,0])).scale(0.22)
+ text12 = TexMobject(r"\therefore\quad \lim _{ x\rightarrow 0 }{ f(x) } \quad =\quad \lim _{ x\rightarrow { 0 }^{ + } }{ f(x) } ").move_to(np.array([-4,-3.2,0])).scale(0.25)
+ text13 = TexMobject(r"\text {R.H.L =}",r" \lim _{ x\rightarrow { 0 }^{ + } }{ \sqrt { 1.000000000001-1 } } \quad \approx 0").move_to(np.array([-4,-3.2,0])).scale(0.13)
+ text14 = TexMobject(r"\therefore \quad \lim _{ x\rightarrow 0 }{ f(x)\quad =\quad 0 }").move_to(np.array([-4,-3.2,0])).scale(0.13)
+ self.camera_frame.save_state()
+ self.play(ShowCreation(text1))
+ self.wait(3)
+ self.play(ReplacementTransform(text1, text2))
+ self.wait()
+ self.play(ReplacementTransform(text2, textdef))
+ self.setup_axes()
+ self.setup()
+ graph_1 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 1, x_max = 49.9)
+ graph_2 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 50.1, x_max = 100)
+ graph_3 = self.get_graph(lambda x : (x-1)**(1/2),color = PINK, x_min = 1.05, x_max = 1.001)
+ dot1 = SmallDot(color = PURPLE_A)
+ cir = Circle(radius = 0.01, color = GREEN_SCREEN).move_to(np.array([1,0.5,0]))
+ grp1 = VGroup(graph_1, graph_2, cir)
+ grp2 = VGroup(text7, text8)
+ self.play(ShowCreation(grp1))
+ self.wait(2)
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr1,run_time = 2)
+ self.wait(1)
+ self.play(ShowCreation(text20))
+ self.wait(2)
+ self.play(ReplacementTransform(text20, text3))
+ self.wait(3)
+ self.play(ReplacementTransform(text3, text5))
+ self.wait(3)
+ self.play(ReplacementTransform(text5, text7), ShowCreation(text4))
+ self.wait(4)
+ self.play(ReplacementTransform(text4, text6))
+ self.wait(3)
+ self.play(ReplacementTransform(text6, text8))
+ self.wait(1.5)
+ self.play(ReplacementTransform(grp2, text9))
+ self.wait(1.5)
+ self.play(ReplacementTransform(text9, text10))
+ self.wait(3)
+ self.play(self.camera_frame.set_width,2.25,self.camera_frame.move_to,sqr2,run_time = 2)
+ self.play(ShowCreation(text21), ShowCreation(text22))
+ self.play(MoveAlongPath(dot1, graph_3), run_time = 3)
+ self.wait(3)
+ self.play(ReplacementTransform(text21, text11))
+ self.wait(3)
+ self.play(ReplacementTransform(text11, text12))
+ self.wait(3)
+ self.play(ReplacementTransform(text12, text13))
+ self.wait(2)
+ self.play(ReplacementTransform(text13, text14))
+ self.wait(3)
+ self.play(ReplacementTransform(text14, textdef))
+ self.wait(2)
diff --git a/FSF-2020/calculus/intro-to-calculus/limit/limitdef.py b/FSF-2020/calculus/intro-to-calculus/limit/limitdef.py
new file mode 100644
index 0000000..15f2845
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/limit/limitdef.py
@@ -0,0 +1,73 @@
+from manimlib.imports import *
+class limitdef(GraphScene, Scene):
+ CONFIG = {
+ "y_max" : 5,
+ "y_min" : 0,
+ "x_max" : 5,
+ "x_min" : -5,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+2*DOWN,
+ "x_labeled_nums": None,#list(range(-1,2)),
+ "y_labeled_nums": None,#list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ Ldot = MediumDot(self.graph_origin+2.1*UP).set_color(GREEN_SCREEN)
+ adot = MediumDot(self.graph_origin+3*RIGHT).set_color(PINK)
+ epline1 = DashedVMobject(Line(self.graph_origin+1*LEFT+2.5*UP, self.graph_origin+4*RIGHT+2.5*UP))
+ epline2 = DashedVMobject(Line(self.graph_origin+1*LEFT+1.7*UP, self.graph_origin+4*RIGHT+1.7*UP))
+ epline3 = DashedVMobject(Line(self.graph_origin+3.5*RIGHT+0.5*DOWN, self.graph_origin+3.5*RIGHT+2.5*UP))
+ epline4 = DashedVMobject(Line(self.graph_origin+2.5*RIGHT+0.5*DOWN, self.graph_origin+2.5*RIGHT+2.5*UP))
+ Lline = Line(self.graph_origin+2.1*UP, self.graph_origin+3*RIGHT+2.1*UP).set_color(GREEN_SCREEN)
+ aline = Line(self.graph_origin+3*RIGHT, self.graph_origin+3*RIGHT+2.1*UP).set_color(PINK)
+ vertical_rectangle = Rectangle(width = 1, height = 0.8, color = PINK, fill_opacity = 0.5, fill_color = LIGHT_PINK).move_to(self.graph_origin+3*RIGHT+2.1*UP)
+ horizontal_rectangle = Rectangle(width = 1, height = 0.8, color = GREEN_SCREEN, fill_opacity = 0.5, fill_color = GREEN).move_to(self.graph_origin+3*RIGHT+2.1*UP)
+ vec1 = Line(self.graph_origin+2.5*UP, self.graph_origin+2.1*UP)
+ vec2 = Line(self.graph_origin+2.1*UP, self.graph_origin+1.7*UP)
+ vec3 = Line(self.graph_origin+2.5*RIGHT, self.graph_origin+3*RIGHT)
+ vec4 = Line(self.graph_origin+3*RIGHT, self.graph_origin+3.5*RIGHT)
+ brace1 = Brace(vec1, LEFT)
+ brace2 = Brace(vec2, LEFT)
+ brace3 = Brace(vec3, DOWN)
+ brace4 = Brace(vec4, DOWN)
+ br1text = brace1.get_text(r"$\epsilon$").next_to(brace1, LEFT)
+ br2text = brace2.get_text(r"$\epsilon$").next_to(brace2, LEFT)
+ br3text = brace3.get_text(r"$\delta$").next_to(brace3, DOWN)
+ br4text = brace4.get_text(r"$\delta$").next_to(brace4, DOWN)
+ epgrp = VGroup(epline1, epline2, Ldot, adot, Lline, aline, epline4, epline3)
+ recgrp = VGroup(vertical_rectangle, horizontal_rectangle)
+ epbrgrp = VGroup(brace1, brace2, br1text, br2text)
+ delbrgrp = VGroup(brace3, brace4, br3text, br4text)
+ self.setup_axes()
+ graph_1 = self.get_graph(lambda x :0.1*(x+1)**2 +0.5, x_min = -5, x_max = 5)
+ graph_2 = self.get_graph(lambda x : 0.1*(x+1)**2 +0.5, x_min = 2.5, x_max = 3.5, color = YELLOW_A)
+ graph_2.shift(2.5*LEFT)
+ self.play(ShowCreation(graph_1))
+ self.wait(2)
+ self.play(ShowCreation(epgrp), ShowCreation(horizontal_rectangle), ShowCreation(vertical_rectangle))
+ self.wait(2)
+ self.play(ShowCreation(epbrgrp))
+ self.play(ShowCreation(delbrgrp))
+ self.wait(2)
+ self.play(FadeOut(recgrp))
+ self.wait(2)
+ for i in range(0,1):
+ self.play(ApplyMethod(graph_2.shift, 2.5*RIGHT))
+ self.wait(1)
+ self.play(ApplyMethod(graph_2.shift, 1.7*DOWN))
+ self.play(ApplyMethod(graph_2.shift, 1.7*UP))
+ self.wait(1)
+ self.play(ApplyMethod(graph_2.shift, 2.5*LEFT))
+ self.play(ApplyMethod(graph_2.shift, 2.5*RIGHT))
+ self.wait(1)
+ self.play(ApplyMethod(graph_2.shift, 1.7*DOWN))
+ self.play(ApplyMethod(graph_2.shift, 1.7*UP))
+ self.wait(1)
+ self.play(ApplyMethod(graph_2.shift, 2.5*LEFT))
+ self.wait()
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/README.md b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/README.md
new file mode 100644
index 0000000..a9ad0bb
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/README.md
@@ -0,0 +1,18 @@
+rierect1.gif
+![rierect1](https://user-images.githubusercontent.com/61246381/87141790-3ad90800-c2c1-11ea-86e4-af05cb93fa2d.gif)
+
+
+rierect2.gif
+![rierect2](https://user-images.githubusercontent.com/61246381/87141870-5ba15d80-c2c1-11ea-9307-40acc2884d77.gif)
+
+
+rierect3.gif
+![rierect3](https://user-images.githubusercontent.com/61246381/87141949-6e1b9700-c2c1-11ea-9433-4f6be752aa55.gif)
+
+
+RiemannRectanglesAnimation.
+![RiemannRectanglesAnimation](https://user-images.githubusercontent.com/61246381/87142531-4a0c8580-c2c2-11ea-8f5e-9e854eae6eec.gif)
+
+
+mimi.gif
+![mimi](https://user-images.githubusercontent.com/61246381/87142127-b3d85f80-c2c1-11ea-864e-627e41d87ea2.gif)
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/RiemannRectanglesAnimation.py b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/RiemannRectanglesAnimation.py
new file mode 100644
index 0000000..a278c9d
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/RiemannRectanglesAnimation.py
@@ -0,0 +1,64 @@
+from manimlib.imports import *
+class RiemannRectanglesAnimation(GraphScene):
+ CONFIG = {
+ "y_max": 5,
+ "x_max": 6,
+ "x_min": 0,
+ "y_min": 0,
+ "x_axis_width": 5,
+ "y_axis_height": 5,
+ "init_dx":0.5,
+ "graph_origin": ORIGIN+2*DOWN+6*LEFT,
+ }
+ def construct(self):
+ self.setup_axes()
+ def func(x):
+ return 0.1*(x)*(x-3)*(x-7)+3
+
+ graph1=self.get_graph(func,x_min=0,x_max=6)
+ kwargs = {
+ "x_min" : 1.5,
+ "x_max" : 5.5,
+ "fill_opacity" : 0.75,
+ "stroke_width" : 0.25,
+ "input_sample_type": "right",
+ }
+ flat_rectangles1 = self.get_riemann_rectangles(self.get_graph(lambda x : 0),dx=self.init_dx,start_color=invert_color(PURPLE),end_color=invert_color(ORANGE),**kwargs)
+ riemann_rectangles_list1 = self.get_riemann_rectangles_list(graph1,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs)
+ self.add(graph1)
+ self.graph_origin = ORIGIN+2*DOWN+1*RIGHT
+ self.setup_axes()
+ graph2=self.get_graph(func,x_min=0,x_max=6)
+ kwargs = {
+ "x_min" : 1.5,
+ "x_max" : 5.5,
+ "fill_opacity" : 0.75,
+ "stroke_width" : 0.25,
+ "input_sample_type": "left",
+ }
+ flat_rectangles2 = self.get_riemann_rectangles(self.get_graph(lambda x : 0),dx=self.init_dx,start_color=invert_color(PURPLE),end_color=invert_color(ORANGE),**kwargs)
+ riemann_rectangles_list2 = self.get_riemann_rectangles_list(graph2,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs)
+ self.add(graph2)
+ text1 = TextMobject("Left Riemann sum").move_to(np.array([-3,-2.5,0]))
+ text2 = TextMobject("Right Riemann sum").move_to(np.array([4,-2.5,0]))
+ grp1 = VGroup(text1, text2)
+ text3 = TexMobject(r"n \rightarrow \infty").move_to(np.array([0, -3, 0]))
+ text4 = TextMobject("Left and Right Riemann sums are equal").move_to(np.array([0, -3, 0]))
+ text5 = TextMobject("Hence function is Riemann integrable and value of integral equals area covered").move_to(np.array([0, -3, 0])).scale(0.6)
+ grp2 = VGroup(text1, text2, text3)
+ # Show Riemann rectangles
+ self.play(ReplacementTransform(flat_rectangles1,riemann_rectangles_list1[0]), ReplacementTransform(flat_rectangles2, riemann_rectangles_list2[0]))
+ self.wait()
+ self.play(ShowCreation(grp1))
+ for r in range(1,len(riemann_rectangles_list1)-5):
+ self.transform_between_riemann_rects(riemann_rectangles_list1[r-1],riemann_rectangles_list1[r],replace_mobject_with_target_in_scene = True,)
+ self.transform_between_riemann_rects(riemann_rectangles_list2[r-1],riemann_rectangles_list2[r],replace_mobject_with_target_in_scene = True,)
+ self.play(ShowCreation(text3))
+ for r in range(len(riemann_rectangles_list1)-5,len(riemann_rectangles_list1)):
+ self.transform_between_riemann_rects(riemann_rectangles_list1[r-1],riemann_rectangles_list1[r],replace_mobject_with_target_in_scene = True,)
+ self.transform_between_riemann_rects(riemann_rectangles_list2[r-1],riemann_rectangles_list2[r],replace_mobject_with_target_in_scene = True,)
+ self.wait(2)
+ self.play(ReplacementTransform(grp2, text4))
+ self.wait(2)
+ self.play(ReplacementTransform(text4, text5))
+ self.wait(4)
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/mimi.py b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/mimi.py
new file mode 100644
index 0000000..2471c87
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/mimi.py
@@ -0,0 +1,53 @@
+class mimi(GraphScene):
+ CONFIG = {
+ "y_max": 5,
+ "x_max": 6,
+ "x_min": 0,
+ "y_min": 0,
+ "x_axis_width": 5,
+ "y_axis_height": 5,
+ "init_dx":0.5,
+ "graph_origin": ORIGIN+2*DOWN+6*LEFT,
+ }
+ def construct(self):
+ self.setup_axes()
+ def func(x):
+ return 0.1*(x)*(x-3)*(x-7)+3
+
+ graph=self.get_graph(func,x_min=0,x_max=6)
+ kwargs = {
+ "x_min" : 1.5,
+ "x_max" : 5.5,
+ "fill_opacity" : 0.5,
+ "stroke_width" : 0.25,
+ }
+ flat_rectangles = self.get_riemann_rectangles(self.get_graph(lambda x : 0),dx=self.init_dx,**kwargs)
+ riemann_rectangles_list = self.get_riemann_rectangles_list(graph,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs, input_sample_type = "right")
+ riemann_rectangles_list1 = self.get_riemann_rectangles_list(graph,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs, input_sample_type = "left")
+ self.add(graph)
+ self.play(ReplacementTransform(flat_rectangles,riemann_rectangles_list[0]), ReplacementTransform(flat_rectangles,riemann_rectangles_list1[0]))
+ #self.play(ReplacementTransform(flat_rectangles,riemann_rectangles_list1[0]))
+ self.wait(2)
+ kwargs = {
+ "x_min" : 3,
+ "x_max" : 3.5,
+ "fill_opacity" : 0.5,
+ "stroke_width" : 0.25,
+ }
+ riemann_rectangles_list2 = self.get_riemann_rectangles_list(graph,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs, input_sample_type = "right")
+ riemann_rectangles_list3 = self.get_riemann_rectangles_list(graph,8,max_dx=self.init_dx,power_base=2,start_color=PURPLE,end_color=ORANGE,**kwargs, input_sample_type = "left")
+ #self.play(FadeOut(riemann_rectangles_list[0]), FadeOut(riemann_rectangles_list1[0]))
+ self.play(ReplacementTransform(flat_rectangles,riemann_rectangles_list2[0]), ReplacementTransform(flat_rectangles,riemann_rectangles_list3[0]), FadeOut(riemann_rectangles_list[0]), FadeOut(riemann_rectangles_list1[0]))
+ minlim = self.get_vertical_line_to_graph(3,graph,DashedLine)
+ maxlim = self.get_vertical_line_to_graph(3.5,graph,DashedLine)
+ line2 = Line(self.graph_origin+2.5*RIGHT, self.graph_origin+2.9*RIGHT)
+ brace1 = Brace(minlim, LEFT)
+ brace2 = Brace(line2, DOWN)
+ brace3 = Brace(maxlim, RIGHT)
+ br1text = brace1.get_text(r"${M}_{i}$").next_to(brace1, LEFT)
+ br2text = brace2.get_text(r"$\Delta x$").next_to(brace2, DOWN)
+ br3text = brace3.get_text(r"${m}_{i}$").next_to(brace3, RIGHT)
+ text1 = TexMobject(r"\Delta x=(b-a)/n").shift(2*RIGHT)
+ grp3 = VGroup(br1text, br2text, br3text, brace1, brace2, brace3, text1)
+ self.play(ShowCreation(grp3))
+ self.wait(5)
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect1.py b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect1.py
new file mode 100644
index 0000000..748d766
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect1.py
@@ -0,0 +1,31 @@
+from manimlib.imports import *
+class rierect1(GraphScene):
+ CONFIG = {
+ "y_max" : 6,
+ "y_min" : 0,
+ "x_max" : 4,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+2*DOWN+4*LEFT,
+ "x_labeled_nums": None,#list(range(-1,2)),
+ "y_labeled_nums": None,#list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ self.setup_axes()
+ graph1 = self.get_graph(lambda x : (0.1*(1.5*x+1)**2 +0.5), x_min = 0, x_max = 4)
+ minlim = self.get_vertical_line_to_graph(1,graph1,DashedLine, color = PINK)
+ maxlim = self.get_vertical_line_to_graph(3,graph1,DashedLine,color = PINK)
+ x1 = TexMobject(r"{x}_{1}").next_to(minlim, DOWN)
+ x2 = TexMobject(r"{x}_{2}").next_to(maxlim, DOWN)
+ rie1 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.4, input_sample_type = "left", fill_opacity = 1, start_color = YELLOW, end_color = YELLOW)
+ #rie2 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.01, input_sample_type = "right", fill_opacity = 0.5, start_color = PINK, end_color = LIGHT_PINK)
+ group = VGroup(graph1, minlim, maxlim, x1, x2, rie1)
+ self.play(ShowCreation(group))
+ self.wait(1.5)
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect2.py b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect2.py
new file mode 100644
index 0000000..e300250
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect2.py
@@ -0,0 +1,31 @@
+from manimlib.imports import *
+class rierect2(GraphScene):
+ CONFIG = {
+ "y_max" : 6,
+ "y_min" : 0,
+ "x_max" : 4,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+2*DOWN+4*LEFT,
+ "x_labeled_nums": None,#list(range(-1,2)),
+ "y_labeled_nums": None,#list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ self.setup_axes()
+ graph1 = self.get_graph(lambda x : (0.1*(1.5*x+1)**2 +0.5), x_min = 0, x_max = 4)
+ minlim = self.get_vertical_line_to_graph(1,graph1,DashedLine, color = PINK)
+ maxlim = self.get_vertical_line_to_graph(3,graph1,DashedLine,color = PINK)
+ x1 = TexMobject(r"{x}_{1}").next_to(minlim, DOWN)
+ x2 = TexMobject(r"{x}_{2}").next_to(maxlim, DOWN)
+ rie1 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.1, input_sample_type = "left", fill_opacity = 1, start_color = YELLOW, end_color = YELLOW)
+ #rie2 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.01, input_sample_type = "right", fill_opacity = 0.5, start_color = PINK, end_color = LIGHT_PINK)
+ group = VGroup(graph1, minlim, maxlim, x1, x2, rie1)
+ self.play(ShowCreation(group))
+ self.wait(1.5)
diff --git a/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect3.py b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect3.py
new file mode 100644
index 0000000..3542358
--- /dev/null
+++ b/FSF-2020/calculus/intro-to-calculus/riemannintegrals/rierect3.py
@@ -0,0 +1,31 @@
+from manimlib.imports import *
+class rierect3(GraphScene):
+ CONFIG = {
+ "y_max" : 6,
+ "y_min" : 0,
+ "x_max" : 4,
+ "x_min" : 0,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "axes_color" : WHITE,
+ "num_graph_anchor_points": 3000, #this is the number of points that graph manim
+ "graph_origin" : ORIGIN+2*DOWN+4*LEFT,
+ "x_labeled_nums": None,#list(range(-1,2)),
+ "y_labeled_nums": None,#list(range(0,2)),
+ "x_axis_label":"$x$",
+ "y_axis_label":"$f(x)$",
+ "x_axis_width": 10,
+ "y_axis_height": 5,
+ }
+ def construct(self):
+ self.setup_axes()
+ graph1 = self.get_graph(lambda x : (0.1*(1.5*x+1)**2 +0.5), x_min = 0, x_max = 4)
+ minlim = self.get_vertical_line_to_graph(1,graph1,DashedLine, color = PINK)
+ maxlim = self.get_vertical_line_to_graph(3,graph1,DashedLine,color = PINK)
+ x1 = TexMobject(r"{x}_{1}").next_to(minlim, DOWN)
+ x2 = TexMobject(r"{x}_{2}").next_to(maxlim, DOWN)
+ rie1 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.01, input_sample_type = "left", fill_opacity = 1, start_color = YELLOW, end_color = YELLOW)
+ #rie2 = self.get_riemann_rectangles(graph1, x_min = 1, x_max = 3, dx = 0.01, input_sample_type = "right", fill_opacity = 0.5, start_color = PINK, end_color = LIGHT_PINK)
+ group = VGroup(graph1, minlim, maxlim, x1, x2, rie1)
+ self.play(ShowCreation(group))
+ self.wait(1.5)
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/README.md b/FSF-2020/calculus/series-and-transformations/Fourier Transform/README.md
index c5d8389..2fa4e04 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/README.md
@@ -7,9 +7,12 @@
### Applying the same on Graphs
![GIF3](gifs/file2b.gif)
-### Fourier series for non-periodic functions
+### Fourier series for non-periodic functions-a
![GIF4](gifs/file3.gif)
+### Fourier series for non-periodic functions-b
+![GIF4a](gifs/file7.gif)
+
### Fourier Series of Square pulse
![GIF5](gifs/file4.gif)
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file3.gif b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file3.gif
index 533368b..de94810 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file3.gif
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file3.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file6.gif b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file6.gif
new file mode 100644
index 0000000..de94810
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file6.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file7.gif b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file7.gif
new file mode 100644
index 0000000..ab4eed8
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/gifs/file7.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
index 39db6d8..fdb8719 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video1_DividingAToneIntoItsConstituents.py
@@ -1,13 +1,6 @@
from manimlib.imports import*
import numpy as np
-# def func(t,n):
-# s=0
-# for i in range(1,n+1):
-# s+=((-2/(i*np.pi))*((-1)**i)*np.sin(2*np.pi*i*t))
-# return s
-
-
class intro(GraphScene):
CONFIG = {
"x_min": -3,
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
index 8f3706b..c87e58e 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video2_ColorsAnalogyForFourierSeries.py
@@ -101,27 +101,27 @@ class divideColors(GraphScene):
self.get_graph(lambda x:func(x,6,24),x_min=-1,x_max=1).set_color([DARK_BROWN,RED_C]),
self.get_graph(lambda x:func(x,7,24),x_min=-1,x_max=1).set_color(DARK_BROWN)
]
- #self.y_axis_label="$\\frac { 2 }{ \pi } sin(2\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph1=self.get_graph(lambda x:func(x,1,1),x_min=-1,x_max=1,color=GREEN_E)
- #self.y_axis_label="$\\frac { -1 }{ \pi } sin(4\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph2=self.get_graph(lambda x:func(x,2,2),x_min=-1,x_max=1,color=GREEN_C)
- #self.y_axis_label="$\\frac { 2 }{ 3\pi } sin(6\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph3=self.get_graph(lambda x:func(x,3,3),x_min=-1,x_max=1,color=GOLD_E)
- #self.y_axis_label="$\\frac { -1 }{ 2\pi } sin(8\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph4=self.get_graph(lambda x:func(x,4,4),x_min=-1,x_max=1,color=GOLD_C)
- #self.y_axis_label="$\\frac { 2 }{ 5\pi } sin(10\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph5=self.get_graph(lambda x:func(x,5,5),x_min=-1,x_max=1,color=ORANGE)
- #self.y_axis_label="$\\frac { -1 }{ 3\pi } sin(12\pi t)$"
+
self.setup_axes(scalee=1)
axes.append(self.axes)
graph6=self.get_graph(lambda x:func(x,6,6),x_min=-1,x_max=1,color=RED_C)
@@ -132,9 +132,7 @@ class divideColors(GraphScene):
self.play(ShowCreation(graphs[0]))
self.play(Write(coeff[0]))
self.wait(1)
- # self.play(ApplyMethod(axes[0].scale,0.4),ApplyMethod(graphs[0].scale,0.4),ApplyMethod(axes[1].scale,0.4),
- # ApplyMethod(axes[2].scale,0.4),ApplyMethod(axes[3].scale,0.4),
- # ApplyMethod(axes[4].scale,0.4),ApplyMethod(axes[5].scale,0.4),ApplyMethod(axes[6].scale,0.4))
+
self.play(ReplacementTransform(graphs[0],graphs[1]),ApplyMethod(groups[0].shift,4*LEFT+UP),ReplacementTransform(coeff[0],coeff[2]),FadeIn(coeff[1]))
self.play(ReplacementTransform(graphs[1],graphs[2]),ApplyMethod(groups[1].shift,4*RIGHT+UP),ReplacementTransform(coeff[2],coeff[4]),FadeIn(coeff[3]))
self.play(ReplacementTransform(graphs[2],graphs[3]),ApplyMethod(groups[2].shift,4*LEFT+2*DOWN),ReplacementTransform(coeff[4],coeff[6]),FadeIn(coeff[5]))
@@ -142,24 +140,7 @@ class divideColors(GraphScene):
self.play(ReplacementTransform(graphs[4],graphs[5]),ApplyMethod(groups[4].shift,2.5*UP),ReplacementTransform(coeff[8],coeff[10]),FadeIn(coeff[9]))
self.play(ReplacementTransform(graphs[5],graphs[6]),ApplyMethod(groups[5].shift,2.5*DOWN),ReplacementTransform(coeff[10],coeff[12]),FadeIn(coeff[11]))
- # self.play(ReplacementTransform(graphs[0],graphs[1]),ApplyMethod(groups[0].shift,3*LEFT))
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
- # self.play(ReplacementTransform(graphs[0],graphs[1]),)
-
-
+
self.wait(2)
- # self.play(ReplacementTransform(function,const))
- # self.play(ShowCreation(sinx),ShowCreation(cosx))
- # self.play(ShowCreation(sin2x),ShowCreation(cos2x))
- # self.play(ShowCreation(sin3x),ShowCreation(cos3x))
- # self.play(ShowCreation(sin4x),ShowCreation(cos4x))
- # sintext=TextMobject("Infinite","sines").shift(5*RIGHT).set_color_by_tex_to_color_map({"Infinite":[YELLOW,RED],"sines":BLUE})
- # costext=TextMobject("Infinite","cosines").shift(5*LEFT).set_color_by_tex_to_color_map({"Infinite":[YELLOW,RED],"cosines":BLUE})
- # sintext.scale(0.6)
- # costext.scale(0.6)
- # self.play(FadeIn(sintext),FadeIn(costext))
- # self.wait(2) \ No newline at end of file
+
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
index f23e54f..d35f8bf 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video3_seriesVSTransform.py
@@ -1,7 +1,7 @@
from manimlib.imports import *
import numpy as np
-class compare(GraphScene):
+class compare(GraphScene,MovingCameraScene):
CONFIG = {
"x_min": -3,
"x_max": 3,
@@ -14,6 +14,9 @@ class compare(GraphScene):
"exclude_zero_label": True,
"x_labeled_nums": range(-2, 3, 1),
}
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
def returnPairLines(self,left,right,y_each_unit):
lineLeft=DashedLine(start=(0,5*y_each_unit,0),end=(0,-5*y_each_unit,0)).shift(left)
lineRight=DashedLine(start=(0,5*y_each_unit,0),end=(0,-5*y_each_unit,0)).shift(right)
@@ -58,7 +61,7 @@ class compare(GraphScene):
self.graph_origin=3.5*RIGHT
self.y_axis_label="$\\frac { { l }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ \infty }{ \\frac { 2{ (-1) }^{ n }{ l }^{ 2 }cos(\\frac { n\pi x }{ l } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } }$"
self.setup_axes(animate=True,scalee=1)
- axes.append(self.axes)
+ axes.append(self.axes)
coeffResult=[
TextMobject("$\\frac { { 1 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 1 }{ \\frac { 2{ (-1) }^{ n }{ 1 }^{ 2 }cos(\\frac { n\pi x }{ 1 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+UP).set_color(YELLOW),
TextMobject("$\\frac { { 1 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 3 }{ \\frac { 2{ (-1) }^{ n }{ 1 }^{ 2 }cos(\\frac { n\pi x }{ 1 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+UP).set_color(YELLOW),
@@ -77,7 +80,13 @@ class compare(GraphScene):
result1g=self.returnPartResult(1,13)
self.play(ApplyMethod(partFunction1.shift,0.2*UP))
self.wait(0.5)
+
self.play(ReplacementTransform(partFunction1,result1a),Write(coeffResult[0]))
+ self.play(FadeOut(axes[0]),FadeOut(left),FadeOut(right),FadeOut(function))
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width, 5,self.camera_frame.move_to, 3.5*RIGHT)
+
+
self.play(ReplacementTransform(result1a,result1b),ReplacementTransform(coeffResult[0],coeffResult[1]))
self.play(ReplacementTransform(result1b,result1c),ReplacementTransform(coeffResult[1],coeffResult[2]))
self.play(ReplacementTransform(result1c,result1d),ReplacementTransform(coeffResult[2],coeffResult[3]))
@@ -85,6 +94,9 @@ class compare(GraphScene):
self.play(ReplacementTransform(result1e,result1f),ReplacementTransform(coeffResult[4],coeffResult[5]))
self.play(ReplacementTransform(result1f,result1g),ReplacementTransform(coeffResult[5],coeffResult[6]))
+ self.wait(0.5)
+ self.play(self.camera_frame.set_width, 14,self.camera_frame.move_to, 0)
+
text4=TextMobject("Here the","obtained function","will always be","periodic","with period equal to the chosen interval").scale(0.4).shift(3.3*DOWN).set_color_by_tex_to_color_map({"obtained function":YELLOW,"periodic":RED})
self.play(Write(text4))
@@ -93,6 +105,7 @@ class compare(GraphScene):
self.play(FadeOut(text4))
text5=TextMobject("As we","increase","the","interval of $x$,").scale(0.5).shift(3*DOWN).set_color_by_tex_to_color_map({"increase":RED,"interval of $x$,":YELLOW})
text6=TextMobject("We get","approximation","for","higher intervals!").scale(0.5).shift(3.5*DOWN).set_color_by_tex_to_color_map({"approximation":GREEN,"higher intervals!":YELLOW})
+ self.play(FadeIn(axes[0]),FadeIn(left),FadeIn(right),FadeIn(function))
self.play(Write(text5))
self.play(Write(text6))
result2=self.returnPartResult(1.5,20)
@@ -101,10 +114,10 @@ class compare(GraphScene):
result5=self.returnPartResult(3,20)
finalCoeff=coeffResult[6]
coeffResult=[
- TextMobject("$\\frac { { 1.5 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 1.5 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } }$").scale(0.3).shift(4.5*RIGHT+1.5*UP).set_color(YELLOW),
- TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP).set_color(YELLOW),
- TextMobject("$\\frac { { 2.5 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2.5 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP).set_color(YELLOW),
- TextMobject("$\\frac { { 3 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 3 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP).set_color(YELLOW),
+ TextMobject("$\\frac { { 1.5 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 1.5 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } }$").scale(0.4).shift(5*RIGHT+1.5*UP).set_color(YELLOW),
+ TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.4).shift(5*RIGHT+1.5*UP).set_color(YELLOW),
+ TextMobject("$\\frac { { 2.5 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2.5 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.4).shift(5*RIGHT+2.2*UP).set_color(YELLOW),
+ TextMobject("$\\frac { { 3 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 3 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.4).shift(5*RIGHT+2.2*UP).set_color(YELLOW),
]
self.play(ApplyMethod(left.shift,LEFT*x_each_unit*0.5),ApplyMethod(right.shift,RIGHT*x_each_unit*0.5),ReplacementTransform(result1g,result2),ReplacementTransform(finalCoeff,coeffResult[0]))
self.play(ApplyMethod(left.shift,LEFT*x_each_unit*0.5),ApplyMethod(right.shift,RIGHT*x_each_unit*0.5),ReplacementTransform(result2,result3),ReplacementTransform(coeffResult[0],coeffResult[1]))
@@ -112,22 +125,5 @@ class compare(GraphScene):
self.play(ApplyMethod(left.shift,LEFT*x_each_unit*0.5),ApplyMethod(right.shift,RIGHT*x_each_unit*0.5),ReplacementTransform(result4,result5),ReplacementTransform(coeffResult[2],coeffResult[3]))
- # coeffResult=[
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 1 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } }$").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 4 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 10 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # TextMobject("$\\frac { { 2 }^{ 2 } }{ 6 } +\sum _{ n=1 }^{ 20 }{ \\frac { 2{ (-1) }^{ n }{ 2 }^{ 2 }cos(\\frac { n\pi x }{ 2 } ) }{ { \pi }^{ 2 }{ n }^{ 2 } } } $").scale(0.3).shift(4.5*RIGHT+1.5*UP),
- # ]
- # result2a=self.returnPartResult(2,1)
- # result2b=self.returnPartResult(2,4)
- # result2c=self.returnPartResult(2,10)
- # result2d=self.returnPartResult(2,20)
-
- # self.play(ReplacementTransform(partFunction2,result2a),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2a,result2b),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2b,result2c),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.play(ReplacementTransform(result2c,result2d),ReplacementTransform(coeffResult[0],coeffResult[1]))
- # self.wait(0.5)
-
- self.wait(2) \ No newline at end of file
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
index 5d33fbe..fdf4bb3 100644
--- a/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
+++ b/FSF-2020/calculus/series-and-transformations/Fourier Transform/video4_FourierSeriesOfSquarePulse.py
@@ -33,9 +33,9 @@ class fourierSeries(GraphScene,MovingCameraScene):
x_each_unit = self.x_axis_width / (self.x_max - self.x_min)
y_each_unit = self.y_axis_height / (self.y_max - self.y_min)
- equation=TextMobject("$f(x)=\\frac { 4 }{ \pi } \sum _{ k=1,3,5.. }^{ \infty }{ \\frac { 1 }{ k } \sin { 2\pi kx } }$").shift(5*RIGHT+3*UP).set_color(RED).scale(0.4)
+ equation=TextMobject("$f(x)=\\frac { 4 }{ \pi } \sum _{ k=1,3,5.. }^{ \infty }{ \\frac { 1 }{ k } \sin { 2\pi kx } }$").shift(5*RIGHT+3*UP).set_color(RED).scale(0.5)
self.add(equation)
- self.setup_axes(animate=True)
+ self.setup_axes(animate=True,scalee=1)
line1=Line(start=(-x_each_unit,y_each_unit,0),end=(-(1/2)*x_each_unit,y_each_unit,0),color=RED)
line2=Line(start=(-(1/2)*x_each_unit,y_each_unit,0),end=(-(1/2)*x_each_unit,-y_each_unit,0),color=RED)
line3=Line(start=(-(1/2)*x_each_unit,-y_each_unit,0),end=(0,-y_each_unit,0),color=RED)
@@ -87,6 +87,11 @@ class fourierSeries(GraphScene,MovingCameraScene):
self.wait(1)
self.camera_frame.save_state()
self.play(self.camera_frame.set_width, 2.25,self.camera_frame.move_to, y_each_unit*UP+RIGHT*x_each_unit*0.3)
- self.wait(1)
- self.play(self.camera_frame.set_width,14,self.camera_frame.move_to,0)
+ circleMark=Circle(radius=0.1,color=GREEN).shift(x_each_unit*RIGHT*0.47+UP*y_each_unit*1.1)
+ text=TextMobject("Gibbs","phenomenon").set_color_by_tex_to_color_map({"Gibbs":BLUE,"phenomenon":YELLOW}).scale(0.1).shift(RIGHT*x_each_unit*0.65+UP*y_each_unit*1.1)
+ self.wait(0.7)
+ self.play(ShowCreation(circleMark))
+ self.play(Write(text))
+ self.wait(0.5)
+ self.play(self.camera_frame.set_width,14,self.camera_frame.move_to,0,FadeOut(circleMark),FadeOut(text))
self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/README.md b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
index 6885837..2fd400d 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -11,4 +11,4 @@
![GIF3](gifs/file3_radius_and_intervalOfConvergence.gif)
#### Uniform Convergence
-![GIF4](gifs/file4_UniformConvergence.gif)
+![GIF4](gifs/file4a_UniformConvergence.gif)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4a_UniformConvergence.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4a_UniformConvergence.gif
new file mode 100644
index 0000000..e284b83
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4a_UniformConvergence.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
index 19b8b8b..8680792 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_of_a_function.py
@@ -69,10 +69,7 @@ class graphScene(GraphScene):
eqText[i].scale(0.6)
eqText[i].set_color(BLUE)
eqText[i].shift(ORIGIN+UP*2*y_each_unit+RIGHT*3.3*x_each_unit)
- # eqTextTerm=TextMobject("And so on..!")
- # eqTextTerm.set_color(BLUE)
- # eqTextTerm.scale(0.6)
- # eqTextTerm.shift(ORIGIN+UP*2*y_each_unit+3*RIGHT*x_each_unit)
+
equation1 = self.get_graph(lambda x : 1,color = RED,x_min = -8,x_max=8)
equation2 = self.get_graph(lambda x : 1-math.pow(x,2),color = RED,x_min = -1.7,x_max=1.7)
equation3 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4),color = RED,x_min = -1.6,x_max=1.6)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
index f35fea8..af4bdea 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video3_radius_and_intervalOfConvergence.py
@@ -105,9 +105,4 @@ class graphScene(GraphScene,MovingCameraScene):
self.wait(1)
self.play(self.camera_frame.set_width,14)
self.wait(1.3)
- # self.camera_frame.save_state()
- # self.camera_frame.set_width(5.5)
- # self.play(self.camera_frame.move_to, ORIGIN)
- # self.wait(1)
- # self.camera_frame.set_width(14)
- # self.wait(1.5)
+
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
index 1f3e26c..b75da59 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video4_UniformConvergence.py
@@ -3,19 +3,15 @@ import math
class uniformlyConvergent(Scene):
def construct(self):
- #introText1=TextMobject("Again consider the","above","example")
introText2=TextMobject("Let","$g(x)=\\frac { 1 }{ 1+{ x }^{ 2 } }$","and","x=0.5 $\in$(-1,1)")
introText3=TextMobject("Lets analyse..","!")
- #introText1.scale(0.8)
+
introText2.scale(0.7)
introText3.scale(0.9)
introText3.shift(DOWN)
- #introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+
introText2.set_color_by_tex_to_color_map({"$g(x)=\\frac { 1 }{ 1+{ x }^{ 2 } }$":BLUE,"x=0.5 $\in$(-1,1)":YELLOW})
introText3.set_color_by_tex_to_color_map({"!":GREEN})
- #self.play(Write(introText1))
- #self.wait(0.5)
- #self.play(FadeOut(introText1))
self.play(Write(introText2))
self.play(FadeIn(introText3))
self.wait(2)
@@ -65,7 +61,7 @@ class graphScene(GraphScene,ZoomedScene):
def setup(self):
GraphScene.setup(self)
- #MovingCameraScene.setup(self)
+
ZoomedScene.setup(self)
@@ -110,19 +106,7 @@ class graphScene(GraphScene,ZoomedScene):
self.activate_zooming(animate=True)
for p in range(0,5):
self.play(Write(lines[p]))
- # self.wait(0.5)
- # self.camera_frame.save_state()
- # self.camera_frame.set_width(0.6)
- # self.play(self.camera_frame.move_to, points[0])
- # self.wait(0.4)
- # self.play(self.camera_frame.move_to, points[1])
- # self.wait(0.4)
- # self.play(self.camera_frame.move_to, points[2])
- # self.wait(0.3)
- # self.play(self.camera_frame.move_to, points[3])
- # self.wait(1)
- # self.play(self.camera_frame.move_to,ORIGIN)
- # self.camera_frame.set_width(14)
+
self.wait(1)
self.get_zoomed_display_pop_out_animation()
diff --git a/FSF-2020/calculus/series-and-transformations/README.md b/FSF-2020/calculus/series-and-transformations/README.md
index 4747205..0ca6397 100644
--- a/FSF-2020/calculus/series-and-transformations/README.md
+++ b/FSF-2020/calculus/series-and-transformations/README.md
@@ -4,10 +4,9 @@ GitHub Handle: <a href="https://github.com/GSri30/">GSri30</a>
Sub-Topics Covered:
<ul>
- <li>Power Series
- <li>Taylor Series
- <li>Laplace Transformation
- <li>Fourier Transformation
- <li>z-Transform
- <li>Constant-Q transform
+ <li><a href="https://math.animations.fossee.in/contents/series-and-transformations/series/taylor-series">Taylor Series</a>
+ <li><a href="https://math.animations.fossee.in/contents/series-and-transformations/series/power-series">Power Series</a>
+ <li><a href="https://math.animations.fossee.in/contents/series-and-transformations/transformations/fourier-transform">Fourier Transformation</a>
+ <li><a href="https://math.animations.fossee.in/contents/series-and-transformations/transformations/laplace-transform">Laplace Transformation</a>
+ <li><a href="https://math.animations.fossee.in/contents/series-and-transformations/transformations/z-transform">Z-Transform</a>
</ul>
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md b/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
index ce3b088..88eb772 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
@@ -2,7 +2,7 @@
![GIF1](gifs/file1_Example_TaylorExpansion.gif)
#### Taylor Series GeneralForm
-![GIF2](gifs/file2_TaylorExpansionGeneralForm.gif)
+![GIF2](gifs/file2a_TaylorExpansionGeneralForm.gif)
#### Radius Of Convergence
![GIF3](gifs/file3_radiusOfConvergence.gif)
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif
index e6d9171..33dfa81 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2a_TaylorExpansionGeneralForm.gif b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2a_TaylorExpansionGeneralForm.gif
new file mode 100644
index 0000000..33dfa81
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2a_TaylorExpansionGeneralForm.gif
Binary files differ
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
index b132811..a0c7176 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
@@ -95,7 +95,6 @@ class graphScene(GraphScene,MovingCameraScene):
obj.set_color(GOLD_A)
group=VGroup(coeff[0],coeff[1],coeff[2])
- #group.shift(2*LEFT+2*DOWN)
firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
secondApprox=[self.get_graph(lambda x:1,color=BLUE),
@@ -142,13 +141,6 @@ class graphScene(GraphScene,MovingCameraScene):
bottomText8.scale(0.5)
bottomText1.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText2.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText3.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText4.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText5.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText6.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText7.shift(4.5*RIGHT+2.5*DOWN)
- # bottomText8.shift(4.5*RIGHT+2.5*DOWN)
bottomText2.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText3.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
bottomText4.shift(3*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
@@ -230,16 +222,7 @@ class graphScene(GraphScene,MovingCameraScene):
self.play(FadeOut(self.axes),FadeOut(textFinal),FadeOut(secondGraph),FadeOut(trTextGrup),FadeOut(mainfunction),FadeOut(fx),FadeOut(coeff[0]),FadeOut(coeff[1]),FadeOut(coeff[2]))
self.play(Write(finalFormula))
self.wait(2)
- # self.play(ReplacementTransform(secondApprox[2],secondApprox[3]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[3],secondApprox[4]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[4],secondApprox[5]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[0],secondApprox[0]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[0],secondApprox[0]))
- # self.wait(0.5)
+
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
index c177ab4..5be336b 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
@@ -7,7 +7,7 @@ class intro(Scene):
equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
equation.scale(2)
equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
- text=TextMobject("at $a=1$")
+ text=TextMobject("about $x=1$")
text.scale(0.7)
text.shift(DOWN)
@@ -41,7 +41,7 @@ def formFormula(coeff_list,variable_list):
return expansion,coeff_list
-class graphScene(GraphScene):
+class graphScene(GraphScene,MovingCameraScene):
CONFIG = {
"x_min": -8,
"x_max": 8,
@@ -55,6 +55,9 @@ class graphScene(GraphScene):
"exclude_zero_label": True,
"x_labeled_nums": range(-8, 8, 1),
}
+ def setup(self):
+ GraphScene.setup(self)
+ MovingCameraScene.setup(self)
def construct(self):
x_each_unit = self.x_axis_width / (self.x_max - self.x_min)
y_each_unit = self.y_axis_height / (self.y_max - self.y_min)
@@ -62,7 +65,7 @@ class graphScene(GraphScene):
equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
equation.scale(0.55)
equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
- text=TextMobject("$a=1$")
+ text=TextMobject("about $x=1$")
text.scale(0.55)
equation.shift(3.39*UP+5*LEFT)
text.shift(3*UP+5*LEFT)
@@ -80,7 +83,7 @@ class graphScene(GraphScene):
trTextGrup.scale(0.5)
trTextGrup.to_corner(UP+RIGHT)
self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
+ self.setup_axes(animate=True,scalee=1)
fx=TextMobject("${ e }^{ -x^{ 2 } }$")
fx.scale(0.5)
@@ -91,29 +94,29 @@ class graphScene(GraphScene):
self.wait(1.4)
coeff=[TextMobject("$e^{-1}$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
- coeff[0].shift(3.33*UP+3.65*RIGHT)
- coeff[0].scale(0.45)
- coeff[1].shift(3.33*UP+4.13*RIGHT)
- coeff[1].scale(0.275)
- coeff[2].shift(3.33*UP+5.36*RIGHT)
- coeff[2].scale(0.28)
+ coeff[0].shift(4.1*y_each_unit*UP+5.15*RIGHT*x_each_unit)
+ coeff[0].scale(0.3)
+ coeff[1].shift(4*y_each_unit*UP+5.7*RIGHT*x_each_unit)
+ coeff[1].scale(0.2)
+ coeff[2].shift(4*y_each_unit*UP+7.3*RIGHT*x_each_unit)
+ coeff[2].scale(0.18)
for obj in coeff:
obj.set_color(GOLD_A)
- firstApprox=[self.get_graph(lambda x:math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5)]
- secondApprox=[self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5),
- self.get_graph(lambda x:math.exp(-1)+3*(x-1)*math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5),
- self.get_graph(lambda x:math.exp(-1)-4*(x-1)*math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5)]
- thirdApprox=[self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)-2*math.exp(-1)*(x-1)**2,color=BLUE,x_max=5.5,x_min=-5.5),
- self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)-0.1*math.exp(-1)*(x-1)**2,color=BLUE,x_max=5.5,x_min=-5.5),
- self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_max=5.5,x_min=-5.5),
- self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+0.5*math.exp(-1)*(x-1)**2,color=BLUE,x_max=5.5,x_min=-5.5),
- self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+2*math.exp(-1)*(x-1)**2,color=BLUE,x_max=5.5,x_min=-5.5)]
+ firstApprox=[self.get_graph(lambda x:math.exp(-1),color=BLUE,x_min=-3,x_max=4)]
+ secondApprox=[self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_min=-3,x_max=4),
+ self.get_graph(lambda x:math.exp(-1)+3*(x-1)*math.exp(-1),color=BLUE,x_min=-3,x_max=4),
+ self.get_graph(lambda x:math.exp(-1)-4*(x-1)*math.exp(-1),color=BLUE,x_min=-3,x_max=4)]
+ thirdApprox=[self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)-2*math.exp(-1)*(x-1)**2,color=BLUE,x_max=4,x_min=-3),
+ self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)-0.1*math.exp(-1)*(x-1)**2,color=BLUE,x_max=4,x_min=-3),
+ self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_max=4,x_min=-3),
+ self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+0.5*math.exp(-1)*(x-1)**2,color=BLUE,x_max=4,x_min=-3),
+ self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+2*math.exp(-1)*(x-1)**2,color=BLUE,x_max=4,x_min=-3)]
- firstGraph=self.get_graph(lambda x:math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5)
- secondGraph=self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_min=-5.5,x_max=5.5)
- thirdGraph=self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+math.exp(-1)*(x-1)**2,color=BLUE,x_max=5.5,x_min=-5.5)
+ firstGraph=self.get_graph(lambda x:math.exp(-1),color=BLUE,x_min=-3,x_max=4)
+ secondGraph=self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1),color=BLUE,x_min=-3,x_max=4)
+ thirdGraph=self.get_graph(lambda x:math.exp(-1)-2*(x-1)*math.exp(-1)+math.exp(-1)*(x-1)**2,color=BLUE,x_max=4,x_min=-3)
bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
@@ -147,16 +150,35 @@ class graphScene(GraphScene):
bottomText8.scale(0.5)
bottomText1.shift(4.5*RIGHT+2.5*DOWN)
- bottomText2.shift(4.5*RIGHT+2.5*DOWN)
- bottomText3.shift(4.5*RIGHT+2.5*DOWN)
- bottomText4.shift(4.5*RIGHT+2.5*DOWN)
- bottomText5.shift(4.5*RIGHT+2.5*DOWN)
- bottomText6.shift(4.5*RIGHT+2.5*DOWN)
- bottomText7.shift(4.5*RIGHT+2.5*DOWN)
- bottomText8.shift(4.5*RIGHT+2.5*DOWN)
+ bottomText2.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText3.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText4.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText5.shift(5*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText6.shift(5.7*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText7.shift(5.7*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+ bottomText8.shift(5.7*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
+
+ bottomText2.scale(0.7)
+ bottomText3.scale(0.7)
+ bottomText4.scale(0.7)
+ bottomText5.scale(0.7)
+ bottomText6.scale(0.7)
+ bottomText7.scale(0.7)
+ bottomText8.scale(0.7)
self.play(Write(bottomText1))
- self.wait(1)
+ self.wait(0.8)
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width, 8,
+ self.camera_frame.move_to, x_each_unit*UP+x_each_unit*2*RIGHT,
+ ApplyMethod(trTextGrup.move_to,4*y_each_unit*UP+6.1*RIGHT*x_each_unit),
+ ApplyMethod(bottomText1.move_to,5.4*RIGHT*x_each_unit+2.5*DOWN*y_each_unit),
+ ApplyMethod(equation.shift,1.39*DOWN+2*RIGHT+RIGHT*x_each_unit*2),
+ ApplyMethod(text.shift,1.39*DOWN+2*RIGHT+RIGHT*x_each_unit*2),)
+ self.play(ApplyMethod(text.scale,0.5),ApplyMethod(equation.scale,0.5),ApplyMethod(bottomText1.scale,0.6),ApplyMethod(trTextGrup.scale,0.7))
+ self.play(ApplyMethod(text.shift,0.25*UP))
+ self.wait(0.6)
+
self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
#change coeff in tn(x)
self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
@@ -166,8 +188,6 @@ class graphScene(GraphScene):
self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
self.wait(0.5)
self.play(ReplacementTransform(secondApprox[1],secondApprox[2]))
- # self.wait(0.5)
- # self.play(ReplacementTransform(secondApprox[2],secondApprox[0]))
self.wait(1)
self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
self.wait(1)
@@ -179,8 +199,6 @@ class graphScene(GraphScene):
self.play(ReplacementTransform(secondGraph,thirdApprox[0]))
self.wait(0.6)
self.play(ReplacementTransform(thirdApprox[0],thirdApprox[1]))
- # self.wait(0.6)
- # self.play(ReplacementTransform(thirdApprox[1],thirdApprox[2]))
self.wait(0.6)
self.play(ReplacementTransform(thirdApprox[1],thirdApprox[3]))
self.wait(0.6)
@@ -193,10 +211,13 @@ class graphScene(GraphScene):
self.wait(2)
textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ textFinal.scale(0.35)
+ textFinal.shift(5.7*RIGHT*x_each_unit+2.5*DOWN*y_each_unit)
self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
+ self.wait(1)
+ self.play(FadeOut(equation),FadeOut(text))
+ self.play(self.camera_frame.set_width, 15,
+ self.camera_frame.move_to, 0)
finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$")
finalFormula.scale(0.8)
@@ -204,4 +225,4 @@ class graphScene(GraphScene):
self.play(FadeOut(self.axes),FadeOut(textFinal),FadeOut(thirdGraph),FadeOut(trTextGrup),FadeOut(mainfunction),FadeOut(fx),FadeOut(coeff[0]),FadeOut(coeff[1]),FadeOut(coeff[2]))
self.play(Write(finalFormula))
- self.wait(2) \ No newline at end of file
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
index 1f41c97..6b368da 100644
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
@@ -43,7 +43,6 @@ class graphScene(GraphScene):
bottomText1=TextMobject("$R_{n}(x)=\\frac { d }{ dx } ($","area bounded","$)$")
bottomText1.set_color_by_tex_to_color_map({"area bounded":ORANGE})
- #bottomText2.set_color_by_tex_to_color_map({"area bounded":BLUE})
arrow=TextMobject("$\downarrow$")
arrow.scale(2.5)
arrow.shift(ORIGIN+x_each_unit*RIGHT*9.5+UP*y_each_unit)
@@ -56,12 +55,8 @@ class graphScene(GraphScene):
increasingText.scale(0.4)
bottomText1.scale(0.5)
- #bottomText2.scale(0.5)
- #bottomText3.scale(0.5)
bottomText1.shift(3.5*LEFT+2*DOWN)
- #bottomText2.shift(3.5*LEFT+2.4*DOWN)
- #bottomText3.shift(3.5*LEFT+2.8*DOWN)
dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
dline.shift(ORIGIN+x_each_unit*4*RIGHT)
@@ -72,11 +67,9 @@ class graphScene(GraphScene):
self.play(Write(dline))
self.wait(0.5)
self.play(ShowCreation(area1),ShowCreation(area2),Write(bottomText1))
- # self.play(Write(bottomText2))
- # self.play(FadeIn(bottomText3))
self.play(Write(arrow))
self.wait(0.7)
self.play(Write(increasingText))
self.play(FadeIn(followupText))
self.wait(2)
- \ No newline at end of file
+