From 78c7c31361cbfef7be001216ecf2381bae2a6a27 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 6 May 2020 17:05:03 +0530
Subject: Updated readme.md
Added my name and the topics covered(to be covered) by me.---
FSF-2020/series-and-transformations/README.md | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/README.md b/FSF-2020/series-and-transformations/README.md
index e69de29..2b71bd0 100644
--- a/FSF-2020/series-and-transformations/README.md
+++ b/FSF-2020/series-and-transformations/README.md
@@ -0,0 +1,7 @@
+Contributer: G Sri Harsha
+Sub-Topics Covered: Power Series
+ Taylor Series
+ Laplace Transformation
+ Fourier Transformation
+ z-Transform
+ Constant-Q transform
--
cgit
From 2cb7d8913e043062b8cdcbc2b140a844f8a8914b Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 6 May 2020 17:06:36 +0530
Subject: Update README.md
---
FSF-2020/series-and-transformations/README.md | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/README.md b/FSF-2020/series-and-transformations/README.md
index 2b71bd0..66d0942 100644
--- a/FSF-2020/series-and-transformations/README.md
+++ b/FSF-2020/series-and-transformations/README.md
@@ -1,7 +1,11 @@
Contributer: G Sri Harsha
-Sub-Topics Covered: Power Series
- Taylor Series
- Laplace Transformation
- Fourier Transformation
- z-Transform
- Constant-Q transform
+
+Sub-Topics Covered:
+
+ - Power Series
+
- Taylor Series
+
- Laplace Transformation
+
- Fourier Transformation
+
- z-Transform
+
- Constant-Q transform
+
--
cgit
From 3b00f2e49609f5f5063b7233eedfb303376a5354 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 6 May 2020 17:07:11 +0530
Subject: Update README.md
---
FSF-2020/series-and-transformations/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/README.md b/FSF-2020/series-and-transformations/README.md
index 66d0942..18ad55e 100644
--- a/FSF-2020/series-and-transformations/README.md
+++ b/FSF-2020/series-and-transformations/README.md
@@ -1,4 +1,4 @@
-Contributer: G Sri Harsha
+Contributer: G Sri Harsha
Sub-Topics Covered:
--
cgit
From 9168c4f88ef2152a3a3c3d110ff659adf8d37972 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 6 May 2020 17:08:15 +0530
Subject: Update README.md
---
FSF-2020/series-and-transformations/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/README.md b/FSF-2020/series-and-transformations/README.md
index 18ad55e..4747205 100644
--- a/FSF-2020/series-and-transformations/README.md
+++ b/FSF-2020/series-and-transformations/README.md
@@ -1,5 +1,7 @@
Contributer: G Sri Harsha
+GitHub Handle: GSri30
+
Sub-Topics Covered:
- Power Series
--
cgit
From d2b23ebb2c372a4d5283c1cc1ea55c01a956784f Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Wed, 6 May 2020 17:43:57 +0530
Subject: Update README.md
Added 'my name as a contributor' and 'Added Sub Topics'---
FSF-2020/linear-transformations/README.md | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-transformations/README.md b/FSF-2020/linear-transformations/README.md
index e69de29..feb72c5 100644
--- a/FSF-2020/linear-transformations/README.md
+++ b/FSF-2020/linear-transformations/README.md
@@ -0,0 +1,8 @@
+# Contributer: Archit Sangal
+
+## Sub-Topics Covered:
++ Vector Space Homomorphisms (Linear Maps)
++ The Four Fundamental Subspaces
++ Rank-Nullity Theorem
++ Orthonormal basis
++ Gramm-Schmidt Orthogonalization Process
--
cgit
From 28617e2371a7598de288efb6a4949a673929cd17 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Wed, 6 May 2020 18:28:54 +0530
Subject: Update README.md
Added link to my github account---
FSF-2020/linear-transformations/README.md | 1 +
1 file changed, 1 insertion(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-transformations/README.md b/FSF-2020/linear-transformations/README.md
index feb72c5..692201e 100644
--- a/FSF-2020/linear-transformations/README.md
+++ b/FSF-2020/linear-transformations/README.md
@@ -1,4 +1,5 @@
# Contributer: Archit Sangal
+My Github Account : architsangal
## Sub-Topics Covered:
+ Vector Space Homomorphisms (Linear Maps)
--
cgit
From d7a038fb033d920b35f42c65e8ff72a52ea32e1a Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Sun, 10 May 2020 20:39:37 +0530
Subject: adding files
---
.../Linear Transformations (Linear Maps)/Animation.py | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py b/FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
new file mode 100644
index 0000000..e69de29
--
cgit
From 459c8ef6c3efdbb264e0a3eb1687110553571b05 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 12 May 2020 00:19:54 +0530
Subject: Add files via upload
Area under a curve as Riemann sum of infinitesimal rectangular regions.---
.../area_under_func.py | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/area_under_func.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/area_under_func.py b/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
new file mode 100644
index 0000000..0269d74
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
@@ -0,0 +1,72 @@
+from manimlib.imports import *
+
+
+class AreaUnderIntegral(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 5,
+ "y_min" : 0,
+ "y_max" : 6,
+ "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
+
+ int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
+ area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
+
+ opening_text=VGroup(*[int_area_sym,area_mean_text])
+ self.play(Write(opening_text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(opening_text))
+
+ self.setup_axes(animate=True)
+ func= self.get_graph(self.Func, x_min=0,x_max=5)
+ self.curve=func
+
+ func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
+ min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
+ tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
+ max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
+ tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
+
+ # area = self.get_area(func,1,4)
+
+ self.play(ShowCreation(func), ShowCreation(func_text))
+
+ self.wait(2)
+ self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
+
+
+ approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
+ self.play(Write(approx_text))
+
+ rect_list = self.get_riemann_rectangles_list(
+ self.curve, 5,
+ max_dx = 0.25,
+ x_min = 1,
+ x_max = 4,
+ )
+ flat_graph = self.get_graph(lambda t : 0)
+ rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
+ for new_rects in rect_list:
+ new_rects.set_fill(opacity = 0.8)
+ rects.align_submobjects(new_rects)
+ for alt_rect in rects[::2]:
+ alt_rect.set_fill(opacity = 0)
+ self.play(Transform(
+ rects, new_rects,
+ run_time = 1.5,
+ lag_ratio = 0.5
+ ))
+ conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
+ self.play(Transform(approx_text,conclude_text))
+ self.wait(3)
+ int_area_sym.next_to(self.curve,IN)
+ self.play(Transform(conclude_text,int_area_sym))
+
+ # self.play(ShowCreation(area))
+ self.wait(3)
+
--
cgit
From ed67cc04f0c7ea10f6d702fe6d11e169fc8749f4 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 12 May 2020 00:21:32 +0530
Subject: Update area_under_func.py
---
FSF-2020/integrals-of-multivariable-functions/area_under_func.py | 1 +
1 file changed, 1 insertion(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/area_under_func.py b/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
index 0269d74..773840c 100644
--- a/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
+++ b/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
@@ -70,3 +70,4 @@ class AreaUnderIntegral(GraphScene):
# self.play(ShowCreation(area))
self.wait(3)
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 5621f0942dd245244c9bab42f929b9ddb9943023 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Thu, 14 May 2020 20:11:32 +0530
Subject: Add files via upload
Integrating over non-rectengular region and division of the region to get some meaningful functions.---
.../non_rect_region.py | 152 +++++++++++++++++++++
1 file changed, 152 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
new file mode 100644
index 0000000..3634b7e
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
@@ -0,0 +1,152 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 8,
+ "y_min" : -1,
+ "y_max" : 6,
+ "y_axis_label": "$y$",
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(-1, 9)),
+ "y_labeled_nums": list(np.arange(-1, 7)),
+ "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
+ }
+
+ 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)
+
+ sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
+ self.play(Write(sofar_text))
+ self.play(sofar_text.to_edge,UP)
+
+ self.setup_axes(animate=False)
+
+ rect= self.get_graph(
+ lambda x : 3,
+ x_min = 0,
+ x_max = 5,
+ color = GREEN)
+
+ rect_region = self.get_riemann_rectangles(
+ rect,
+ x_min = 0,
+ x_max = 5,
+ dx =.01,
+ start_color = GREEN,
+ end_color = GREEN,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+
+ self.play(ShowCreation(rect_region))
+ self.wait(.5)
+
+ rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
+ rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
+ const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
+
+ self.play(ReplacementTransform(sofar_text,rect_int))
+ self.wait(1.5)
+ self.play(FadeIn(rect_lim))
+ self.wait(2)
+ self.play(Write(const_text))
+ self.wait(2)
+ self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
+
+
+ non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
+ non_rect_text.to_edge(UP)
+ self.play(Write(non_rect_text))
+ self.wait(1.5)
+ self.play(FadeOut(rect_region))
+
+ c1= self.get_graph(
+ lambda x : x**2/4,
+ x_min = 0,
+ x_max = 4,
+ color = RED)
+
+ c1_region = self.get_riemann_rectangles(
+ c1,
+ x_min = 0,
+ x_max = 4,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+ self.add(c1,c1_region)
+ # self.wait(2)
+
+ c2= self.get_graph(
+ lambda x :12-2*x,
+ x_min = 4,
+ x_max = 6,
+ color = RED)
+
+ c2_region = self.get_riemann_rectangles(
+ c2,
+ x_min = 4,
+ x_max = 6,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = .75,
+ stroke_width = 0,
+ )
+ self.add(c2_region,c2)
+ self.wait(1.5)
+ c=VGroup(*[c1,c2])
+
+ no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
+
+ self.play(ReplacementTransform(non_rect_text,no_func_text))
+ self.wait(1)
+ self.play(Indicate(c))
+ self.wait(2)
+
+ div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
+ self.play(ReplacementTransform(no_func_text,div_region_text))
+
+ c2.set_color(YELLOW)
+ self.play(c2_region.set_color,YELLOW)
+ c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
+ c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
+ c_text=VGroup(*[c1_text,c2_text])
+
+ self.play(FadeIn(c_text))
+ self.wait(.4)
+ self.play(Indicate(c1),Indicate(c1_text))
+ self.play(Indicate(c2),Indicate(c2_text))
+
+ easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
+ self.play(ReplacementTransform(div_region_text,easy_text))
+
+ c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
+ c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
+
+ self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
+ self.wait(2)
+
+ total_int=TextMobject(r"The total integraton= ").to_edge(UP)
+ plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+5*Y)
+ self.play(ReplacementTransform(easy_text,total_int))
+ self.play(c2_region.set_color,BLUE)
+ self.play(c1_int.next_to,c1,UP,c2_int.next_to,plus,RIGHT, FadeIn(plus))
+
+ region=VGroup(*[c1_region,c2_region])
+ region.set_color(GREEN)
+ self.play(ShowCreation(region))
+ self.wait(3)
+
+
+
+
+
+
+
+
--
cgit
From 192bfa785bba078f776ed9cb05e85fc2d3ada5ed Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Thu, 14 May 2020 20:12:59 +0530
Subject: Update non_rect_region.py
---
FSF-2020/integrals-of-multivariable-functions/non_rect_region.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
index 3634b7e..79937da 100644
--- a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
+++ b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
@@ -144,7 +144,8 @@ class AreaUnderCurve(GraphScene):
self.wait(3)
-
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 5f2abfec1aff1d1fb461a00222f0be22218d5dec Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Thu, 14 May 2020 23:16:58 +0530
Subject: Update non_rect_region.py
---
.../integrals-of-multivariable-functions/non_rect_region.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
index 79937da..793a000 100644
--- a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
+++ b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
@@ -5,12 +5,13 @@ class AreaUnderCurve(GraphScene):
"x_min" : -1,
"x_max" : 8,
"y_min" : -1,
- "y_max" : 6,
+ "y_max" : 5,
"y_axis_label": "$y$",
"x_tick_frequency" : 1,
"y_tick_frequency" : 1,
"x_labeled_nums": list(np.arange(-1, 9)),
- "y_labeled_nums": list(np.arange(-1, 7)),
+ "y_labeled_nums": list(np.arange(-1, 6)),
+ "y_axis_height":5.5,
"graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
}
@@ -133,16 +134,16 @@ class AreaUnderCurve(GraphScene):
self.wait(2)
total_int=TextMobject(r"The total integraton= ").to_edge(UP)
- plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+5*Y)
+ plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
self.play(ReplacementTransform(easy_text,total_int))
self.play(c2_region.set_color,BLUE)
- self.play(c1_int.next_to,c1,UP,c2_int.next_to,plus,RIGHT, FadeIn(plus))
+ self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
region=VGroup(*[c1_region,c2_region])
region.set_color(GREEN)
self.play(ShowCreation(region))
self.wait(3)
-
+
#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From ba5878523fe684f7bee1664fda3e27239f77119e Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Fri, 15 May 2020 11:26:16 +0530
Subject: Update README.md
---
FSF-2020/integrals-of-multivariable-functions/README.md | 1 +
1 file changed, 1 insertion(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/README.md b/FSF-2020/integrals-of-multivariable-functions/README.md
index e69de29..cd8bfe7 100644
--- a/FSF-2020/integrals-of-multivariable-functions/README.md
+++ b/FSF-2020/integrals-of-multivariable-functions/README.md
@@ -0,0 +1 @@
+FSF2020--Somnath Pandiy
--
cgit
From 5f19d0f96f2e5e050008e66fc6f8ecfacd3a7f6d Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Fri, 15 May 2020 11:26:31 +0530
Subject: Update README.md
---
FSF-2020/integrals-of-multivariable-functions/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/README.md b/FSF-2020/integrals-of-multivariable-functions/README.md
index cd8bfe7..a321caf 100644
--- a/FSF-2020/integrals-of-multivariable-functions/README.md
+++ b/FSF-2020/integrals-of-multivariable-functions/README.md
@@ -1 +1 @@
-FSF2020--Somnath Pandiy
+FSF2020--Somnath Pandit
--
cgit
From add191d2d30573bd0f455f533a9899e8819e9b46 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Fri, 15 May 2020 15:49:53 +0530
Subject: Add files via upload
---
.../Area_Under_func.mp4 | Bin 0 -> 681985 bytes
.../non_rect_region.mp4 | Bin 0 -> 1189183 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4
create mode 100644 FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4 b/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4
new file mode 100644
index 0000000..7072672
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4 differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4 b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4
new file mode 100644
index 0000000..2eebc65
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4 differ
--
cgit
From 4de00828ff1847824504ca034d0a70e401db1d2c Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:50:40 +0530
Subject: Add files via upload
---
FSF-2020/series-and-transformations/script1.py | 94 ++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/script1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script1.py b/FSF-2020/series-and-transformations/script1.py
new file mode 100644
index 0000000..72356c6
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script1.py
@@ -0,0 +1,94 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class convergence(Scene):
+ def construct(self):
+ originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
+ originalFormula.set_color(RED)
+ self.play(Write(originalFormula))
+ self.wait(1)
+ self.play(ApplyMethod(originalFormula.shift,2.7*UP))
+ self.wait(1)
+
+ terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
+ termsTogetherString="+".join(terms)
+ termsTogether=TextMobject(termsTogetherString+"...")
+ termsTogether.scale(0.8)
+ termsTogether.shift(2.7*UP)
+ self.play(ReplacementTransform(originalFormula,termsTogether))
+ self.wait(1)
+
+ termMobjectRect=[0]*12
+ termMobject=TextMobject(terms[0])
+ termMobject.shift(2.7*UP+6.2*LEFT)
+ for i in range(1,13):
+ termMobjectOld=termMobject
+ termMobjectOld.scale(0.8)
+ if(i<12):
+ termMobject=TextMobject(terms[i])
+ termMobject.next_to(termMobjectOld)
+ if(i==1):
+ rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
+ rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
+ rectDefine.scale(0.7)
+ rectDefine.shift(3.2*DOWN)
+ self.play(Write(rectDefine))
+ self.wait(1)
+ if(i==2):
+ ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
+ ratio.set_color(RED)
+ ratio.scale(0.7)
+ ratio.move_to(3.2*DOWN)
+ inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
+ inequality.set_color(RED)
+ inequality.scale(0.7)
+ inequality.move_to(3.2*DOWN)
+ self.play(FadeOut(rectDefine))
+ self.play(Write(ratio))
+ self.wait(1)
+ self.play(ReplacementTransform(ratio,inequality))
+ self.wait(1)
+ #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
+ termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
+ termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
+ #rectangles[p] = termMobjectRect
+ #p+=1
+ self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
+
+ uparrow=TextMobject("$\\uparrow$")
+ uparrow.set_color(GREEN)
+ uparrow.scale(6)
+ uparrow.shift(4*RIGHT+0.5*DOWN)
+ self.play(ShowCreation(uparrow))
+ self.wait(1)
+
+ converges=TextMobject("Converges!")
+ converges.set_color(RED)
+ converges.scale(0.6)
+ converges.next_to(uparrow)
+ self.play(FadeIn(converges))
+ self.wait(2)
+
+ self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
+ self.wait(0.5)
+ rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
+ self.play(ApplyMethod(rect.scale,0.2))
+ for i in range(0,12):
+ self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
+ func=TextMobject("$\\approx$","$f(x)$")
+ func.set_color_by_tex_to_color_map({"$f(x)$":RED})
+ func.scale(0.8)
+ func.shift(DOWN+4.5*RIGHT+0.1*UP)
+ self.play(FadeIn(func))
+
+ rightarrow=TextMobject("$\\rightarrow$")
+ rightarrow.set_color(GREEN)
+ rightarrow.scale(4)
+ rightarrow.shift(2*DOWN)
+ converges=TextMobject("Hence even the","sum converges!")
+ converges.set_color_by_tex_to_color_map({"sum converges!":RED})
+ converges.move_to(3*DOWN)
+ converges.scale(0.7)
+ self.play(Write(rightarrow),FadeIn(converges))
+ self.wait(2)
--
cgit
From b02030eee74d000da6e939db98e76670d22d7c37 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:51:11 +0530
Subject: Rename script1.py to script2.py
---
FSF-2020/series-and-transformations/script1.py | 94 --------------------------
FSF-2020/series-and-transformations/script2.py | 94 ++++++++++++++++++++++++++
2 files changed, 94 insertions(+), 94 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script1.py
create mode 100644 FSF-2020/series-and-transformations/script2.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script1.py b/FSF-2020/series-and-transformations/script1.py
deleted file mode 100644
index 72356c6..0000000
--- a/FSF-2020/series-and-transformations/script1.py
+++ /dev/null
@@ -1,94 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-
-class convergence(Scene):
- def construct(self):
- originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
- originalFormula.set_color(RED)
- self.play(Write(originalFormula))
- self.wait(1)
- self.play(ApplyMethod(originalFormula.shift,2.7*UP))
- self.wait(1)
-
- terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
- termsTogetherString="+".join(terms)
- termsTogether=TextMobject(termsTogetherString+"...")
- termsTogether.scale(0.8)
- termsTogether.shift(2.7*UP)
- self.play(ReplacementTransform(originalFormula,termsTogether))
- self.wait(1)
-
- termMobjectRect=[0]*12
- termMobject=TextMobject(terms[0])
- termMobject.shift(2.7*UP+6.2*LEFT)
- for i in range(1,13):
- termMobjectOld=termMobject
- termMobjectOld.scale(0.8)
- if(i<12):
- termMobject=TextMobject(terms[i])
- termMobject.next_to(termMobjectOld)
- if(i==1):
- rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
- rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
- rectDefine.scale(0.7)
- rectDefine.shift(3.2*DOWN)
- self.play(Write(rectDefine))
- self.wait(1)
- if(i==2):
- ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
- ratio.set_color(RED)
- ratio.scale(0.7)
- ratio.move_to(3.2*DOWN)
- inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
- inequality.set_color(RED)
- inequality.scale(0.7)
- inequality.move_to(3.2*DOWN)
- self.play(FadeOut(rectDefine))
- self.play(Write(ratio))
- self.wait(1)
- self.play(ReplacementTransform(ratio,inequality))
- self.wait(1)
- #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
- termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
- termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
- #rectangles[p] = termMobjectRect
- #p+=1
- self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
-
- uparrow=TextMobject("$\\uparrow$")
- uparrow.set_color(GREEN)
- uparrow.scale(6)
- uparrow.shift(4*RIGHT+0.5*DOWN)
- self.play(ShowCreation(uparrow))
- self.wait(1)
-
- converges=TextMobject("Converges!")
- converges.set_color(RED)
- converges.scale(0.6)
- converges.next_to(uparrow)
- self.play(FadeIn(converges))
- self.wait(2)
-
- self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
- self.wait(0.5)
- rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
- self.play(ApplyMethod(rect.scale,0.2))
- for i in range(0,12):
- self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
- func=TextMobject("$\\approx$","$f(x)$")
- func.set_color_by_tex_to_color_map({"$f(x)$":RED})
- func.scale(0.8)
- func.shift(DOWN+4.5*RIGHT+0.1*UP)
- self.play(FadeIn(func))
-
- rightarrow=TextMobject("$\\rightarrow$")
- rightarrow.set_color(GREEN)
- rightarrow.scale(4)
- rightarrow.shift(2*DOWN)
- converges=TextMobject("Hence even the","sum converges!")
- converges.set_color_by_tex_to_color_map({"sum converges!":RED})
- converges.move_to(3*DOWN)
- converges.scale(0.7)
- self.play(Write(rightarrow),FadeIn(converges))
- self.wait(2)
diff --git a/FSF-2020/series-and-transformations/script2.py b/FSF-2020/series-and-transformations/script2.py
new file mode 100644
index 0000000..72356c6
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script2.py
@@ -0,0 +1,94 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class convergence(Scene):
+ def construct(self):
+ originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
+ originalFormula.set_color(RED)
+ self.play(Write(originalFormula))
+ self.wait(1)
+ self.play(ApplyMethod(originalFormula.shift,2.7*UP))
+ self.wait(1)
+
+ terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
+ termsTogetherString="+".join(terms)
+ termsTogether=TextMobject(termsTogetherString+"...")
+ termsTogether.scale(0.8)
+ termsTogether.shift(2.7*UP)
+ self.play(ReplacementTransform(originalFormula,termsTogether))
+ self.wait(1)
+
+ termMobjectRect=[0]*12
+ termMobject=TextMobject(terms[0])
+ termMobject.shift(2.7*UP+6.2*LEFT)
+ for i in range(1,13):
+ termMobjectOld=termMobject
+ termMobjectOld.scale(0.8)
+ if(i<12):
+ termMobject=TextMobject(terms[i])
+ termMobject.next_to(termMobjectOld)
+ if(i==1):
+ rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
+ rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
+ rectDefine.scale(0.7)
+ rectDefine.shift(3.2*DOWN)
+ self.play(Write(rectDefine))
+ self.wait(1)
+ if(i==2):
+ ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
+ ratio.set_color(RED)
+ ratio.scale(0.7)
+ ratio.move_to(3.2*DOWN)
+ inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
+ inequality.set_color(RED)
+ inequality.scale(0.7)
+ inequality.move_to(3.2*DOWN)
+ self.play(FadeOut(rectDefine))
+ self.play(Write(ratio))
+ self.wait(1)
+ self.play(ReplacementTransform(ratio,inequality))
+ self.wait(1)
+ #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
+ termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
+ termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
+ #rectangles[p] = termMobjectRect
+ #p+=1
+ self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
+
+ uparrow=TextMobject("$\\uparrow$")
+ uparrow.set_color(GREEN)
+ uparrow.scale(6)
+ uparrow.shift(4*RIGHT+0.5*DOWN)
+ self.play(ShowCreation(uparrow))
+ self.wait(1)
+
+ converges=TextMobject("Converges!")
+ converges.set_color(RED)
+ converges.scale(0.6)
+ converges.next_to(uparrow)
+ self.play(FadeIn(converges))
+ self.wait(2)
+
+ self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
+ self.wait(0.5)
+ rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
+ self.play(ApplyMethod(rect.scale,0.2))
+ for i in range(0,12):
+ self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
+ func=TextMobject("$\\approx$","$f(x)$")
+ func.set_color_by_tex_to_color_map({"$f(x)$":RED})
+ func.scale(0.8)
+ func.shift(DOWN+4.5*RIGHT+0.1*UP)
+ self.play(FadeIn(func))
+
+ rightarrow=TextMobject("$\\rightarrow$")
+ rightarrow.set_color(GREEN)
+ rightarrow.scale(4)
+ rightarrow.shift(2*DOWN)
+ converges=TextMobject("Hence even the","sum converges!")
+ converges.set_color_by_tex_to_color_map({"sum converges!":RED})
+ converges.move_to(3*DOWN)
+ converges.scale(0.7)
+ self.play(Write(rightarrow),FadeIn(converges))
+ self.wait(2)
--
cgit
From b33b7b9962b9186de770d37d4211330354cf14b3 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:51:34 +0530
Subject: Add files via upload
---
FSF-2020/series-and-transformations/script1.py | 128 +++++++++++++++++++++++++
1 file changed, 128 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/script1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script1.py b/FSF-2020/series-and-transformations/script1.py
new file mode 100644
index 0000000..28eb07c
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script1.py
@@ -0,0 +1,128 @@
+from manimlib.imports import *
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ expansion.scale(0.7)
+ return expansion
+
+class pieChart(Scene):
+ def construct(self):
+ circle1=Circle(radius=3,color=BLUE)
+ powerText=TextMobject("Power Series")
+ powerText.scale(0.8)
+ self.play(FadeIn(powerText))
+ self.play(ShowCreation(circle1))
+ self.wait(1)
+
+ powerGroup=VGroup(circle1,powerText)
+
+ self.play(ApplyMethod(powerGroup.scale,0.5))
+ self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
+ self.wait(0.5)
+ expansion_power_coeff=[]
+ variables_power=[]
+ expansion_power=formFormula(expansion_power_coeff,variables_power)
+ self.play(ReplacementTransform(powerText,expansion_power))
+ self.wait(1)
+
+ circle2=Circle(radius=1.5)
+ circle2.shift(2.2*UP)
+ expansion_geo_coeff=[0]*3
+ variables_geo=[0]*3
+ arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
+ expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_geo_coeff[i].set_color(GOLD_A)
+ variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_geo[2])
+ expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+ expansion_geo.scale(0.7)
+
+ self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
+ self.add(arrow1_2)
+ self.wait(1)
+
+ ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
+ for i in range(0,3):
+ ones[i].set_color(GOLD_A)
+ ones[0].shift(0.3*DOWN,5*LEFT)
+ ones[1].next_to(ones[0],buff=0.5)
+ ones[2].next_to(ones[1],buff=0.7)
+ self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
+ self.wait(1)
+ expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+
+ expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
+ expansion_geo_final.scale(0.8)
+ expansion_geo_final.shift(0.3*DOWN+4*LEFT)
+ self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
+ self.wait(1)
+
+ circle3=Circle(radius=1.5,color=GREEN)
+ circle3.shift(2.2*UP)
+ expansion_taylor_coeff=[0]*3
+ variables_taylor=[0]*3
+ arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
+ expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_taylor_coeff[i].set_color(GOLD_A)
+ variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_taylor[2])
+ expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+ expansion_taylor.scale(0.7)
+
+ self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
+ self.add(arrow1_3)
+ self.wait(1)
+
+ differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
+ for i in range(0,3):
+ differentials[i].set_color(GOLD_A)
+ differentials[0].shift(1.8*DOWN+1.15*LEFT)
+ differentials[1].shift(1.8*DOWN+0.45*LEFT)
+ differentials[2].shift(1.8*DOWN+0.45*RIGHT)
+ differentials[0].scale(0.35)
+ differentials[1].scale(0.35)
+ differentials[2].scale(0.35)
+ self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
+ self.wait(2)
+ expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+
+ self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
+ geoText=TextMobject("Geometric Series")
+ geoText.scale(0.7)
+ geoText.shift(4*LEFT+0.3*DOWN)
+ taylorText=TextMobject("Taylor Series")
+ taylorText.scale(0.7)
+ taylorText.shift(1.8*DOWN)
+ self.play(FadeIn(geoText),FadeIn(taylorText))
+ self.wait(1)
+
+ soOntext=TextMobject("So on..!")
+ soOntext.shift(4*RIGHT)
+ soOntext.scale(0.8)
+ self.play(FadeIn(soOntext))
+ self.wait(2)
--
cgit
From 1a8df8b5a08d1e2123fe51bf823ad196cb57dc33 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:52:04 +0530
Subject: Add files via upload
---
FSF-2020/series-and-transformations/script3.py | 156 +++++++++++++++++++++++++
1 file changed, 156 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/script3.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script3.py b/FSF-2020/series-and-transformations/script3.py
new file mode 100644
index 0000000..f710f42
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script3.py
@@ -0,0 +1,156 @@
+from manimlib.imports import*
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Let's analyse")
+ introText2=TextMobject("for")
+ function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
+ function_main.set_color(GREEN)
+ introText1.scale(1.2)
+ introText1.shift(2*UP)
+ introText2.scale(0.7)
+ introText2.shift(UP)
+ function_main.scale(2)
+ function_main.shift(DOWN)
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(1.2)
+ function_expan.shift(2*UP)
+
+ self.play(Write(introText1))
+ self.play(FadeIn(introText2))
+ self.wait(0.5)
+ self.play(Write(function_main))
+ self.wait(1)
+
+ self.play(FadeOut(introText1),FadeOut(introText2))
+ self.play(ApplyMethod(function_main.shift,3*UP))
+ self.wait(0.5)
+ self.play(ReplacementTransform(function_main,function_expan))
+ self.wait(1)
+ self.play(ApplyMethod(function_expan.scale,0.5))
+ function_expan.to_edge(UP+RIGHT)
+ self.play(ReplacementTransform(function_expan,function_expan))
+ self.wait(1)
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1)
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(0.6)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes(animate=True)
+
+ eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
+ for i in range(0,len(eqText)):
+ 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)
+ equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
+ equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
+ equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
+ equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
+ equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
+ equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
+ equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
+
+ textBtwAnim1=TextMobject("Here the graph just","oscilates")
+ textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
+ textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
+ textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
+ textBtwAnim3=TextMobject("$x=1$")
+ textBtwAnim1.scale(0.4)
+ textBtwAnim2.scale(0.4)
+ textBtwAnim3.scale(1.2)
+ textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
+ textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
+ textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
+
+ self.play(ShowCreation(equation1),run_time=0.8)
+ self.add(eqText[0])
+ self.wait(1)
+ self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
+ self.wait(0.4)
+ self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
+ self.wait(0.3)
+ self.play(FadeOut(eqText[3]))
+ self.play(FadeIn(eqTextTerm))
+ self.play(Write(textBtwAnim1),Write(textBtwAnim2))
+ self.play(FadeIn(textBtwAnim3))
+ self.play(ReplacementTransform(equation4,equation5))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation5,equation6))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation6,equation7))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation7,equation8))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation8,equation9))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation9,equation10))
+ self.wait(1)
+
+ self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
+ self.wait(1)
+
+ convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
+ divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
+ divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
+ circle1=Circle(radius=0.01,color=PURPLE_E)
+ circle2=Circle(radius=0.01,color=PURPLE_E)
+ circle1.shift(ORIGIN+LEFT*x_each_unit)
+ circle2.shift(ORIGIN+RIGHT*x_each_unit)
+ convergeText=TextMobject("Converges")
+ divergeText1=TextMobject("Diverges")
+ divergeText2=TextMobject("Diverges")
+ convergeText.set_color(GREEN)
+ divergeText1.set_color(RED)
+ divergeText2.set_color(RED)
+ convergeText.scale(0.5)
+ divergeText1.scale(0.5)
+ divergeText2.scale(0.5)
+ convergeText.shift(1.6*UP)
+ divergeText1.shift(0.3*UP+1.5*LEFT)
+ divergeText2.shift(0.3*UP+1.5*RIGHT)
+ self.play(Write(divergeLineLeft),Write(divergeLineRight))
+ self.play(FadeIn(convergeLine))
+ self.wait(0.5)
+ self.play(FadeOut(self.axes))
+ self.play(Write(circle1),Write(circle2))
+ self.wait(0.5)
+ self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
+ self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
+ self.wait(2)
+
--
cgit
From 12419532851741655c818c72943ed0660deb49c9 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:52:52 +0530
Subject: Add files via upload
---
FSF-2020/series-and-transformations/script4.py | 108 +++++++++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/script4.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script4.py b/FSF-2020/series-and-transformations/script4.py
new file mode 100644
index 0000000..412d20c
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script4.py
@@ -0,0 +1,108 @@
+from manimlib.imports import *
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Consider the","above","example..")
+ introText1.scale(0.8)
+ introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+ self.play(Write(introText1))
+ self.wait(1)
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1),
+ "y_axis_height":7,
+ "x_axis_width":7
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.scale(0.6)
+ function_expan.set_color(RED)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes()
+
+ equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
+ self.play(ShowCreation(equation))
+ self.wait(1)
+
+ dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
+ dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
+ radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
+ rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
+ circle=Circle(radius=x_each_unit)
+ movingPoint=Circle(radius=0.025)
+ movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
+ circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
+ circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
+
+ self.play(Write(dashLineLeft),Write(dashLineRight))
+ self.wait(1)
+
+ equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
+ self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
+ self.wait(0.5)
+ self.play(Write(radiusLine))
+ self.play(MoveAlongPath(movingPoint,circleEq1))
+ self.play(MoveAlongPath(movingPoint,circleEq2))
+ self.play(FadeIn(circle))
+ self.wait(1)
+
+ radiusText=TextMobject("Radius of convergence")
+ radiusText.scale(0.14)
+ radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
+
+ self.play(Write(radiusText))
+ self.wait(0.6)
+
+ 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.3)
+
+ self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
+ extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
+ self.play(Write(extendLine))
+ doubleArrow=TextMobject("$\longleftrightarrow$")
+ doubleArrow.scale(1.6)
+ doubleArrow.set_color(BLUE)
+ doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
+ self.play(FadeIn(doubleArrow))
+ self.wait(1)
+ rangeText=TextMobject("Interval of convergence")
+ rangeText.scale(0.15)
+ rangeText.shift(ORIGIN+y_each_unit*DOWN)
+ self.play(Write(rangeText))
+ self.wait(0.6)
+
+ 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)
--
cgit
From 69957574a1a8f7011cfb6070536deb3e3ae4e4e6 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Sat, 16 May 2020 17:53:15 +0530
Subject: Add files via upload
---
FSF-2020/series-and-transformations/script5.py | 136 +++++++++++++++++++++++++
1 file changed, 136 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/script5.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script5.py b/FSF-2020/series-and-transformations/script5.py
new file mode 100644
index 0000000..e9681aa
--- /dev/null
+++ b/FSF-2020/series-and-transformations/script5.py
@@ -0,0 +1,136 @@
+from manimlib.imports import *
+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)
+
+
+def gety(x,n):
+ ans=0
+ for i in range(0,n+1):
+ if(i%2==0):
+ ans+=(math.pow(x,2*i))
+ else:
+ ans-=(math.pow(x,2*i))
+ return ans
+
+def makeSeries(x,points,x_each_unit,y_each_unit):
+ p=0
+ for point in points:
+ y=gety(x,p)
+ point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
+ p+=1
+
+def makeLines(x,numPoints,x_each_unit,y_each_unit):
+ lines=[0]*numPoints
+ for i in range(0,numPoints-1):
+ y=gety(x,i)
+ y_next=gety(x,i+1)
+ lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
+ return lines
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$k$",
+ "y_axis_label": "$f(\\frac{1}{2})_k$",
+ "exclude_zero_label": True,
+ "x_axis_width":7,
+ "y_axis_height":7
+ }
+
+ 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)
+ sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
+ sequence.set_color(RED)
+ sequence.scale(0.35)
+ sequence.to_edge(UP+RIGHT)
+ formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
+ formula.set_color(PURPLE_C)
+ formula.scale(0.4)
+ formula.shift(5.3*RIGHT+3*UP)
+ fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
+ fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
+ fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
+ fLineText.set_color(RED)
+ fLineText.scale(0.3)
+ fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
+ points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
+ makeSeries(0.5,points,x_each_unit,y_each_unit)
+ lines=makeLines(0.5,6,x_each_unit,y_each_unit)
+
+
+ self.add(sequence)
+ self.add(formula)
+ self.setup_axes(animate=True)
+ self.play(Write(fLine))
+ self.add(fLineText)
+ for p in points:
+ self.add(p)
+ 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)
+
+ explanation1=TextMobject("Since the series","converges","to")
+ explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
+ explanation2=TextMobject("$\\frac {4}{5}$")
+ explanation2.set_color(BLUE)
+ explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
+ explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
+ explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
+ explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
+ explanation1.scale(0.5)
+ explanation3.scale(0.5)
+ explanation1.shift(1.8*DOWN+3.5*RIGHT)
+ explanation2.shift(2.4*DOWN+3.5*RIGHT)
+ explanation3.shift(1.8*DOWN+3.5*RIGHT)
+ explanation4.shift(2.4*DOWN+3.5*RIGHT)
+
+ self.play(Write(explanation1))
+ self.play(FadeIn(explanation2))
+ self.wait(1)
+ self.play(FadeOut(explanation1),FadeOut(explanation2))
+ self.play(Write(explanation3))
+ self.play(Write(explanation4))
+ self.wait(2)
--
cgit
From edf9724bbed86eb8909999a3ef704d346b7231ea Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 01:55:32 +0530
Subject: Add files via upload
---
.../y_limit_dependent_on_x.mp4 | Bin 0 -> 333938 bytes
.../y_limit_dependent_on_x.py | 112 +++++++++++++++++++++
2 files changed, 112 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4
create mode 100644 FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4 b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4
new file mode 100644
index 0000000..fe0512b
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4 differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
new file mode 100644
index 0000000..931ffd6
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
@@ -0,0 +1,112 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 3.5,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
+ }
+
+ 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.setup_axes(animate=False)
+
+ line= self.get_graph(
+ lambda x : 2-2*x ,
+ x_min = 0,
+ x_max = 1,
+ color = RED)
+ line_eqn=TextMobject("2x+y=0").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
+ self.line=line
+
+ caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
+ self.play(ShowCreation(line),Write(line_eqn))
+ # self.show_area()
+ self.show_rects()
+ self.play(Write(caption))
+ self.show_y_values_at_different_x()
+
+ self.wait(2)
+
+ ###################
+ def show_area(self):
+ area = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.0001,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def show_rects(self):
+ rects = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.02,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+ # self.play(ShowCreation(rects))
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+
+ def show_y_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[3*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff = 0)
+ y = TexMobject("y=2-2x")
+ y.next_to(brace, LEFT, SMALL_BUFF)
+ anims = [
+ rect.set_fill, YELLOW, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, BLUE, .75,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y, y),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y = y
+
+ y = last_y
+ y_brace = last_brace
+
+
--
cgit
From 3e2aac467c92c8880001f738b712e27e02fee42f Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 01:56:05 +0530
Subject: Delete Area_Under_func.mp4
---
.../Area_Under_func.mp4 | Bin 681985 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4 b/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4
deleted file mode 100644
index 7072672..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/Area_Under_func.mp4 and /dev/null differ
--
cgit
From 03280d3ac9b81f1e17cb8b39b9efa0abe05eceb9 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 01:57:21 +0530
Subject: Add files via upload
---
.../area_under_func.mp4 | Bin 0 -> 681985 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4 b/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4
new file mode 100644
index 0000000..7072672
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4 differ
--
cgit
From f3685beb51d24878be9bcd80a0bbbc51ae45f97c Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 01:58:10 +0530
Subject: Update y_limit_dependent_on_x.py
---
FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py | 1 +
1 file changed, 1 insertion(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
index 931ffd6..27fe23c 100644
--- a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
+++ b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
@@ -110,3 +110,4 @@ class AreaUnderCurve(GraphScene):
y_brace = last_brace
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 12c51f740bd53d11072a6641d1a8dee0448dbac0 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 19:52:32 +0530
Subject: Add files via upload
---
.../elementary_area.mp4 | Bin 0 -> 378325 bytes
.../elementary_area.py | 130 +++++++++++++++++++++
2 files changed, 130 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4
create mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4 b/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4
new file mode 100644
index 0000000..601a56a
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4 differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
new file mode 100644
index 0000000..fdd164d
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
@@ -0,0 +1,130 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 2,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ # "x_labeled_nums": list(np.arange(0,3)),
+ # "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
+ }
+
+ def construct(self):
+ X = self.x_axis_width/(self.x_max- self.x_min)
+ Y = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+ self.setup_axes(animate=False)
+
+ caption=TextMobject("The elementary area in ").to_edge(UP)
+ rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
+ polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
+
+ self.add(caption)
+ self.play(Write(rect_text))
+ self.get_rect_element()
+ # self.play(Write(polar_text))
+ self.play(ReplacementTransform(rect_text,polar_text),
+ FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
+ self.get_polar_element()
+
+
+
+ def get_rect_element(self):
+ rect=Rectangle(height=2, width=3,fill_color=BLUE_D, fill_opacity=1, color=BLUE_D).scale(.75).move_to(self.graph_origin+(RIGHT*self.X+UP*self.Y))
+ dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
+ dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_gr=VGroup(dx_brace,dx_label)
+
+ dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
+ dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_gr=VGroup(dy_brace,dy_label)
+
+ brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
+
+ dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
+
+ self.play(FadeIn(rect))
+ self.play(GrowFromCenter(brace_gr))
+ self.play(GrowFromCenter(dydx))
+
+ self.rect=rect
+ self.rect_brace_gr=brace_gr
+ self.dydx=dydx
+ self.wait(2)
+
+
+ def get_polar_element(self):
+ X=self.X ;Y=self.Y
+ theta1=25*DEGREES
+ dtheta=TAU/12
+ r_in=1.3*X ; r_out=1.9*X
+
+ arc=AnnularSector(
+ arc_center=self.graph_origin,
+ inner_radius=r_in,
+ outer_radius=r_out ,
+ angle= dtheta,
+ start_angle= theta1,
+ fill_opacity= 1,
+ stroke_width= 0,
+ color= BLUE_D,
+ )
+
+
+ # # #getting braces
+ r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
+ dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
+ dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=r_in_theta1)
+ dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
+ dr_brace_gr=VGroup(dr_brace,dr_label)
+
+ theta2=theta1+dtheta
+ r_out_theta2=self.graph_origin+r_out*(np.cos(theta2)*RIGHT+np.sin(theta2)*UP)
+ rdt_line=Line(r_out_theta2,r_out_theta2+DOWN*(r_out*dtheta))
+ rdt_brace=Brace(rdt_line, RIGHT, buff = MED_SMALL_BUFF).rotate(theta2-(dtheta/2), about_point=r_out_theta2)
+ rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
+ rdt_brace_gr=VGroup(rdt_brace,rdt_label)
+
+ #getting label r and dtheta
+ r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
+ r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
+ r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
+ r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
+ r_brace_gr=VGroup(r_brace,r_label)
+
+ dtheta_arc=Arc(
+ arc_center=self.graph_origin,
+ radius=.5*X,
+ angle= dtheta,
+ start_angle= theta1,
+ )
+ dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
+ dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
+
+
+ rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
+ self.play(ReplacementTransform(self.rect,arc))
+ self.wait()
+ self.play(ShowCreation(r1),ShowCreation(r2))
+ self.play(ShowCreation(r_brace_gr),Write(dtheta_label))
+ self.wait()
+ self.play(GrowFromCenter(rdt_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(dr_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(rdrdt))
+
+ self.wait(2)
+
+
+
+
+
+
+
--
cgit
From 32c6afda2e59d477f8694becd6448098ba977cb2 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 19:53:19 +0530
Subject: Update elementary_area.py
---
FSF-2020/integrals-of-multivariable-functions/elementary_area.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
index fdd164d..0ca96fe 100644
--- a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
+++ b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
@@ -125,6 +125,6 @@ class AreaUnderCurve(GraphScene):
-
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 9673d63f9e9a858f3fc63781e23e9c4303082553 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 21:50:50 +0530
Subject: Delete elementary_area.py
---
.../elementary_area.py | 130 ---------------------
1 file changed, 130 deletions(-)
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
deleted file mode 100644
index 0ca96fe..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
+++ /dev/null
@@ -1,130 +0,0 @@
-from manimlib.imports import *
-
-class AreaUnderCurve(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 2,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- # "x_labeled_nums": list(np.arange(0,3)),
- # "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
- }
-
- def construct(self):
- X = self.x_axis_width/(self.x_max- self.x_min)
- Y = self.y_axis_height/(self.y_max- self.y_min)
- self.X=X ;self.Y=Y
- self.setup_axes(animate=False)
-
- caption=TextMobject("The elementary area in ").to_edge(UP)
- rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
- polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
-
- self.add(caption)
- self.play(Write(rect_text))
- self.get_rect_element()
- # self.play(Write(polar_text))
- self.play(ReplacementTransform(rect_text,polar_text),
- FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
- self.get_polar_element()
-
-
-
- def get_rect_element(self):
- rect=Rectangle(height=2, width=3,fill_color=BLUE_D, fill_opacity=1, color=BLUE_D).scale(.75).move_to(self.graph_origin+(RIGHT*self.X+UP*self.Y))
- dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
- dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_gr=VGroup(dx_brace,dx_label)
-
- dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
- dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_gr=VGroup(dy_brace,dy_label)
-
- brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
-
- dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
-
- self.play(FadeIn(rect))
- self.play(GrowFromCenter(brace_gr))
- self.play(GrowFromCenter(dydx))
-
- self.rect=rect
- self.rect_brace_gr=brace_gr
- self.dydx=dydx
- self.wait(2)
-
-
- def get_polar_element(self):
- X=self.X ;Y=self.Y
- theta1=25*DEGREES
- dtheta=TAU/12
- r_in=1.3*X ; r_out=1.9*X
-
- arc=AnnularSector(
- arc_center=self.graph_origin,
- inner_radius=r_in,
- outer_radius=r_out ,
- angle= dtheta,
- start_angle= theta1,
- fill_opacity= 1,
- stroke_width= 0,
- color= BLUE_D,
- )
-
-
- # # #getting braces
- r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
- dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
- dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=r_in_theta1)
- dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
- dr_brace_gr=VGroup(dr_brace,dr_label)
-
- theta2=theta1+dtheta
- r_out_theta2=self.graph_origin+r_out*(np.cos(theta2)*RIGHT+np.sin(theta2)*UP)
- rdt_line=Line(r_out_theta2,r_out_theta2+DOWN*(r_out*dtheta))
- rdt_brace=Brace(rdt_line, RIGHT, buff = MED_SMALL_BUFF).rotate(theta2-(dtheta/2), about_point=r_out_theta2)
- rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
- rdt_brace_gr=VGroup(rdt_brace,rdt_label)
-
- #getting label r and dtheta
- r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
- r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
- r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
- r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
- r_brace_gr=VGroup(r_brace,r_label)
-
- dtheta_arc=Arc(
- arc_center=self.graph_origin,
- radius=.5*X,
- angle= dtheta,
- start_angle= theta1,
- )
- dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
- dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
-
-
- rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
- self.play(ReplacementTransform(self.rect,arc))
- self.wait()
- self.play(ShowCreation(r1),ShowCreation(r2))
- self.play(ShowCreation(r_brace_gr),Write(dtheta_label))
- self.wait()
- self.play(GrowFromCenter(rdt_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(dr_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(rdrdt))
-
- self.wait(2)
-
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
-
-
--
cgit
From d6c4122bbce6752750a81e49a2627a26b9443046 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 21:51:10 +0530
Subject: Add files via upload
---
.../elementary_area.py | 148 +++++++++++++++++++++
1 file changed, 148 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
new file mode 100644
index 0000000..3fd3f20
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
@@ -0,0 +1,148 @@
+from manimlib.imports import *
+
+class ElementaryArea(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 2,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ # "x_labeled_nums": list(np.arange(0,3)),
+ # "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
+ }
+
+ def construct(self):
+ X = self.x_axis_width/(self.x_max- self.x_min)
+ Y = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+ self.setup_axes(animate=False)
+
+ caption=TextMobject("The elementary area in ").to_edge(UP)
+ rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
+ polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
+
+ self.add(caption)
+ self.play(Write(rect_text))
+ self.get_rect_element()
+ # self.play(Write(polar_text))
+ self.play(ReplacementTransform(rect_text,polar_text),
+ FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
+ self.get_polar_element()
+
+
+
+ def get_rect_element(self):
+ rect=Rectangle(
+ height=2, width=3,fill_color=BLUE_D,
+ fill_opacity=1, color=BLUE_D
+ ).scale(.75).move_to(
+ self.graph_origin+(RIGHT*self.X+UP*self.Y)
+ )
+ dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
+ dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_gr=VGroup(dx_brace,dx_label)
+
+ dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
+ dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_gr=VGroup(dy_brace,dy_label)
+
+ brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
+
+ dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
+
+ self.play(FadeIn(rect))
+ self.play(GrowFromCenter(brace_gr))
+ self.play(GrowFromCenter(dydx))
+
+ self.rect=rect
+ self.rect_brace_gr=brace_gr
+ self.dydx=dydx
+ self.wait(2)
+
+
+ def get_polar_element(self):
+ X=self.X ;Y=self.Y
+ theta1=25*DEGREES
+ dtheta=TAU/12
+ r_in=1.3*X ; r_out=1.9*X
+
+ arc=AnnularSector(
+ arc_center=self.graph_origin,
+ inner_radius=r_in,
+ outer_radius=r_out ,
+ angle= dtheta,
+ start_angle= theta1,
+ fill_opacity= 1,
+ stroke_width= 0,
+ color= BLUE_D,
+ )
+
+
+ # # #getting braces
+ r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
+ dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
+ dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
+ ).rotate(theta1, about_point=r_in_theta1
+ )
+ dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
+ dr_brace_gr=VGroup(dr_brace,dr_label)
+
+ theta2=theta1+dtheta
+ r_out_theta2=self.graph_origin+r_out*(
+ np.cos(theta2)*RIGHT+np.sin(theta2)*UP
+ )
+ rdt_line=Line(r_out_theta2,r_out_theta2
+ +DOWN*(r_out*dtheta)
+ )
+ rdt_brace=Brace(rdt_line, RIGHT,
+ buff = MED_SMALL_BUFF).rotate(
+ theta2-(dtheta/2), about_point=r_out_theta2
+ )
+ rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
+ rdt_brace_gr=VGroup(rdt_brace,rdt_label)
+
+ #getting label r and dtheta
+ r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
+ r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
+ r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
+ r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
+ r_brace_gr=VGroup(r_brace,r_label)
+
+ dtheta_arc=Arc(
+ arc_center=self.graph_origin,
+ radius=.5*X,
+ angle= dtheta,
+ start_angle= theta1,
+ )
+ dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
+ dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
+
+
+ rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
+ self.play(ReplacementTransform(self.rect,arc))
+ self.wait()
+ self.play(ShowCreation(r1),
+ ShowCreation(r2)
+ )
+ self.play(ShowCreation(r_brace_gr),
+ Write(dtheta_label)
+ )
+ self.wait()
+ self.play(GrowFromCenter(rdt_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(dr_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(rdrdt))
+
+ self.wait(2)
+
+
+
+
+
+
+
--
cgit
From c1ad559e7f629912215949158680b26fe2986aba Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Sun, 17 May 2020 21:52:11 +0530
Subject: Update elementary_area.py
---
FSF-2020/integrals-of-multivariable-functions/elementary_area.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
index 3fd3f20..362b6f8 100644
--- a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
+++ b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
@@ -141,8 +141,4 @@ class ElementaryArea(GraphScene):
self.wait(2)
-
-
-
-
-
+ #uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From d0c166b9eec77361ccb50eec31d0c039abd05f20 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 01:57:55 +0530
Subject: Add files via upload
---
.../SurfacesAnimation.mp4 | Bin 0 -> 350623 bytes
.../surface.py | 234 +++++++++++++++++++++
2 files changed, 234 insertions(+)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4
create mode 100644 FSF-2020/integrals-of-multivariable-functions/surface.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4 b/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4
new file mode 100644
index 0000000..181615d
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4 differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/surface.py b/FSF-2020/integrals-of-multivariable-functions/surface.py
new file mode 100644
index 0000000..6148ec8
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/surface.py
@@ -0,0 +1,234 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":2 ,"b": 6, "c":1 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.8,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.07)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(3)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.c,
+ "u_max": axes.d,
+ "v_min": axes.a,
+ "v_max": axes.b,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 1e-5
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
--
cgit
From 6cc272d9fa727db9162d1fa0ff0e33c645c7eda1 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 01:58:48 +0530
Subject: Update surface.py
---
FSF-2020/integrals-of-multivariable-functions/surface.py | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/surface.py b/FSF-2020/integrals-of-multivariable-functions/surface.py
index 6148ec8..8fb4b45 100644
--- a/FSF-2020/integrals-of-multivariable-functions/surface.py
+++ b/FSF-2020/integrals-of-multivariable-functions/surface.py
@@ -232,3 +232,5 @@ class SurfacesAnimation(ThreeDScene):
return axes
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 8f21bfeeaef888ffed958d933b58b057bf215e42 Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 14:59:46 +0530
Subject: Update surface.py
---
FSF-2020/integrals-of-multivariable-functions/surface.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/surface.py b/FSF-2020/integrals-of-multivariable-functions/surface.py
index 8fb4b45..a794f46 100644
--- a/FSF-2020/integrals-of-multivariable-functions/surface.py
+++ b/FSF-2020/integrals-of-multivariable-functions/surface.py
@@ -10,7 +10,7 @@ class SurfacesAnimation(ThreeDScene):
"y_max": 8,
"z_min": 0,
"z_max": 6,
- "a":2 ,"b": 6, "c":1 , "d":6,
+ "a":1 ,"b": 6, "c":2 , "d":6,
"axes_shift":-3*OUT + 5*LEFT,
"x_axis_config": {
"tick_frequency": 1,
@@ -80,10 +80,10 @@ class SurfacesAnimation(ThreeDScene):
def get_surface(self,axes, func, **kwargs):
config = {
- "u_min": axes.c,
- "u_max": axes.d,
- "v_min": axes.a,
- "v_max": axes.b,
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
"resolution": (
(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
(axes.x_max - axes.x_min) // axes.x_axis.tick_frequency,
@@ -153,7 +153,7 @@ class SurfacesAnimation(ThreeDScene):
# Add xy-plane
input_plane = self.get_surface(
- axes, lambda x, t: 1e-5
+ axes, lambda x, t: 0
)
input_plane.set_style(
fill_opacity=0.5,
--
cgit
From 8088f5ff7693e9a6d02f74876b39f9729737024f Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 20:22:43 +0530
Subject: Update y_limit_dependent_on_x.py
---
.../y_limit_dependent_on_x.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
index 27fe23c..4894ebf 100644
--- a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
+++ b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
@@ -1,6 +1,6 @@
from manimlib.imports import *
-class AreaUnderCurve(GraphScene):
+class YlimitXdependent(GraphScene):
CONFIG = {
"x_min" : 0,
"x_max" : 1,
@@ -26,7 +26,7 @@ class AreaUnderCurve(GraphScene):
x_min = 0,
x_max = 1,
color = RED)
- line_eqn=TextMobject("2x+y=0").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
+ line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
self.line=line
caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
@@ -36,7 +36,7 @@ class AreaUnderCurve(GraphScene):
self.play(Write(caption))
self.show_y_values_at_different_x()
- self.wait(2)
+ self.wait(.5)
###################
def show_area(self):
@@ -59,10 +59,10 @@ class AreaUnderCurve(GraphScene):
self.line,
x_min = 0,
x_max = 1,
- dx =.02,
+ dx =.01,
start_color = BLUE,
end_color = BLUE,
- fill_opacity = 0.75,
+ fill_opacity =1,
stroke_width = 0,
)
# self.play(ShowCreation(rects))
@@ -81,10 +81,10 @@ class AreaUnderCurve(GraphScene):
last_rect = None
for rect in rects_subset:
brace = Brace(rect, LEFT, buff = 0)
- y = TexMobject("y=2-2x")
+ y = TexMobject("y=2-2x")#.rotate(PI/2)
y.next_to(brace, LEFT, SMALL_BUFF)
anims = [
- rect.set_fill, YELLOW, 1,
+ rect.set_fill, BLUE_E, 1,
dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
]
if last_rect is not None:
@@ -109,5 +109,5 @@ class AreaUnderCurve(GraphScene):
y = last_y
y_brace = last_brace
-
+
#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 604c28e69ed79802a3e5bbfb5bca58811a0d900c Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 20:23:13 +0530
Subject: Delete y_limit_dependent_on_x.mp4
---
.../y_limit_dependent_on_x.mp4 | Bin 333938 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4 b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4
deleted file mode 100644
index fe0512b..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.mp4 and /dev/null differ
--
cgit
From 9e06815dc88c15da39281983b62bbf3c1bf00ddc Mon Sep 17 00:00:00 2001
From: panditsomnath10016git
Date: Tue, 19 May 2020 20:24:16 +0530
Subject: Add files via upload
---
.../YlimitXdependent.gif | Bin 0 -> 1170435 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif b/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif
new file mode 100644
index 0000000..a2bfd9d
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif differ
--
cgit
From 9694b0856d1c9a7bc384d806172d5b35a7848576 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:54:32 +0530
Subject: Add files via upload
---
.../Taylor Series/script1.py | 198 +++++++++++++++++++++
.../Taylor Series/script2.py | 195 ++++++++++++++++++++
.../Taylor Series/script3.py | 111 ++++++++++++
.../Taylor Series/script4.py | 82 +++++++++
4 files changed, 586 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/Taylor Series/script1.py
create mode 100644 FSF-2020/series-and-transformations/Taylor Series/script2.py
create mode 100644 FSF-2020/series-and-transformations/Taylor Series/script3.py
create mode 100644 FSF-2020/series-and-transformations/Taylor Series/script4.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script1.py b/FSF-2020/series-and-transformations/Taylor Series/script1.py
new file mode 100644
index 0000000..e83eff8
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Taylor Series/script1.py
@@ -0,0 +1,198 @@
+from manimlib.imports import*
+import math
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+class intro(Scene):
+ def construct(self):
+ equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
+ equation.scale(2)
+ equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
+ text=TextMobject("let $a=0$")
+ text.scale(0.7)
+ text.shift(DOWN)
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text))
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ self.wait(1.4)
+
+ coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
+ coeff[0].shift(3.39*UP+4.88*RIGHT)
+ coeff[0].scale(0.5)
+ coeff[1].shift(3.39*UP+5.3*RIGHT)
+ coeff[1].scale(0.275)
+ coeff[2].shift(3.39*UP+5.98*RIGHT)
+ coeff[2].scale(0.28)
+
+ for obj in coeff:
+ obj.set_color(GOLD_A)
+
+ firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
+ secondApprox=[self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:x+1,color=BLUE),
+ self.get_graph(lambda x:-x+1,color=BLUE)]
+ thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
+
+ firstGraph=self.get_graph(lambda x:1,color=BLUE)
+ secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
+
+ bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence the","slopes","should","even match")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
+
+ bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
+ self.wait(1)
+ self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
+ self.wait(0.6)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
+ finalFormula.scale(0.8)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
+
+ 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/series-and-transformations/Taylor Series/script2.py b/FSF-2020/series-and-transformations/Taylor Series/script2.py
new file mode 100644
index 0000000..b5d0a53
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Taylor Series/script2.py
@@ -0,0 +1,195 @@
+from manimlib.imports import*
+import math
+
+
+class intro(Scene):
+ def construct(self):
+ 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.scale(0.7)
+ text.shift(DOWN)
+
+ shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
+ shiftText.scale(0.6)
+ shiftText.shift(2.4*DOWN)
+
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(Write(shiftText))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ 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)
+
+ 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)]
+
+ 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)
+
+ bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
+
+ bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ 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)
+ self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ 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)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ 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)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
+
+ 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
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script3.py b/FSF-2020/series-and-transformations/Taylor Series/script3.py
new file mode 100644
index 0000000..a2870d4
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Taylor Series/script3.py
@@ -0,0 +1,111 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+
+ bottomText1=TextMobject("Apply $f(x)=T_{n}(x)$")
+ bottomText2=TextMobject("Then apply $f'(x)=T_{n}'(x)$")
+ bottomText3=TextMobject("Then apply $f''(x)=T_{n}''(x)$")
+ bottomText4=TextMobject("and so on..")
+
+ bottomText1.scale(0.5)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.5)
+ bottomText4.scale(0.5)
+
+ bottomText1.shift(3*RIGHT+2*DOWN)
+ bottomText2.shift(3*RIGHT+2*DOWN)
+ bottomText3.shift(3*RIGHT+2*DOWN)
+ bottomText4.shift(3*RIGHT+2*DOWN)
+
+ equations=[self.get_graph(lambda x:math.log2(2),color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)]
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(Write(bottomText1))
+ self.wait(0.5)
+ self.play(ShowCreation(equations[0]),Write(terms[0]),Write(terms[1]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText1,bottomText2))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[0],equations[1]),Write(terms[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[1],equations[2]),Write(terms[3]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),Write(terms[4]))
+ self.wait(1.5)
+
+ self.play(FadeOut(terms[0]),FadeOut(terms[1]),FadeOut(terms[2]),FadeOut(terms[3]),FadeOut(terms[4]),FadeOut(bottomText4))
+
+ dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
+ dline.shift(ORIGIN+x_each_unit*4*RIGHT)
+
+ bottomText5=TextMobject("Here","after $x=4$",", the graph","continuously diverges away","from $ln(x)$")
+ bottomText5.scale(0.3)
+ bottomText5.shift(4.5*RIGHT+2*DOWN)
+ bottomText5.set_color_by_tex_to_color_map({"after $x=4$":YELLOW,"continuously diverges away":BLUE})
+
+ self.play(Write(bottomText5),Write(dline))
+ self.wait(1)
+ self.play(ReplacementTransform(equations[2],equations[3]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[3],equations[4]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[4],equations[5]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[5],equations[6]),FadeOut(bottomText5))
+ self.wait(1)
+
+ circle=Circle(radius=ORIGIN+x_each_unit*2,color=PURPLE_E)
+ circle.shift(ORIGIN+RIGHT*x_each_unit*2)
+ radiusLine=Line(start=ORIGIN+x_each_unit*RIGHT*2,end=ORIGIN+x_each_unit*4*RIGHT,color=PURPLE_E)
+ radius=TextMobject("$R$")
+ radius.set_color(RED)
+ radius.scale(0.5)
+ radius.shift(ORIGIN+RIGHT*x_each_unit*2.45+DOWN*y_each_unit*0.6)
+
+ self.play(FadeOut(equations[6]),Write(circle))
+ self.wait(0.6)
+ self.play(Write(radiusLine))
+ self.play(FadeIn(radius))
+ self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script4.py b/FSF-2020/series-and-transformations/Taylor Series/script4.py
new file mode 100644
index 0000000..1f41c97
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Taylor Series/script4.py
@@ -0,0 +1,82 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+ equation=self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(FadeIn(equation),FadeIn(terms[0]),FadeIn(terms[1]),FadeIn(terms[2]),FadeIn(terms[3]),FadeIn(terms[4]))
+ self.wait(1)
+
+ 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)
+ increasingText=TextMobject("Increases!")
+ increasingText.set_color(GREEN)
+ followupText=TextMobject("as n increase!")
+ followupText.scale(0.3)
+ followupText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.1)
+ increasingText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.6)
+ 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)
+
+ area1=self.get_riemann_rectangles(lnx,x_max=8,x_min=4,dx=0.01,start_color=BLUE,end_color=RED,stroke_width=0,fill_opacity=0.8)
+ area2=self.get_riemann_rectangles(equation,x_max=5.2,x_min=4,dx=0.025,start_color=BLACK,end_color=BLACK,stroke_width=0,fill_opacity=1)
+
+ 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
--
cgit
From 1ab1ce110d689ca0bb32cef62e3b9a4b01ba4820 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:57:41 +0530
Subject: Delete script1.py
---
FSF-2020/series-and-transformations/script1.py | 128 -------------------------
1 file changed, 128 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script1.py b/FSF-2020/series-and-transformations/script1.py
deleted file mode 100644
index 28eb07c..0000000
--- a/FSF-2020/series-and-transformations/script1.py
+++ /dev/null
@@ -1,128 +0,0 @@
-from manimlib.imports import *
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- expansion.scale(0.7)
- return expansion
-
-class pieChart(Scene):
- def construct(self):
- circle1=Circle(radius=3,color=BLUE)
- powerText=TextMobject("Power Series")
- powerText.scale(0.8)
- self.play(FadeIn(powerText))
- self.play(ShowCreation(circle1))
- self.wait(1)
-
- powerGroup=VGroup(circle1,powerText)
-
- self.play(ApplyMethod(powerGroup.scale,0.5))
- self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
- self.wait(0.5)
- expansion_power_coeff=[]
- variables_power=[]
- expansion_power=formFormula(expansion_power_coeff,variables_power)
- self.play(ReplacementTransform(powerText,expansion_power))
- self.wait(1)
-
- circle2=Circle(radius=1.5)
- circle2.shift(2.2*UP)
- expansion_geo_coeff=[0]*3
- variables_geo=[0]*3
- arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
- expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_geo_coeff[i].set_color(GOLD_A)
- variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
- if i!=2:
- expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_geo[2])
- expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
- expansion_geo.scale(0.7)
-
- self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
- self.add(arrow1_2)
- self.wait(1)
-
- ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
- for i in range(0,3):
- ones[i].set_color(GOLD_A)
- ones[0].shift(0.3*DOWN,5*LEFT)
- ones[1].next_to(ones[0],buff=0.5)
- ones[2].next_to(ones[1],buff=0.7)
- self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
- self.wait(1)
- expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
-
- expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
- expansion_geo_final.scale(0.8)
- expansion_geo_final.shift(0.3*DOWN+4*LEFT)
- self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
- self.wait(1)
-
- circle3=Circle(radius=1.5,color=GREEN)
- circle3.shift(2.2*UP)
- expansion_taylor_coeff=[0]*3
- variables_taylor=[0]*3
- arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
- expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_taylor_coeff[i].set_color(GOLD_A)
- variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
- if i!=2:
- expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_taylor[2])
- expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
- expansion_taylor.scale(0.7)
-
- self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
- self.add(arrow1_3)
- self.wait(1)
-
- differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
- for i in range(0,3):
- differentials[i].set_color(GOLD_A)
- differentials[0].shift(1.8*DOWN+1.15*LEFT)
- differentials[1].shift(1.8*DOWN+0.45*LEFT)
- differentials[2].shift(1.8*DOWN+0.45*RIGHT)
- differentials[0].scale(0.35)
- differentials[1].scale(0.35)
- differentials[2].scale(0.35)
- self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
- self.wait(2)
- expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
-
- self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
- geoText=TextMobject("Geometric Series")
- geoText.scale(0.7)
- geoText.shift(4*LEFT+0.3*DOWN)
- taylorText=TextMobject("Taylor Series")
- taylorText.scale(0.7)
- taylorText.shift(1.8*DOWN)
- self.play(FadeIn(geoText),FadeIn(taylorText))
- self.wait(1)
-
- soOntext=TextMobject("So on..!")
- soOntext.shift(4*RIGHT)
- soOntext.scale(0.8)
- self.play(FadeIn(soOntext))
- self.wait(2)
--
cgit
From 0b582c521b19e54183bb8c54525384ca45be1e9a Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:57:51 +0530
Subject: Delete script2.py
---
FSF-2020/series-and-transformations/script2.py | 94 --------------------------
1 file changed, 94 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script2.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script2.py b/FSF-2020/series-and-transformations/script2.py
deleted file mode 100644
index 72356c6..0000000
--- a/FSF-2020/series-and-transformations/script2.py
+++ /dev/null
@@ -1,94 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-
-class convergence(Scene):
- def construct(self):
- originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
- originalFormula.set_color(RED)
- self.play(Write(originalFormula))
- self.wait(1)
- self.play(ApplyMethod(originalFormula.shift,2.7*UP))
- self.wait(1)
-
- terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
- termsTogetherString="+".join(terms)
- termsTogether=TextMobject(termsTogetherString+"...")
- termsTogether.scale(0.8)
- termsTogether.shift(2.7*UP)
- self.play(ReplacementTransform(originalFormula,termsTogether))
- self.wait(1)
-
- termMobjectRect=[0]*12
- termMobject=TextMobject(terms[0])
- termMobject.shift(2.7*UP+6.2*LEFT)
- for i in range(1,13):
- termMobjectOld=termMobject
- termMobjectOld.scale(0.8)
- if(i<12):
- termMobject=TextMobject(terms[i])
- termMobject.next_to(termMobjectOld)
- if(i==1):
- rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
- rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
- rectDefine.scale(0.7)
- rectDefine.shift(3.2*DOWN)
- self.play(Write(rectDefine))
- self.wait(1)
- if(i==2):
- ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
- ratio.set_color(RED)
- ratio.scale(0.7)
- ratio.move_to(3.2*DOWN)
- inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
- inequality.set_color(RED)
- inequality.scale(0.7)
- inequality.move_to(3.2*DOWN)
- self.play(FadeOut(rectDefine))
- self.play(Write(ratio))
- self.wait(1)
- self.play(ReplacementTransform(ratio,inequality))
- self.wait(1)
- #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
- termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
- termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
- #rectangles[p] = termMobjectRect
- #p+=1
- self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
-
- uparrow=TextMobject("$\\uparrow$")
- uparrow.set_color(GREEN)
- uparrow.scale(6)
- uparrow.shift(4*RIGHT+0.5*DOWN)
- self.play(ShowCreation(uparrow))
- self.wait(1)
-
- converges=TextMobject("Converges!")
- converges.set_color(RED)
- converges.scale(0.6)
- converges.next_to(uparrow)
- self.play(FadeIn(converges))
- self.wait(2)
-
- self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
- self.wait(0.5)
- rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
- self.play(ApplyMethod(rect.scale,0.2))
- for i in range(0,12):
- self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
- func=TextMobject("$\\approx$","$f(x)$")
- func.set_color_by_tex_to_color_map({"$f(x)$":RED})
- func.scale(0.8)
- func.shift(DOWN+4.5*RIGHT+0.1*UP)
- self.play(FadeIn(func))
-
- rightarrow=TextMobject("$\\rightarrow$")
- rightarrow.set_color(GREEN)
- rightarrow.scale(4)
- rightarrow.shift(2*DOWN)
- converges=TextMobject("Hence even the","sum converges!")
- converges.set_color_by_tex_to_color_map({"sum converges!":RED})
- converges.move_to(3*DOWN)
- converges.scale(0.7)
- self.play(Write(rightarrow),FadeIn(converges))
- self.wait(2)
--
cgit
From 08d2381f9cc7456169c8173241a0ef1625c4691e Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:58:00 +0530
Subject: Delete script3.py
---
FSF-2020/series-and-transformations/script3.py | 156 -------------------------
1 file changed, 156 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script3.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script3.py b/FSF-2020/series-and-transformations/script3.py
deleted file mode 100644
index f710f42..0000000
--- a/FSF-2020/series-and-transformations/script3.py
+++ /dev/null
@@ -1,156 +0,0 @@
-from manimlib.imports import*
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Let's analyse")
- introText2=TextMobject("for")
- function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
- function_main.set_color(GREEN)
- introText1.scale(1.2)
- introText1.shift(2*UP)
- introText2.scale(0.7)
- introText2.shift(UP)
- function_main.scale(2)
- function_main.shift(DOWN)
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(1.2)
- function_expan.shift(2*UP)
-
- self.play(Write(introText1))
- self.play(FadeIn(introText2))
- self.wait(0.5)
- self.play(Write(function_main))
- self.wait(1)
-
- self.play(FadeOut(introText1),FadeOut(introText2))
- self.play(ApplyMethod(function_main.shift,3*UP))
- self.wait(0.5)
- self.play(ReplacementTransform(function_main,function_expan))
- self.wait(1)
- self.play(ApplyMethod(function_expan.scale,0.5))
- function_expan.to_edge(UP+RIGHT)
- self.play(ReplacementTransform(function_expan,function_expan))
- self.wait(1)
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1)
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(0.6)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes(animate=True)
-
- eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
- for i in range(0,len(eqText)):
- 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)
- equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
- equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
- equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
- equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
- equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
- equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
- equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
-
- textBtwAnim1=TextMobject("Here the graph just","oscilates")
- textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
- textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
- textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
- textBtwAnim3=TextMobject("$x=1$")
- textBtwAnim1.scale(0.4)
- textBtwAnim2.scale(0.4)
- textBtwAnim3.scale(1.2)
- textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
- textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
- textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
-
- self.play(ShowCreation(equation1),run_time=0.8)
- self.add(eqText[0])
- self.wait(1)
- self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
- self.wait(0.4)
- self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
- self.wait(0.3)
- self.play(FadeOut(eqText[3]))
- self.play(FadeIn(eqTextTerm))
- self.play(Write(textBtwAnim1),Write(textBtwAnim2))
- self.play(FadeIn(textBtwAnim3))
- self.play(ReplacementTransform(equation4,equation5))
- self.wait(0.2)
- self.play(ReplacementTransform(equation5,equation6))
- self.wait(0.2)
- self.play(ReplacementTransform(equation6,equation7))
- self.wait(0.2)
- self.play(ReplacementTransform(equation7,equation8))
- self.wait(0.2)
- self.play(ReplacementTransform(equation8,equation9))
- self.wait(0.2)
- self.play(ReplacementTransform(equation9,equation10))
- self.wait(1)
-
- self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
- self.wait(1)
-
- convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
- divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
- divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
- circle1=Circle(radius=0.01,color=PURPLE_E)
- circle2=Circle(radius=0.01,color=PURPLE_E)
- circle1.shift(ORIGIN+LEFT*x_each_unit)
- circle2.shift(ORIGIN+RIGHT*x_each_unit)
- convergeText=TextMobject("Converges")
- divergeText1=TextMobject("Diverges")
- divergeText2=TextMobject("Diverges")
- convergeText.set_color(GREEN)
- divergeText1.set_color(RED)
- divergeText2.set_color(RED)
- convergeText.scale(0.5)
- divergeText1.scale(0.5)
- divergeText2.scale(0.5)
- convergeText.shift(1.6*UP)
- divergeText1.shift(0.3*UP+1.5*LEFT)
- divergeText2.shift(0.3*UP+1.5*RIGHT)
- self.play(Write(divergeLineLeft),Write(divergeLineRight))
- self.play(FadeIn(convergeLine))
- self.wait(0.5)
- self.play(FadeOut(self.axes))
- self.play(Write(circle1),Write(circle2))
- self.wait(0.5)
- self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
- self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
- self.wait(2)
-
--
cgit
From 01836aac381b74d570f67c56caae8b16c624401d Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:58:08 +0530
Subject: Delete script4.py
---
FSF-2020/series-and-transformations/script4.py | 108 -------------------------
1 file changed, 108 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script4.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script4.py b/FSF-2020/series-and-transformations/script4.py
deleted file mode 100644
index 412d20c..0000000
--- a/FSF-2020/series-and-transformations/script4.py
+++ /dev/null
@@ -1,108 +0,0 @@
-from manimlib.imports import *
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Consider the","above","example..")
- introText1.scale(0.8)
- introText1.set_color_by_tex_to_color_map({"above":YELLOW})
- self.play(Write(introText1))
- self.wait(1)
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -5,
- "x_max": 5,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1),
- "y_axis_height":7,
- "x_axis_width":7
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.scale(0.6)
- function_expan.set_color(RED)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes()
-
- equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
- self.play(ShowCreation(equation))
- self.wait(1)
-
- dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
- dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
- radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
- rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
- circle=Circle(radius=x_each_unit)
- movingPoint=Circle(radius=0.025)
- movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
- circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
- circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
-
- self.play(Write(dashLineLeft),Write(dashLineRight))
- self.wait(1)
-
- equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
- self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
- self.wait(0.5)
- self.play(Write(radiusLine))
- self.play(MoveAlongPath(movingPoint,circleEq1))
- self.play(MoveAlongPath(movingPoint,circleEq2))
- self.play(FadeIn(circle))
- self.wait(1)
-
- radiusText=TextMobject("Radius of convergence")
- radiusText.scale(0.14)
- radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
-
- self.play(Write(radiusText))
- self.wait(0.6)
-
- 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.3)
-
- self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
- extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
- self.play(Write(extendLine))
- doubleArrow=TextMobject("$\longleftrightarrow$")
- doubleArrow.scale(1.6)
- doubleArrow.set_color(BLUE)
- doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
- self.play(FadeIn(doubleArrow))
- self.wait(1)
- rangeText=TextMobject("Interval of convergence")
- rangeText.scale(0.15)
- rangeText.shift(ORIGIN+y_each_unit*DOWN)
- self.play(Write(rangeText))
- self.wait(0.6)
-
- 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)
--
cgit
From 828202816418ededf16deb15d3cf37d930ad5452 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:58:16 +0530
Subject: Delete script5.py
---
FSF-2020/series-and-transformations/script5.py | 136 -------------------------
1 file changed, 136 deletions(-)
delete mode 100644 FSF-2020/series-and-transformations/script5.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/script5.py b/FSF-2020/series-and-transformations/script5.py
deleted file mode 100644
index e9681aa..0000000
--- a/FSF-2020/series-and-transformations/script5.py
+++ /dev/null
@@ -1,136 +0,0 @@
-from manimlib.imports import *
-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)
-
-
-def gety(x,n):
- ans=0
- for i in range(0,n+1):
- if(i%2==0):
- ans+=(math.pow(x,2*i))
- else:
- ans-=(math.pow(x,2*i))
- return ans
-
-def makeSeries(x,points,x_each_unit,y_each_unit):
- p=0
- for point in points:
- y=gety(x,p)
- point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
- p+=1
-
-def makeLines(x,numPoints,x_each_unit,y_each_unit):
- lines=[0]*numPoints
- for i in range(0,numPoints-1):
- y=gety(x,i)
- y_next=gety(x,i+1)
- lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
- return lines
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -6,
- "x_max": 6,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$k$",
- "y_axis_label": "$f(\\frac{1}{2})_k$",
- "exclude_zero_label": True,
- "x_axis_width":7,
- "y_axis_height":7
- }
-
- 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)
- sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
- sequence.set_color(RED)
- sequence.scale(0.35)
- sequence.to_edge(UP+RIGHT)
- formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
- formula.set_color(PURPLE_C)
- formula.scale(0.4)
- formula.shift(5.3*RIGHT+3*UP)
- fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
- fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
- fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
- fLineText.set_color(RED)
- fLineText.scale(0.3)
- fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
- points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
- makeSeries(0.5,points,x_each_unit,y_each_unit)
- lines=makeLines(0.5,6,x_each_unit,y_each_unit)
-
-
- self.add(sequence)
- self.add(formula)
- self.setup_axes(animate=True)
- self.play(Write(fLine))
- self.add(fLineText)
- for p in points:
- self.add(p)
- 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)
-
- explanation1=TextMobject("Since the series","converges","to")
- explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
- explanation2=TextMobject("$\\frac {4}{5}$")
- explanation2.set_color(BLUE)
- explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
- explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
- explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
- explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
- explanation1.scale(0.5)
- explanation3.scale(0.5)
- explanation1.shift(1.8*DOWN+3.5*RIGHT)
- explanation2.shift(2.4*DOWN+3.5*RIGHT)
- explanation3.shift(1.8*DOWN+3.5*RIGHT)
- explanation4.shift(2.4*DOWN+3.5*RIGHT)
-
- self.play(Write(explanation1))
- self.play(FadeIn(explanation2))
- self.wait(1)
- self.play(FadeOut(explanation1),FadeOut(explanation2))
- self.play(Write(explanation3))
- self.play(Write(explanation4))
- self.wait(2)
--
cgit
From 6391e4ee7b577235ab4e50ab59e44f58ca0cf50a Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 19 May 2020 23:58:33 +0530
Subject: Add files via upload
---
.../Power Series/script1.py | 128 +++++++++++++++++
.../Power Series/script2.py | 94 +++++++++++++
.../Power Series/script3.py | 156 +++++++++++++++++++++
.../Power Series/script4.py | 108 ++++++++++++++
.../Power Series/script5.py | 136 ++++++++++++++++++
5 files changed, 622 insertions(+)
create mode 100644 FSF-2020/series-and-transformations/Power Series/script1.py
create mode 100644 FSF-2020/series-and-transformations/Power Series/script2.py
create mode 100644 FSF-2020/series-and-transformations/Power Series/script3.py
create mode 100644 FSF-2020/series-and-transformations/Power Series/script4.py
create mode 100644 FSF-2020/series-and-transformations/Power Series/script5.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/Power Series/script1.py b/FSF-2020/series-and-transformations/Power Series/script1.py
new file mode 100644
index 0000000..28eb07c
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Power Series/script1.py
@@ -0,0 +1,128 @@
+from manimlib.imports import *
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ expansion.scale(0.7)
+ return expansion
+
+class pieChart(Scene):
+ def construct(self):
+ circle1=Circle(radius=3,color=BLUE)
+ powerText=TextMobject("Power Series")
+ powerText.scale(0.8)
+ self.play(FadeIn(powerText))
+ self.play(ShowCreation(circle1))
+ self.wait(1)
+
+ powerGroup=VGroup(circle1,powerText)
+
+ self.play(ApplyMethod(powerGroup.scale,0.5))
+ self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
+ self.wait(0.5)
+ expansion_power_coeff=[]
+ variables_power=[]
+ expansion_power=formFormula(expansion_power_coeff,variables_power)
+ self.play(ReplacementTransform(powerText,expansion_power))
+ self.wait(1)
+
+ circle2=Circle(radius=1.5)
+ circle2.shift(2.2*UP)
+ expansion_geo_coeff=[0]*3
+ variables_geo=[0]*3
+ arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
+ expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_geo_coeff[i].set_color(GOLD_A)
+ variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_geo[2])
+ expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+ expansion_geo.scale(0.7)
+
+ self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
+ self.add(arrow1_2)
+ self.wait(1)
+
+ ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
+ for i in range(0,3):
+ ones[i].set_color(GOLD_A)
+ ones[0].shift(0.3*DOWN,5*LEFT)
+ ones[1].next_to(ones[0],buff=0.5)
+ ones[2].next_to(ones[1],buff=0.7)
+ self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
+ self.wait(1)
+ expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+
+ expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
+ expansion_geo_final.scale(0.8)
+ expansion_geo_final.shift(0.3*DOWN+4*LEFT)
+ self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
+ self.wait(1)
+
+ circle3=Circle(radius=1.5,color=GREEN)
+ circle3.shift(2.2*UP)
+ expansion_taylor_coeff=[0]*3
+ variables_taylor=[0]*3
+ arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
+ expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_taylor_coeff[i].set_color(GOLD_A)
+ variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_taylor[2])
+ expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+ expansion_taylor.scale(0.7)
+
+ self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
+ self.add(arrow1_3)
+ self.wait(1)
+
+ differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
+ for i in range(0,3):
+ differentials[i].set_color(GOLD_A)
+ differentials[0].shift(1.8*DOWN+1.15*LEFT)
+ differentials[1].shift(1.8*DOWN+0.45*LEFT)
+ differentials[2].shift(1.8*DOWN+0.45*RIGHT)
+ differentials[0].scale(0.35)
+ differentials[1].scale(0.35)
+ differentials[2].scale(0.35)
+ self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
+ self.wait(2)
+ expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+
+ self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
+ geoText=TextMobject("Geometric Series")
+ geoText.scale(0.7)
+ geoText.shift(4*LEFT+0.3*DOWN)
+ taylorText=TextMobject("Taylor Series")
+ taylorText.scale(0.7)
+ taylorText.shift(1.8*DOWN)
+ self.play(FadeIn(geoText),FadeIn(taylorText))
+ self.wait(1)
+
+ soOntext=TextMobject("So on..!")
+ soOntext.shift(4*RIGHT)
+ soOntext.scale(0.8)
+ self.play(FadeIn(soOntext))
+ self.wait(2)
diff --git a/FSF-2020/series-and-transformations/Power Series/script2.py b/FSF-2020/series-and-transformations/Power Series/script2.py
new file mode 100644
index 0000000..72356c6
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Power Series/script2.py
@@ -0,0 +1,94 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class convergence(Scene):
+ def construct(self):
+ originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
+ originalFormula.set_color(RED)
+ self.play(Write(originalFormula))
+ self.wait(1)
+ self.play(ApplyMethod(originalFormula.shift,2.7*UP))
+ self.wait(1)
+
+ terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
+ termsTogetherString="+".join(terms)
+ termsTogether=TextMobject(termsTogetherString+"...")
+ termsTogether.scale(0.8)
+ termsTogether.shift(2.7*UP)
+ self.play(ReplacementTransform(originalFormula,termsTogether))
+ self.wait(1)
+
+ termMobjectRect=[0]*12
+ termMobject=TextMobject(terms[0])
+ termMobject.shift(2.7*UP+6.2*LEFT)
+ for i in range(1,13):
+ termMobjectOld=termMobject
+ termMobjectOld.scale(0.8)
+ if(i<12):
+ termMobject=TextMobject(terms[i])
+ termMobject.next_to(termMobjectOld)
+ if(i==1):
+ rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
+ rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
+ rectDefine.scale(0.7)
+ rectDefine.shift(3.2*DOWN)
+ self.play(Write(rectDefine))
+ self.wait(1)
+ if(i==2):
+ ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
+ ratio.set_color(RED)
+ ratio.scale(0.7)
+ ratio.move_to(3.2*DOWN)
+ inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
+ inequality.set_color(RED)
+ inequality.scale(0.7)
+ inequality.move_to(3.2*DOWN)
+ self.play(FadeOut(rectDefine))
+ self.play(Write(ratio))
+ self.wait(1)
+ self.play(ReplacementTransform(ratio,inequality))
+ self.wait(1)
+ #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
+ termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
+ termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
+ #rectangles[p] = termMobjectRect
+ #p+=1
+ self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
+
+ uparrow=TextMobject("$\\uparrow$")
+ uparrow.set_color(GREEN)
+ uparrow.scale(6)
+ uparrow.shift(4*RIGHT+0.5*DOWN)
+ self.play(ShowCreation(uparrow))
+ self.wait(1)
+
+ converges=TextMobject("Converges!")
+ converges.set_color(RED)
+ converges.scale(0.6)
+ converges.next_to(uparrow)
+ self.play(FadeIn(converges))
+ self.wait(2)
+
+ self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
+ self.wait(0.5)
+ rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
+ self.play(ApplyMethod(rect.scale,0.2))
+ for i in range(0,12):
+ self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
+ func=TextMobject("$\\approx$","$f(x)$")
+ func.set_color_by_tex_to_color_map({"$f(x)$":RED})
+ func.scale(0.8)
+ func.shift(DOWN+4.5*RIGHT+0.1*UP)
+ self.play(FadeIn(func))
+
+ rightarrow=TextMobject("$\\rightarrow$")
+ rightarrow.set_color(GREEN)
+ rightarrow.scale(4)
+ rightarrow.shift(2*DOWN)
+ converges=TextMobject("Hence even the","sum converges!")
+ converges.set_color_by_tex_to_color_map({"sum converges!":RED})
+ converges.move_to(3*DOWN)
+ converges.scale(0.7)
+ self.play(Write(rightarrow),FadeIn(converges))
+ self.wait(2)
diff --git a/FSF-2020/series-and-transformations/Power Series/script3.py b/FSF-2020/series-and-transformations/Power Series/script3.py
new file mode 100644
index 0000000..f710f42
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Power Series/script3.py
@@ -0,0 +1,156 @@
+from manimlib.imports import*
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Let's analyse")
+ introText2=TextMobject("for")
+ function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
+ function_main.set_color(GREEN)
+ introText1.scale(1.2)
+ introText1.shift(2*UP)
+ introText2.scale(0.7)
+ introText2.shift(UP)
+ function_main.scale(2)
+ function_main.shift(DOWN)
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(1.2)
+ function_expan.shift(2*UP)
+
+ self.play(Write(introText1))
+ self.play(FadeIn(introText2))
+ self.wait(0.5)
+ self.play(Write(function_main))
+ self.wait(1)
+
+ self.play(FadeOut(introText1),FadeOut(introText2))
+ self.play(ApplyMethod(function_main.shift,3*UP))
+ self.wait(0.5)
+ self.play(ReplacementTransform(function_main,function_expan))
+ self.wait(1)
+ self.play(ApplyMethod(function_expan.scale,0.5))
+ function_expan.to_edge(UP+RIGHT)
+ self.play(ReplacementTransform(function_expan,function_expan))
+ self.wait(1)
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1)
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(0.6)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes(animate=True)
+
+ eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
+ for i in range(0,len(eqText)):
+ 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)
+ equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
+ equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
+ equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
+ equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
+ equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
+ equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
+ equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
+
+ textBtwAnim1=TextMobject("Here the graph just","oscilates")
+ textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
+ textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
+ textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
+ textBtwAnim3=TextMobject("$x=1$")
+ textBtwAnim1.scale(0.4)
+ textBtwAnim2.scale(0.4)
+ textBtwAnim3.scale(1.2)
+ textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
+ textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
+ textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
+
+ self.play(ShowCreation(equation1),run_time=0.8)
+ self.add(eqText[0])
+ self.wait(1)
+ self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
+ self.wait(0.4)
+ self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
+ self.wait(0.3)
+ self.play(FadeOut(eqText[3]))
+ self.play(FadeIn(eqTextTerm))
+ self.play(Write(textBtwAnim1),Write(textBtwAnim2))
+ self.play(FadeIn(textBtwAnim3))
+ self.play(ReplacementTransform(equation4,equation5))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation5,equation6))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation6,equation7))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation7,equation8))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation8,equation9))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation9,equation10))
+ self.wait(1)
+
+ self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
+ self.wait(1)
+
+ convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
+ divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
+ divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
+ circle1=Circle(radius=0.01,color=PURPLE_E)
+ circle2=Circle(radius=0.01,color=PURPLE_E)
+ circle1.shift(ORIGIN+LEFT*x_each_unit)
+ circle2.shift(ORIGIN+RIGHT*x_each_unit)
+ convergeText=TextMobject("Converges")
+ divergeText1=TextMobject("Diverges")
+ divergeText2=TextMobject("Diverges")
+ convergeText.set_color(GREEN)
+ divergeText1.set_color(RED)
+ divergeText2.set_color(RED)
+ convergeText.scale(0.5)
+ divergeText1.scale(0.5)
+ divergeText2.scale(0.5)
+ convergeText.shift(1.6*UP)
+ divergeText1.shift(0.3*UP+1.5*LEFT)
+ divergeText2.shift(0.3*UP+1.5*RIGHT)
+ self.play(Write(divergeLineLeft),Write(divergeLineRight))
+ self.play(FadeIn(convergeLine))
+ self.wait(0.5)
+ self.play(FadeOut(self.axes))
+ self.play(Write(circle1),Write(circle2))
+ self.wait(0.5)
+ self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
+ self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
+ self.wait(2)
+
diff --git a/FSF-2020/series-and-transformations/Power Series/script4.py b/FSF-2020/series-and-transformations/Power Series/script4.py
new file mode 100644
index 0000000..412d20c
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Power Series/script4.py
@@ -0,0 +1,108 @@
+from manimlib.imports import *
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Consider the","above","example..")
+ introText1.scale(0.8)
+ introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+ self.play(Write(introText1))
+ self.wait(1)
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1),
+ "y_axis_height":7,
+ "x_axis_width":7
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.scale(0.6)
+ function_expan.set_color(RED)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes()
+
+ equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
+ self.play(ShowCreation(equation))
+ self.wait(1)
+
+ dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
+ dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
+ radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
+ rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
+ circle=Circle(radius=x_each_unit)
+ movingPoint=Circle(radius=0.025)
+ movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
+ circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
+ circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
+
+ self.play(Write(dashLineLeft),Write(dashLineRight))
+ self.wait(1)
+
+ equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
+ self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
+ self.wait(0.5)
+ self.play(Write(radiusLine))
+ self.play(MoveAlongPath(movingPoint,circleEq1))
+ self.play(MoveAlongPath(movingPoint,circleEq2))
+ self.play(FadeIn(circle))
+ self.wait(1)
+
+ radiusText=TextMobject("Radius of convergence")
+ radiusText.scale(0.14)
+ radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
+
+ self.play(Write(radiusText))
+ self.wait(0.6)
+
+ 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.3)
+
+ self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
+ extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
+ self.play(Write(extendLine))
+ doubleArrow=TextMobject("$\longleftrightarrow$")
+ doubleArrow.scale(1.6)
+ doubleArrow.set_color(BLUE)
+ doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
+ self.play(FadeIn(doubleArrow))
+ self.wait(1)
+ rangeText=TextMobject("Interval of convergence")
+ rangeText.scale(0.15)
+ rangeText.shift(ORIGIN+y_each_unit*DOWN)
+ self.play(Write(rangeText))
+ self.wait(0.6)
+
+ 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/series-and-transformations/Power Series/script5.py b/FSF-2020/series-and-transformations/Power Series/script5.py
new file mode 100644
index 0000000..e9681aa
--- /dev/null
+++ b/FSF-2020/series-and-transformations/Power Series/script5.py
@@ -0,0 +1,136 @@
+from manimlib.imports import *
+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)
+
+
+def gety(x,n):
+ ans=0
+ for i in range(0,n+1):
+ if(i%2==0):
+ ans+=(math.pow(x,2*i))
+ else:
+ ans-=(math.pow(x,2*i))
+ return ans
+
+def makeSeries(x,points,x_each_unit,y_each_unit):
+ p=0
+ for point in points:
+ y=gety(x,p)
+ point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
+ p+=1
+
+def makeLines(x,numPoints,x_each_unit,y_each_unit):
+ lines=[0]*numPoints
+ for i in range(0,numPoints-1):
+ y=gety(x,i)
+ y_next=gety(x,i+1)
+ lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
+ return lines
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$k$",
+ "y_axis_label": "$f(\\frac{1}{2})_k$",
+ "exclude_zero_label": True,
+ "x_axis_width":7,
+ "y_axis_height":7
+ }
+
+ 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)
+ sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
+ sequence.set_color(RED)
+ sequence.scale(0.35)
+ sequence.to_edge(UP+RIGHT)
+ formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
+ formula.set_color(PURPLE_C)
+ formula.scale(0.4)
+ formula.shift(5.3*RIGHT+3*UP)
+ fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
+ fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
+ fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
+ fLineText.set_color(RED)
+ fLineText.scale(0.3)
+ fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
+ points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
+ makeSeries(0.5,points,x_each_unit,y_each_unit)
+ lines=makeLines(0.5,6,x_each_unit,y_each_unit)
+
+
+ self.add(sequence)
+ self.add(formula)
+ self.setup_axes(animate=True)
+ self.play(Write(fLine))
+ self.add(fLineText)
+ for p in points:
+ self.add(p)
+ 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)
+
+ explanation1=TextMobject("Since the series","converges","to")
+ explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
+ explanation2=TextMobject("$\\frac {4}{5}$")
+ explanation2.set_color(BLUE)
+ explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
+ explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
+ explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
+ explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
+ explanation1.scale(0.5)
+ explanation3.scale(0.5)
+ explanation1.shift(1.8*DOWN+3.5*RIGHT)
+ explanation2.shift(2.4*DOWN+3.5*RIGHT)
+ explanation3.shift(1.8*DOWN+3.5*RIGHT)
+ explanation4.shift(2.4*DOWN+3.5*RIGHT)
+
+ self.play(Write(explanation1))
+ self.play(FadeIn(explanation2))
+ self.wait(1)
+ self.play(FadeOut(explanation1),FadeOut(explanation2))
+ self.play(Write(explanation3))
+ self.play(Write(explanation4))
+ self.wait(2)
--
cgit
From 933d1af7575c4b9703d81e1b175badb54c6cc126 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 20 May 2020 22:19:33 +0530
Subject: Add files via upload
---
.../Taylor Series/TaylorSeriesQuestions.pdf | Bin 0 -> 119804 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf b/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
new file mode 100644
index 0000000..2096f52
Binary files /dev/null and b/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf differ
--
cgit
From fdd0b0639860becd35226acb56e84725430e145d Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Wed, 20 May 2020 23:34:16 +0530
Subject: Add files via upload
---
.../Power Series/PowerSeriesQuestions.pdf | Bin 0 -> 112622 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf b/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
new file mode 100644
index 0000000..04ed6d5
Binary files /dev/null and b/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf differ
--
cgit
From a240c40156d5a05eb0ec95d2002241ab84ebca81 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Sat, 23 May 2020 18:32:54 +0530
Subject: add topic folders
---
.../approximations-and-optimizations/README.md | 0
.../calculus-of-several-variables/div-curl-grad-and-all-that/README.md | 0
.../calculus-of-several-variables/geometry-of-planes-and-curves/README.md | 0
.../integrals-of-multivariable-functions/README.md | 0
.../multivariable-functions-and-paritial-derivatives/README.md | 0
.../calculus-of-several-variables/triple-and-surface-integrals/README.md | 0
FSF-2020/calculus/intro-to-calculus/README.md | 0
FSF-2020/calculus/series-and-transformations/README.md | 0
FSF-2020/linear-algebra/linear-transformations/README.md | 0
FSF-2020/linear-algebra/vector-spaces/README.md | 0
10 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/README.md
create mode 100644 FSF-2020/calculus/intro-to-calculus/README.md
create mode 100644 FSF-2020/calculus/series-and-transformations/README.md
create mode 100644 FSF-2020/linear-algebra/linear-transformations/README.md
create mode 100644 FSF-2020/linear-algebra/vector-spaces/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/README.md b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
new file mode 100644
index 0000000..e69de29
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
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus/intro-to-calculus/README.md b/FSF-2020/calculus/intro-to-calculus/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus/series-and-transformations/README.md b/FSF-2020/calculus/series-and-transformations/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/linear-algebra/linear-transformations/README.md b/FSF-2020/linear-algebra/linear-transformations/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/linear-algebra/vector-spaces/README.md b/FSF-2020/linear-algebra/vector-spaces/README.md
new file mode 100644
index 0000000..e69de29
--
cgit
From 6b85a25ff7d11849d27eb2362bf5ac2ae2a5db17 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Sat, 23 May 2020 18:35:53 +0530
Subject: remove .mp4 files
---
.../SurfacesAnimation.mp4 | Bin 350623 -> 0 bytes
.../area_under_func.mp4 | Bin 681985 -> 0 bytes
.../elementary_area.mp4 | Bin 378325 -> 0 bytes
.../non_rect_region.mp4 | Bin 1189183 -> 0 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4 b/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4
deleted file mode 100644
index 181615d..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/SurfacesAnimation.mp4 and /dev/null differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4 b/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4
deleted file mode 100644
index 7072672..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/area_under_func.mp4 and /dev/null differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4 b/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4
deleted file mode 100644
index 601a56a..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/elementary_area.mp4 and /dev/null differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4 b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4
deleted file mode 100644
index 2eebc65..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.mp4 and /dev/null differ
--
cgit
From 951134e6cb56c2cad83df8505a47772fc5316af6 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Sat, 23 May 2020 18:39:01 +0530
Subject: change folder hirachy
---
.../YlimitXdependent.gif | Bin 1170435 -> 0 bytes
.../area_under_func.py | 73 -------
.../double-integrals/YlimitXdependent.gif | Bin 0 -> 1170435 bytes
.../double-integrals/area_under_func.py | 73 +++++++
.../double-integrals/elementary_area.py | 144 +++++++++++++
.../double-integrals/non_rect_region.py | 154 ++++++++++++++
.../double-integrals/surface.py | 236 +++++++++++++++++++++
.../double-integrals/y_limit_dependent_on_x.py | 113 ++++++++++
.../elementary_area.py | 144 -------------
.../non_rect_region.py | 154 --------------
.../surface.py | 236 ---------------------
.../y_limit_dependent_on_x.py | 113 ----------
12 files changed, 720 insertions(+), 720 deletions(-)
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/area_under_func.py
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
create mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/elementary_area.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/surface.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif b/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif
deleted file mode 100644
index a2bfd9d..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/YlimitXdependent.gif and /dev/null differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/area_under_func.py b/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
deleted file mode 100644
index 773840c..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/area_under_func.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from manimlib.imports import *
-
-
-class AreaUnderIntegral(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 5,
- "y_min" : 0,
- "y_max" : 6,
- "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
-
- int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
- area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
-
- opening_text=VGroup(*[int_area_sym,area_mean_text])
- self.play(Write(opening_text),run_time=4)
- self.wait(2)
- self.play(FadeOut(opening_text))
-
- self.setup_axes(animate=True)
- func= self.get_graph(self.Func, x_min=0,x_max=5)
- self.curve=func
-
- func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
- min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
- tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
- max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
- tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
-
- # area = self.get_area(func,1,4)
-
- self.play(ShowCreation(func), ShowCreation(func_text))
-
- self.wait(2)
- self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
-
-
- approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
- self.play(Write(approx_text))
-
- rect_list = self.get_riemann_rectangles_list(
- self.curve, 5,
- max_dx = 0.25,
- x_min = 1,
- x_max = 4,
- )
- flat_graph = self.get_graph(lambda t : 0)
- rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
- for new_rects in rect_list:
- new_rects.set_fill(opacity = 0.8)
- rects.align_submobjects(new_rects)
- for alt_rect in rects[::2]:
- alt_rect.set_fill(opacity = 0)
- self.play(Transform(
- rects, new_rects,
- run_time = 1.5,
- lag_ratio = 0.5
- ))
- conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
- self.play(Transform(approx_text,conclude_text))
- self.wait(3)
- int_area_sym.next_to(self.curve,IN)
- self.play(Transform(conclude_text,int_area_sym))
-
- # self.play(ShowCreation(area))
- self.wait(3)
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif b/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
new file mode 100644
index 0000000..a2bfd9d
Binary files /dev/null and b/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
new file mode 100644
index 0000000..773840c
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
@@ -0,0 +1,73 @@
+from manimlib.imports import *
+
+
+class AreaUnderIntegral(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 5,
+ "y_min" : 0,
+ "y_max" : 6,
+ "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
+
+ int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
+ area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
+
+ opening_text=VGroup(*[int_area_sym,area_mean_text])
+ self.play(Write(opening_text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(opening_text))
+
+ self.setup_axes(animate=True)
+ func= self.get_graph(self.Func, x_min=0,x_max=5)
+ self.curve=func
+
+ func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
+ min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
+ tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
+ max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
+ tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
+
+ # area = self.get_area(func,1,4)
+
+ self.play(ShowCreation(func), ShowCreation(func_text))
+
+ self.wait(2)
+ self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
+
+
+ approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
+ self.play(Write(approx_text))
+
+ rect_list = self.get_riemann_rectangles_list(
+ self.curve, 5,
+ max_dx = 0.25,
+ x_min = 1,
+ x_max = 4,
+ )
+ flat_graph = self.get_graph(lambda t : 0)
+ rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
+ for new_rects in rect_list:
+ new_rects.set_fill(opacity = 0.8)
+ rects.align_submobjects(new_rects)
+ for alt_rect in rects[::2]:
+ alt_rect.set_fill(opacity = 0)
+ self.play(Transform(
+ rects, new_rects,
+ run_time = 1.5,
+ lag_ratio = 0.5
+ ))
+ conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
+ self.play(Transform(approx_text,conclude_text))
+ self.wait(3)
+ int_area_sym.next_to(self.curve,IN)
+ self.play(Transform(conclude_text,int_area_sym))
+
+ # self.play(ShowCreation(area))
+ self.wait(3)
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
new file mode 100644
index 0000000..362b6f8
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
@@ -0,0 +1,144 @@
+from manimlib.imports import *
+
+class ElementaryArea(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 2,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ # "x_labeled_nums": list(np.arange(0,3)),
+ # "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
+ }
+
+ def construct(self):
+ X = self.x_axis_width/(self.x_max- self.x_min)
+ Y = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+ self.setup_axes(animate=False)
+
+ caption=TextMobject("The elementary area in ").to_edge(UP)
+ rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
+ polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
+
+ self.add(caption)
+ self.play(Write(rect_text))
+ self.get_rect_element()
+ # self.play(Write(polar_text))
+ self.play(ReplacementTransform(rect_text,polar_text),
+ FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
+ self.get_polar_element()
+
+
+
+ def get_rect_element(self):
+ rect=Rectangle(
+ height=2, width=3,fill_color=BLUE_D,
+ fill_opacity=1, color=BLUE_D
+ ).scale(.75).move_to(
+ self.graph_origin+(RIGHT*self.X+UP*self.Y)
+ )
+ dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
+ dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_gr=VGroup(dx_brace,dx_label)
+
+ dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
+ dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_gr=VGroup(dy_brace,dy_label)
+
+ brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
+
+ dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
+
+ self.play(FadeIn(rect))
+ self.play(GrowFromCenter(brace_gr))
+ self.play(GrowFromCenter(dydx))
+
+ self.rect=rect
+ self.rect_brace_gr=brace_gr
+ self.dydx=dydx
+ self.wait(2)
+
+
+ def get_polar_element(self):
+ X=self.X ;Y=self.Y
+ theta1=25*DEGREES
+ dtheta=TAU/12
+ r_in=1.3*X ; r_out=1.9*X
+
+ arc=AnnularSector(
+ arc_center=self.graph_origin,
+ inner_radius=r_in,
+ outer_radius=r_out ,
+ angle= dtheta,
+ start_angle= theta1,
+ fill_opacity= 1,
+ stroke_width= 0,
+ color= BLUE_D,
+ )
+
+
+ # # #getting braces
+ r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
+ dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
+ dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
+ ).rotate(theta1, about_point=r_in_theta1
+ )
+ dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
+ dr_brace_gr=VGroup(dr_brace,dr_label)
+
+ theta2=theta1+dtheta
+ r_out_theta2=self.graph_origin+r_out*(
+ np.cos(theta2)*RIGHT+np.sin(theta2)*UP
+ )
+ rdt_line=Line(r_out_theta2,r_out_theta2
+ +DOWN*(r_out*dtheta)
+ )
+ rdt_brace=Brace(rdt_line, RIGHT,
+ buff = MED_SMALL_BUFF).rotate(
+ theta2-(dtheta/2), about_point=r_out_theta2
+ )
+ rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
+ rdt_brace_gr=VGroup(rdt_brace,rdt_label)
+
+ #getting label r and dtheta
+ r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
+ r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
+ r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
+ r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
+ r_brace_gr=VGroup(r_brace,r_label)
+
+ dtheta_arc=Arc(
+ arc_center=self.graph_origin,
+ radius=.5*X,
+ angle= dtheta,
+ start_angle= theta1,
+ )
+ dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
+ dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
+
+
+ rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
+ self.play(ReplacementTransform(self.rect,arc))
+ self.wait()
+ self.play(ShowCreation(r1),
+ ShowCreation(r2)
+ )
+ self.play(ShowCreation(r_brace_gr),
+ Write(dtheta_label)
+ )
+ self.wait()
+ self.play(GrowFromCenter(rdt_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(dr_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(rdrdt))
+
+ self.wait(2)
+
+
+ #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
new file mode 100644
index 0000000..793a000
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
@@ -0,0 +1,154 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 8,
+ "y_min" : -1,
+ "y_max" : 5,
+ "y_axis_label": "$y$",
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(-1, 9)),
+ "y_labeled_nums": list(np.arange(-1, 6)),
+ "y_axis_height":5.5,
+ "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
+ }
+
+ 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)
+
+ sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
+ self.play(Write(sofar_text))
+ self.play(sofar_text.to_edge,UP)
+
+ self.setup_axes(animate=False)
+
+ rect= self.get_graph(
+ lambda x : 3,
+ x_min = 0,
+ x_max = 5,
+ color = GREEN)
+
+ rect_region = self.get_riemann_rectangles(
+ rect,
+ x_min = 0,
+ x_max = 5,
+ dx =.01,
+ start_color = GREEN,
+ end_color = GREEN,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+
+ self.play(ShowCreation(rect_region))
+ self.wait(.5)
+
+ rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
+ rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
+ const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
+
+ self.play(ReplacementTransform(sofar_text,rect_int))
+ self.wait(1.5)
+ self.play(FadeIn(rect_lim))
+ self.wait(2)
+ self.play(Write(const_text))
+ self.wait(2)
+ self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
+
+
+ non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
+ non_rect_text.to_edge(UP)
+ self.play(Write(non_rect_text))
+ self.wait(1.5)
+ self.play(FadeOut(rect_region))
+
+ c1= self.get_graph(
+ lambda x : x**2/4,
+ x_min = 0,
+ x_max = 4,
+ color = RED)
+
+ c1_region = self.get_riemann_rectangles(
+ c1,
+ x_min = 0,
+ x_max = 4,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+ self.add(c1,c1_region)
+ # self.wait(2)
+
+ c2= self.get_graph(
+ lambda x :12-2*x,
+ x_min = 4,
+ x_max = 6,
+ color = RED)
+
+ c2_region = self.get_riemann_rectangles(
+ c2,
+ x_min = 4,
+ x_max = 6,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = .75,
+ stroke_width = 0,
+ )
+ self.add(c2_region,c2)
+ self.wait(1.5)
+ c=VGroup(*[c1,c2])
+
+ no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
+
+ self.play(ReplacementTransform(non_rect_text,no_func_text))
+ self.wait(1)
+ self.play(Indicate(c))
+ self.wait(2)
+
+ div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
+ self.play(ReplacementTransform(no_func_text,div_region_text))
+
+ c2.set_color(YELLOW)
+ self.play(c2_region.set_color,YELLOW)
+ c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
+ c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
+ c_text=VGroup(*[c1_text,c2_text])
+
+ self.play(FadeIn(c_text))
+ self.wait(.4)
+ self.play(Indicate(c1),Indicate(c1_text))
+ self.play(Indicate(c2),Indicate(c2_text))
+
+ easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
+ self.play(ReplacementTransform(div_region_text,easy_text))
+
+ c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
+ c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
+
+ self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
+ self.wait(2)
+
+ total_int=TextMobject(r"The total integraton= ").to_edge(UP)
+ plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
+ self.play(ReplacementTransform(easy_text,total_int))
+ self.play(c2_region.set_color,BLUE)
+ self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
+
+ region=VGroup(*[c1_region,c2_region])
+ region.set_color(GREEN)
+ self.play(ShowCreation(region))
+ self.wait(3)
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
+
+
+
+
+
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
new file mode 100644
index 0000000..a794f46
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
@@ -0,0 +1,236 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":1 ,"b": 6, "c":2 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.8,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.07)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(3)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
new file mode 100644
index 0000000..4894ebf
--- /dev/null
+++ b/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
@@ -0,0 +1,113 @@
+from manimlib.imports import *
+
+class YlimitXdependent(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 3.5,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
+ }
+
+ 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.setup_axes(animate=False)
+
+ line= self.get_graph(
+ lambda x : 2-2*x ,
+ x_min = 0,
+ x_max = 1,
+ color = RED)
+ line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
+ self.line=line
+
+ caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
+ self.play(ShowCreation(line),Write(line_eqn))
+ # self.show_area()
+ self.show_rects()
+ self.play(Write(caption))
+ self.show_y_values_at_different_x()
+
+ self.wait(.5)
+
+ ###################
+ def show_area(self):
+ area = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.0001,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def show_rects(self):
+ rects = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity =1,
+ stroke_width = 0,
+ )
+ # self.play(ShowCreation(rects))
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+
+ def show_y_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[3*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff = 0)
+ y = TexMobject("y=2-2x")#.rotate(PI/2)
+ y.next_to(brace, LEFT, SMALL_BUFF)
+ anims = [
+ rect.set_fill, BLUE_E, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, BLUE, .75,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y, y),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y = y
+
+ y = last_y
+ y_brace = last_brace
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
deleted file mode 100644
index 362b6f8..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/elementary_area.py
+++ /dev/null
@@ -1,144 +0,0 @@
-from manimlib.imports import *
-
-class ElementaryArea(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 2,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- # "x_labeled_nums": list(np.arange(0,3)),
- # "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
- }
-
- def construct(self):
- X = self.x_axis_width/(self.x_max- self.x_min)
- Y = self.y_axis_height/(self.y_max- self.y_min)
- self.X=X ;self.Y=Y
- self.setup_axes(animate=False)
-
- caption=TextMobject("The elementary area in ").to_edge(UP)
- rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
- polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
-
- self.add(caption)
- self.play(Write(rect_text))
- self.get_rect_element()
- # self.play(Write(polar_text))
- self.play(ReplacementTransform(rect_text,polar_text),
- FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
- self.get_polar_element()
-
-
-
- def get_rect_element(self):
- rect=Rectangle(
- height=2, width=3,fill_color=BLUE_D,
- fill_opacity=1, color=BLUE_D
- ).scale(.75).move_to(
- self.graph_origin+(RIGHT*self.X+UP*self.Y)
- )
- dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
- dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_gr=VGroup(dx_brace,dx_label)
-
- dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
- dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_gr=VGroup(dy_brace,dy_label)
-
- brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
-
- dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
-
- self.play(FadeIn(rect))
- self.play(GrowFromCenter(brace_gr))
- self.play(GrowFromCenter(dydx))
-
- self.rect=rect
- self.rect_brace_gr=brace_gr
- self.dydx=dydx
- self.wait(2)
-
-
- def get_polar_element(self):
- X=self.X ;Y=self.Y
- theta1=25*DEGREES
- dtheta=TAU/12
- r_in=1.3*X ; r_out=1.9*X
-
- arc=AnnularSector(
- arc_center=self.graph_origin,
- inner_radius=r_in,
- outer_radius=r_out ,
- angle= dtheta,
- start_angle= theta1,
- fill_opacity= 1,
- stroke_width= 0,
- color= BLUE_D,
- )
-
-
- # # #getting braces
- r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
- dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
- dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
- ).rotate(theta1, about_point=r_in_theta1
- )
- dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
- dr_brace_gr=VGroup(dr_brace,dr_label)
-
- theta2=theta1+dtheta
- r_out_theta2=self.graph_origin+r_out*(
- np.cos(theta2)*RIGHT+np.sin(theta2)*UP
- )
- rdt_line=Line(r_out_theta2,r_out_theta2
- +DOWN*(r_out*dtheta)
- )
- rdt_brace=Brace(rdt_line, RIGHT,
- buff = MED_SMALL_BUFF).rotate(
- theta2-(dtheta/2), about_point=r_out_theta2
- )
- rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
- rdt_brace_gr=VGroup(rdt_brace,rdt_label)
-
- #getting label r and dtheta
- r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
- r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
- r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
- r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
- r_brace_gr=VGroup(r_brace,r_label)
-
- dtheta_arc=Arc(
- arc_center=self.graph_origin,
- radius=.5*X,
- angle= dtheta,
- start_angle= theta1,
- )
- dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
- dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
-
-
- rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
- self.play(ReplacementTransform(self.rect,arc))
- self.wait()
- self.play(ShowCreation(r1),
- ShowCreation(r2)
- )
- self.play(ShowCreation(r_brace_gr),
- Write(dtheta_label)
- )
- self.wait()
- self.play(GrowFromCenter(rdt_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(dr_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(rdrdt))
-
- self.wait(2)
-
-
- #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
deleted file mode 100644
index 793a000..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/non_rect_region.py
+++ /dev/null
@@ -1,154 +0,0 @@
-from manimlib.imports import *
-
-class AreaUnderCurve(GraphScene):
- CONFIG = {
- "x_min" : -1,
- "x_max" : 8,
- "y_min" : -1,
- "y_max" : 5,
- "y_axis_label": "$y$",
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(-1, 9)),
- "y_labeled_nums": list(np.arange(-1, 6)),
- "y_axis_height":5.5,
- "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
- }
-
- 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)
-
- sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
- self.play(Write(sofar_text))
- self.play(sofar_text.to_edge,UP)
-
- self.setup_axes(animate=False)
-
- rect= self.get_graph(
- lambda x : 3,
- x_min = 0,
- x_max = 5,
- color = GREEN)
-
- rect_region = self.get_riemann_rectangles(
- rect,
- x_min = 0,
- x_max = 5,
- dx =.01,
- start_color = GREEN,
- end_color = GREEN,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
-
- self.play(ShowCreation(rect_region))
- self.wait(.5)
-
- rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
- rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
- const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
-
- self.play(ReplacementTransform(sofar_text,rect_int))
- self.wait(1.5)
- self.play(FadeIn(rect_lim))
- self.wait(2)
- self.play(Write(const_text))
- self.wait(2)
- self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
-
-
- non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
- non_rect_text.to_edge(UP)
- self.play(Write(non_rect_text))
- self.wait(1.5)
- self.play(FadeOut(rect_region))
-
- c1= self.get_graph(
- lambda x : x**2/4,
- x_min = 0,
- x_max = 4,
- color = RED)
-
- c1_region = self.get_riemann_rectangles(
- c1,
- x_min = 0,
- x_max = 4,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
- self.add(c1,c1_region)
- # self.wait(2)
-
- c2= self.get_graph(
- lambda x :12-2*x,
- x_min = 4,
- x_max = 6,
- color = RED)
-
- c2_region = self.get_riemann_rectangles(
- c2,
- x_min = 4,
- x_max = 6,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = .75,
- stroke_width = 0,
- )
- self.add(c2_region,c2)
- self.wait(1.5)
- c=VGroup(*[c1,c2])
-
- no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
-
- self.play(ReplacementTransform(non_rect_text,no_func_text))
- self.wait(1)
- self.play(Indicate(c))
- self.wait(2)
-
- div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
- self.play(ReplacementTransform(no_func_text,div_region_text))
-
- c2.set_color(YELLOW)
- self.play(c2_region.set_color,YELLOW)
- c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
- c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
- c_text=VGroup(*[c1_text,c2_text])
-
- self.play(FadeIn(c_text))
- self.wait(.4)
- self.play(Indicate(c1),Indicate(c1_text))
- self.play(Indicate(c2),Indicate(c2_text))
-
- easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
- self.play(ReplacementTransform(div_region_text,easy_text))
-
- c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
- c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
-
- self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
- self.wait(2)
-
- total_int=TextMobject(r"The total integraton= ").to_edge(UP)
- plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
- self.play(ReplacementTransform(easy_text,total_int))
- self.play(c2_region.set_color,BLUE)
- self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
-
- region=VGroup(*[c1_region,c2_region])
- region.set_color(GREEN)
- self.play(ShowCreation(region))
- self.wait(3)
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
-
-
-
-
-
diff --git a/FSF-2020/integrals-of-multivariable-functions/surface.py b/FSF-2020/integrals-of-multivariable-functions/surface.py
deleted file mode 100644
index a794f46..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/surface.py
+++ /dev/null
@@ -1,236 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 8,
- "y_min": 0,
- "y_max": 8,
- "z_min": 0,
- "z_max": 6,
- "a":1 ,"b": 6, "c":2 , "d":6,
- "axes_shift":-3*OUT + 5*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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 2+y/4+np.sin(x)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(distance=35,
- phi=80 * DEGREES,
- theta=-80 * DEGREES,
- )
-
- fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- R=TextMobject("R").set_color(BLACK).scale(3)
- R.move_to(self.axes.input_plane,IN)
- self.add(R)
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=0.8,
- fill_color=PINK,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.07)
- self.play(Write(surface))
- # self.play(LaggedStart(ShowCreation(surface)))
-
- self.get_lines()
- # self.play(FadeIn(self.axes.input_plane))
- self.wait(3)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.a,
- "u_max": axes.b,
- "v_min": axes.c,
- "v_max": axes.d,
- "resolution": (
- (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (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
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"RED"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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, RIGHT,
- about_point=axes.c2p(0, 0, 0),
- )
- axes.y_axis.rotate(
- 90 * DEGREES, UP,
- about_point=axes.c2p(0, 0, 0),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.5,
- fill_color=TEAL,
- stroke_width=0,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- 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 = [
- ("a", axes.a),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c),
- ("d", 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)
- 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.5)
- 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(), RIGHT)
- axes.z_axis.label = z_label
- for axis in axes:
- axis.add(axis.label)
- return axes
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
deleted file mode 100644
index 4894ebf..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/y_limit_dependent_on_x.py
+++ /dev/null
@@ -1,113 +0,0 @@
-from manimlib.imports import *
-
-class YlimitXdependent(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 3.5,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
- }
-
- 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.setup_axes(animate=False)
-
- line= self.get_graph(
- lambda x : 2-2*x ,
- x_min = 0,
- x_max = 1,
- color = RED)
- line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
- self.line=line
-
- caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
- self.play(ShowCreation(line),Write(line_eqn))
- # self.show_area()
- self.show_rects()
- self.play(Write(caption))
- self.show_y_values_at_different_x()
-
- self.wait(.5)
-
- ###################
- def show_area(self):
- area = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.0001,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 1,
- stroke_width = 0,
- )
- self.play(ShowCreation(area))
- # self.transform_between_riemann_rects(self.rects,area)
- self.area = area
-
- def show_rects(self):
- rects = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity =1,
- stroke_width = 0,
- )
- # self.play(ShowCreation(rects))
- # self.transform_between_riemann_rects(self.area,rects)
- self.rects=rects
-
- def show_y_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/10)
- rects_subset = self.rects[3*rp:5*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff = 0)
- y = TexMobject("y=2-2x")#.rotate(PI/2)
- y.next_to(brace, LEFT, SMALL_BUFF)
- anims = [
- rect.set_fill, BLUE_E, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, BLUE, .75,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y, y),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y = y
-
- y = last_y
- y_brace = last_brace
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
--
cgit
From 48785d983e9063284e3c007acf88969dd58f47f2 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Sat, 23 May 2020 18:49:35 +0530
Subject: fix folder structure from last pr
---
.../Critical_Points_mcq_questions.pdf | Bin 0 -> 414750 bytes
.../The_Second_Derivative_Test_MCQ.pdf | Bin 0 -> 646880 bytes
.../linear-algebra/linear-transformations/README.md | 0
FSF-2020/linear-algebra/vector-spaces/README.md | 0
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
create mode 100644 FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/README.md
delete mode 100644 FSF-2020/linear-algebra/vector-spaces/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf b/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
new file mode 100644
index 0000000..25c4e4d
Binary files /dev/null and b/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf differ
diff --git a/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf b/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
new file mode 100644
index 0000000..ca60cbf
Binary files /dev/null and b/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/README.md b/FSF-2020/linear-algebra/linear-transformations/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/linear-algebra/vector-spaces/README.md b/FSF-2020/linear-algebra/vector-spaces/README.md
deleted file mode 100644
index e69de29..0000000
--
cgit
From fe5e18510140b3e02f3f6f03ad449c218f1b8579 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Sat, 23 May 2020 18:57:11 +0530
Subject: add topic-name folder
---
.../Critical_Points_mcq_questions.pdf | Bin 414750 -> 0 bytes
.../approximations-and-optimizations/README.md | 9 -
.../The_Second_Derivative_Test_MCQ.pdf | Bin 646880 -> 0 bytes
.../Critical_Points_mcq_questions.pdf | Bin 0 -> 414750 bytes
.../approximations-and-optimizations/README.md | 9 +
.../The_Second_Derivative_Test_MCQ.pdf | Bin 0 -> 646880 bytes
.../integrals-of-multivariable-functions/README.md | 1 +
.../double-integrals/YlimitXdependent.gif | Bin 0 -> 1170435 bytes
.../double-integrals/area_under_func.py | 73 +++++++
.../double-integrals/elementary_area.py | 144 +++++++++++++
.../double-integrals/non_rect_region.py | 154 ++++++++++++++
.../double-integrals/surface.py | 236 +++++++++++++++++++++
.../double-integrals/y_limit_dependent_on_x.py | 113 ++++++++++
.../Power Series/PowerSeriesQuestions.pdf | Bin 0 -> 112622 bytes
.../Power Series/script1.py | 128 +++++++++++
.../Power Series/script2.py | 94 ++++++++
.../Power Series/script3.py | 156 ++++++++++++++
.../Power Series/script4.py | 108 ++++++++++
.../Power Series/script5.py | 136 ++++++++++++
.../calculus/series-and-transformations/README.md | 13 ++
.../Taylor Series/TaylorSeriesQuestions.pdf | Bin 0 -> 119804 bytes
.../Taylor Series/script1.py | 198 +++++++++++++++++
.../Taylor Series/script2.py | 195 +++++++++++++++++
.../Taylor Series/script3.py | 111 ++++++++++
.../Taylor Series/script4.py | 82 +++++++
FSF-2020/div-curl-grad-and-all-that/README.md | 0
FSF-2020/geometry-of-planes-and-curves/README.md | 0
.../integrals-of-multivariable-functions/README.md | 1 -
.../double-integrals/YlimitXdependent.gif | Bin 1170435 -> 0 bytes
.../double-integrals/area_under_func.py | 73 -------
.../double-integrals/elementary_area.py | 144 -------------
.../double-integrals/non_rect_region.py | 154 --------------
.../double-integrals/surface.py | 236 ---------------------
.../double-integrals/y_limit_dependent_on_x.py | 113 ----------
FSF-2020/intro-to-calculus/README.md | 0
.../Animation.py | 0
.../linear-transformations/README.md | 9 +
FSF-2020/linear-algebra/vector-spaces/README.md | 0
.../Animation.py | 0
FSF-2020/linear-transformations/README.md | 9 -
.../README.md | 0
.../Power Series/PowerSeriesQuestions.pdf | Bin 112622 -> 0 bytes
.../Power Series/script1.py | 128 -----------
.../Power Series/script2.py | 94 --------
.../Power Series/script3.py | 156 --------------
.../Power Series/script4.py | 108 ----------
.../Power Series/script5.py | 136 ------------
FSF-2020/series-and-transformations/README.md | 13 --
.../Taylor Series/TaylorSeriesQuestions.pdf | Bin 119804 -> 0 bytes
.../Taylor Series/script1.py | 198 -----------------
.../Taylor Series/script2.py | 195 -----------------
.../Taylor Series/script3.py | 111 ----------
.../Taylor Series/script4.py | 82 -------
FSF-2020/triple-and-surface-integrals/README.md | 0
FSF-2020/vector-spaces/README.md | 0
55 files changed, 1960 insertions(+), 1960 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
delete mode 100644 FSF-2020/approximations-and-optimizations/README.md
delete mode 100644 FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script1.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script2.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script3.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script4.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script5.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
delete mode 100644 FSF-2020/div-curl-grad-and-all-that/README.md
delete mode 100644 FSF-2020/geometry-of-planes-and-curves/README.md
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/README.md
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
delete mode 100644 FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
delete mode 100644 FSF-2020/intro-to-calculus/README.md
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/README.md
create mode 100644 FSF-2020/linear-algebra/vector-spaces/README.md
delete mode 100644 FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
delete mode 100644 FSF-2020/linear-transformations/README.md
delete mode 100644 FSF-2020/multivariable-functions-and-paritial-derivatives/README.md
delete mode 100644 FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
delete mode 100644 FSF-2020/series-and-transformations/Power Series/script1.py
delete mode 100644 FSF-2020/series-and-transformations/Power Series/script2.py
delete mode 100644 FSF-2020/series-and-transformations/Power Series/script3.py
delete mode 100644 FSF-2020/series-and-transformations/Power Series/script4.py
delete mode 100644 FSF-2020/series-and-transformations/Power Series/script5.py
delete mode 100644 FSF-2020/series-and-transformations/README.md
delete mode 100644 FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
delete mode 100644 FSF-2020/series-and-transformations/Taylor Series/script1.py
delete mode 100644 FSF-2020/series-and-transformations/Taylor Series/script2.py
delete mode 100644 FSF-2020/series-and-transformations/Taylor Series/script3.py
delete mode 100644 FSF-2020/series-and-transformations/Taylor Series/script4.py
delete mode 100644 FSF-2020/triple-and-surface-integrals/README.md
delete mode 100644 FSF-2020/vector-spaces/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf b/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
deleted file mode 100644
index 25c4e4d..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical_Points_mcq_questions.pdf and /dev/null differ
diff --git a/FSF-2020/approximations-and-optimizations/README.md b/FSF-2020/approximations-and-optimizations/README.md
deleted file mode 100644
index f56f4e8..0000000
--- a/FSF-2020/approximations-and-optimizations/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Contributor: Vaishnavi Bisht
-Github: https://github.com/vnb09
-
-## Sub-Topics Covered:
-+ Critical Points
-+ The Second Derivative Test
-+ Tangent Plane Approximations
-+ Total Differential
-+ Lagrange Multipliers
diff --git a/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf b/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
deleted file mode 100644
index ca60cbf..0000000
Binary files a/FSF-2020/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical_Points_mcq_questions.pdf b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical_Points_mcq_questions.pdf
new file mode 100644
index 0000000..25c4e4d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical_Points_mcq_questions.pdf differ
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md
index e69de29..f56f4e8 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/README.md
@@ -0,0 +1,9 @@
+# Contributor: Vaishnavi Bisht
+Github: https://github.com/vnb09
+
+## Sub-Topics Covered:
++ Critical Points
++ The Second Derivative Test
++ Tangent Plane Approximations
++ Total Differential
++ Lagrange Multipliers
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf
new file mode 100644
index 0000000..ca60cbf
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The_Second_Derivative_Test_MCQ.pdf differ
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 e69de29..a321caf 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
@@ -0,0 +1 @@
+FSF2020--Somnath Pandit
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
new file mode 100644
index 0000000..a2bfd9d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
new file mode 100644
index 0000000..773840c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
@@ -0,0 +1,73 @@
+from manimlib.imports import *
+
+
+class AreaUnderIntegral(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 5,
+ "y_min" : 0,
+ "y_max" : 6,
+ "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
+
+ int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
+ area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
+
+ opening_text=VGroup(*[int_area_sym,area_mean_text])
+ self.play(Write(opening_text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(opening_text))
+
+ self.setup_axes(animate=True)
+ func= self.get_graph(self.Func, x_min=0,x_max=5)
+ self.curve=func
+
+ func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
+ min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
+ tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
+ max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
+ tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
+
+ # area = self.get_area(func,1,4)
+
+ self.play(ShowCreation(func), ShowCreation(func_text))
+
+ self.wait(2)
+ self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
+
+
+ approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
+ self.play(Write(approx_text))
+
+ rect_list = self.get_riemann_rectangles_list(
+ self.curve, 5,
+ max_dx = 0.25,
+ x_min = 1,
+ x_max = 4,
+ )
+ flat_graph = self.get_graph(lambda t : 0)
+ rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
+ for new_rects in rect_list:
+ new_rects.set_fill(opacity = 0.8)
+ rects.align_submobjects(new_rects)
+ for alt_rect in rects[::2]:
+ alt_rect.set_fill(opacity = 0)
+ self.play(Transform(
+ rects, new_rects,
+ run_time = 1.5,
+ lag_ratio = 0.5
+ ))
+ conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
+ self.play(Transform(approx_text,conclude_text))
+ self.wait(3)
+ int_area_sym.next_to(self.curve,IN)
+ self.play(Transform(conclude_text,int_area_sym))
+
+ # self.play(ShowCreation(area))
+ self.wait(3)
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
new file mode 100644
index 0000000..362b6f8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
@@ -0,0 +1,144 @@
+from manimlib.imports import *
+
+class ElementaryArea(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 2,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ # "x_labeled_nums": list(np.arange(0,3)),
+ # "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
+ }
+
+ def construct(self):
+ X = self.x_axis_width/(self.x_max- self.x_min)
+ Y = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+ self.setup_axes(animate=False)
+
+ caption=TextMobject("The elementary area in ").to_edge(UP)
+ rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
+ polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
+
+ self.add(caption)
+ self.play(Write(rect_text))
+ self.get_rect_element()
+ # self.play(Write(polar_text))
+ self.play(ReplacementTransform(rect_text,polar_text),
+ FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
+ self.get_polar_element()
+
+
+
+ def get_rect_element(self):
+ rect=Rectangle(
+ height=2, width=3,fill_color=BLUE_D,
+ fill_opacity=1, color=BLUE_D
+ ).scale(.75).move_to(
+ self.graph_origin+(RIGHT*self.X+UP*self.Y)
+ )
+ dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
+ dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_gr=VGroup(dx_brace,dx_label)
+
+ dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
+ dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_gr=VGroup(dy_brace,dy_label)
+
+ brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
+
+ dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
+
+ self.play(FadeIn(rect))
+ self.play(GrowFromCenter(brace_gr))
+ self.play(GrowFromCenter(dydx))
+
+ self.rect=rect
+ self.rect_brace_gr=brace_gr
+ self.dydx=dydx
+ self.wait(2)
+
+
+ def get_polar_element(self):
+ X=self.X ;Y=self.Y
+ theta1=25*DEGREES
+ dtheta=TAU/12
+ r_in=1.3*X ; r_out=1.9*X
+
+ arc=AnnularSector(
+ arc_center=self.graph_origin,
+ inner_radius=r_in,
+ outer_radius=r_out ,
+ angle= dtheta,
+ start_angle= theta1,
+ fill_opacity= 1,
+ stroke_width= 0,
+ color= BLUE_D,
+ )
+
+
+ # # #getting braces
+ r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
+ dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
+ dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
+ ).rotate(theta1, about_point=r_in_theta1
+ )
+ dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
+ dr_brace_gr=VGroup(dr_brace,dr_label)
+
+ theta2=theta1+dtheta
+ r_out_theta2=self.graph_origin+r_out*(
+ np.cos(theta2)*RIGHT+np.sin(theta2)*UP
+ )
+ rdt_line=Line(r_out_theta2,r_out_theta2
+ +DOWN*(r_out*dtheta)
+ )
+ rdt_brace=Brace(rdt_line, RIGHT,
+ buff = MED_SMALL_BUFF).rotate(
+ theta2-(dtheta/2), about_point=r_out_theta2
+ )
+ rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
+ rdt_brace_gr=VGroup(rdt_brace,rdt_label)
+
+ #getting label r and dtheta
+ r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
+ r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
+ r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
+ r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
+ r_brace_gr=VGroup(r_brace,r_label)
+
+ dtheta_arc=Arc(
+ arc_center=self.graph_origin,
+ radius=.5*X,
+ angle= dtheta,
+ start_angle= theta1,
+ )
+ dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
+ dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
+
+
+ rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
+ self.play(ReplacementTransform(self.rect,arc))
+ self.wait()
+ self.play(ShowCreation(r1),
+ ShowCreation(r2)
+ )
+ self.play(ShowCreation(r_brace_gr),
+ Write(dtheta_label)
+ )
+ self.wait()
+ self.play(GrowFromCenter(rdt_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(dr_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(rdrdt))
+
+ self.wait(2)
+
+
+ #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
new file mode 100644
index 0000000..793a000
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
@@ -0,0 +1,154 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 8,
+ "y_min" : -1,
+ "y_max" : 5,
+ "y_axis_label": "$y$",
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(-1, 9)),
+ "y_labeled_nums": list(np.arange(-1, 6)),
+ "y_axis_height":5.5,
+ "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
+ }
+
+ 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)
+
+ sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
+ self.play(Write(sofar_text))
+ self.play(sofar_text.to_edge,UP)
+
+ self.setup_axes(animate=False)
+
+ rect= self.get_graph(
+ lambda x : 3,
+ x_min = 0,
+ x_max = 5,
+ color = GREEN)
+
+ rect_region = self.get_riemann_rectangles(
+ rect,
+ x_min = 0,
+ x_max = 5,
+ dx =.01,
+ start_color = GREEN,
+ end_color = GREEN,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+
+ self.play(ShowCreation(rect_region))
+ self.wait(.5)
+
+ rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
+ rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
+ const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
+
+ self.play(ReplacementTransform(sofar_text,rect_int))
+ self.wait(1.5)
+ self.play(FadeIn(rect_lim))
+ self.wait(2)
+ self.play(Write(const_text))
+ self.wait(2)
+ self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
+
+
+ non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
+ non_rect_text.to_edge(UP)
+ self.play(Write(non_rect_text))
+ self.wait(1.5)
+ self.play(FadeOut(rect_region))
+
+ c1= self.get_graph(
+ lambda x : x**2/4,
+ x_min = 0,
+ x_max = 4,
+ color = RED)
+
+ c1_region = self.get_riemann_rectangles(
+ c1,
+ x_min = 0,
+ x_max = 4,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+ self.add(c1,c1_region)
+ # self.wait(2)
+
+ c2= self.get_graph(
+ lambda x :12-2*x,
+ x_min = 4,
+ x_max = 6,
+ color = RED)
+
+ c2_region = self.get_riemann_rectangles(
+ c2,
+ x_min = 4,
+ x_max = 6,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = .75,
+ stroke_width = 0,
+ )
+ self.add(c2_region,c2)
+ self.wait(1.5)
+ c=VGroup(*[c1,c2])
+
+ no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
+
+ self.play(ReplacementTransform(non_rect_text,no_func_text))
+ self.wait(1)
+ self.play(Indicate(c))
+ self.wait(2)
+
+ div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
+ self.play(ReplacementTransform(no_func_text,div_region_text))
+
+ c2.set_color(YELLOW)
+ self.play(c2_region.set_color,YELLOW)
+ c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
+ c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
+ c_text=VGroup(*[c1_text,c2_text])
+
+ self.play(FadeIn(c_text))
+ self.wait(.4)
+ self.play(Indicate(c1),Indicate(c1_text))
+ self.play(Indicate(c2),Indicate(c2_text))
+
+ easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
+ self.play(ReplacementTransform(div_region_text,easy_text))
+
+ c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
+ c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
+
+ self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
+ self.wait(2)
+
+ total_int=TextMobject(r"The total integraton= ").to_edge(UP)
+ plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
+ self.play(ReplacementTransform(easy_text,total_int))
+ self.play(c2_region.set_color,BLUE)
+ self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
+
+ region=VGroup(*[c1_region,c2_region])
+ region.set_color(GREEN)
+ self.play(ShowCreation(region))
+ self.wait(3)
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
+
+
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
new file mode 100644
index 0000000..a794f46
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
@@ -0,0 +1,236 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":1 ,"b": 6, "c":2 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.8,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.07)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(3)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
new file mode 100644
index 0000000..4894ebf
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
@@ -0,0 +1,113 @@
+from manimlib.imports import *
+
+class YlimitXdependent(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 3.5,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
+ }
+
+ 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.setup_axes(animate=False)
+
+ line= self.get_graph(
+ lambda x : 2-2*x ,
+ x_min = 0,
+ x_max = 1,
+ color = RED)
+ line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
+ self.line=line
+
+ caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
+ self.play(ShowCreation(line),Write(line_eqn))
+ # self.show_area()
+ self.show_rects()
+ self.play(Write(caption))
+ self.show_y_values_at_different_x()
+
+ self.wait(.5)
+
+ ###################
+ def show_area(self):
+ area = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.0001,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def show_rects(self):
+ rects = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity =1,
+ stroke_width = 0,
+ )
+ # self.play(ShowCreation(rects))
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+
+ def show_y_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[3*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff = 0)
+ y = TexMobject("y=2-2x")#.rotate(PI/2)
+ y.next_to(brace, LEFT, SMALL_BUFF)
+ anims = [
+ rect.set_fill, BLUE_E, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, BLUE, .75,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y, y),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y = y
+
+ y = last_y
+ y_brace = last_brace
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf b/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
new file mode 100644
index 0000000..04ed6d5
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf differ
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script1.py b/FSF-2020/calculus/series-and-transformations/Power Series/script1.py
new file mode 100644
index 0000000..28eb07c
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/script1.py
@@ -0,0 +1,128 @@
+from manimlib.imports import *
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ expansion.scale(0.7)
+ return expansion
+
+class pieChart(Scene):
+ def construct(self):
+ circle1=Circle(radius=3,color=BLUE)
+ powerText=TextMobject("Power Series")
+ powerText.scale(0.8)
+ self.play(FadeIn(powerText))
+ self.play(ShowCreation(circle1))
+ self.wait(1)
+
+ powerGroup=VGroup(circle1,powerText)
+
+ self.play(ApplyMethod(powerGroup.scale,0.5))
+ self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
+ self.wait(0.5)
+ expansion_power_coeff=[]
+ variables_power=[]
+ expansion_power=formFormula(expansion_power_coeff,variables_power)
+ self.play(ReplacementTransform(powerText,expansion_power))
+ self.wait(1)
+
+ circle2=Circle(radius=1.5)
+ circle2.shift(2.2*UP)
+ expansion_geo_coeff=[0]*3
+ variables_geo=[0]*3
+ arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
+ expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_geo_coeff[i].set_color(GOLD_A)
+ variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_geo[2])
+ expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+ expansion_geo.scale(0.7)
+
+ self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
+ self.add(arrow1_2)
+ self.wait(1)
+
+ ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
+ for i in range(0,3):
+ ones[i].set_color(GOLD_A)
+ ones[0].shift(0.3*DOWN,5*LEFT)
+ ones[1].next_to(ones[0],buff=0.5)
+ ones[2].next_to(ones[1],buff=0.7)
+ self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
+ self.wait(1)
+ expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+
+ expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
+ expansion_geo_final.scale(0.8)
+ expansion_geo_final.shift(0.3*DOWN+4*LEFT)
+ self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
+ self.wait(1)
+
+ circle3=Circle(radius=1.5,color=GREEN)
+ circle3.shift(2.2*UP)
+ expansion_taylor_coeff=[0]*3
+ variables_taylor=[0]*3
+ arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
+ expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_taylor_coeff[i].set_color(GOLD_A)
+ variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_taylor[2])
+ expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+ expansion_taylor.scale(0.7)
+
+ self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
+ self.add(arrow1_3)
+ self.wait(1)
+
+ differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
+ for i in range(0,3):
+ differentials[i].set_color(GOLD_A)
+ differentials[0].shift(1.8*DOWN+1.15*LEFT)
+ differentials[1].shift(1.8*DOWN+0.45*LEFT)
+ differentials[2].shift(1.8*DOWN+0.45*RIGHT)
+ differentials[0].scale(0.35)
+ differentials[1].scale(0.35)
+ differentials[2].scale(0.35)
+ self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
+ self.wait(2)
+ expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+
+ self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
+ geoText=TextMobject("Geometric Series")
+ geoText.scale(0.7)
+ geoText.shift(4*LEFT+0.3*DOWN)
+ taylorText=TextMobject("Taylor Series")
+ taylorText.scale(0.7)
+ taylorText.shift(1.8*DOWN)
+ self.play(FadeIn(geoText),FadeIn(taylorText))
+ self.wait(1)
+
+ soOntext=TextMobject("So on..!")
+ soOntext.shift(4*RIGHT)
+ soOntext.scale(0.8)
+ self.play(FadeIn(soOntext))
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script2.py b/FSF-2020/calculus/series-and-transformations/Power Series/script2.py
new file mode 100644
index 0000000..72356c6
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/script2.py
@@ -0,0 +1,94 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class convergence(Scene):
+ def construct(self):
+ originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
+ originalFormula.set_color(RED)
+ self.play(Write(originalFormula))
+ self.wait(1)
+ self.play(ApplyMethod(originalFormula.shift,2.7*UP))
+ self.wait(1)
+
+ terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
+ termsTogetherString="+".join(terms)
+ termsTogether=TextMobject(termsTogetherString+"...")
+ termsTogether.scale(0.8)
+ termsTogether.shift(2.7*UP)
+ self.play(ReplacementTransform(originalFormula,termsTogether))
+ self.wait(1)
+
+ termMobjectRect=[0]*12
+ termMobject=TextMobject(terms[0])
+ termMobject.shift(2.7*UP+6.2*LEFT)
+ for i in range(1,13):
+ termMobjectOld=termMobject
+ termMobjectOld.scale(0.8)
+ if(i<12):
+ termMobject=TextMobject(terms[i])
+ termMobject.next_to(termMobjectOld)
+ if(i==1):
+ rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
+ rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
+ rectDefine.scale(0.7)
+ rectDefine.shift(3.2*DOWN)
+ self.play(Write(rectDefine))
+ self.wait(1)
+ if(i==2):
+ ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
+ ratio.set_color(RED)
+ ratio.scale(0.7)
+ ratio.move_to(3.2*DOWN)
+ inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
+ inequality.set_color(RED)
+ inequality.scale(0.7)
+ inequality.move_to(3.2*DOWN)
+ self.play(FadeOut(rectDefine))
+ self.play(Write(ratio))
+ self.wait(1)
+ self.play(ReplacementTransform(ratio,inequality))
+ self.wait(1)
+ #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
+ termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
+ termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
+ #rectangles[p] = termMobjectRect
+ #p+=1
+ self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
+
+ uparrow=TextMobject("$\\uparrow$")
+ uparrow.set_color(GREEN)
+ uparrow.scale(6)
+ uparrow.shift(4*RIGHT+0.5*DOWN)
+ self.play(ShowCreation(uparrow))
+ self.wait(1)
+
+ converges=TextMobject("Converges!")
+ converges.set_color(RED)
+ converges.scale(0.6)
+ converges.next_to(uparrow)
+ self.play(FadeIn(converges))
+ self.wait(2)
+
+ self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
+ self.wait(0.5)
+ rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
+ self.play(ApplyMethod(rect.scale,0.2))
+ for i in range(0,12):
+ self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
+ func=TextMobject("$\\approx$","$f(x)$")
+ func.set_color_by_tex_to_color_map({"$f(x)$":RED})
+ func.scale(0.8)
+ func.shift(DOWN+4.5*RIGHT+0.1*UP)
+ self.play(FadeIn(func))
+
+ rightarrow=TextMobject("$\\rightarrow$")
+ rightarrow.set_color(GREEN)
+ rightarrow.scale(4)
+ rightarrow.shift(2*DOWN)
+ converges=TextMobject("Hence even the","sum converges!")
+ converges.set_color_by_tex_to_color_map({"sum converges!":RED})
+ converges.move_to(3*DOWN)
+ converges.scale(0.7)
+ self.play(Write(rightarrow),FadeIn(converges))
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script3.py b/FSF-2020/calculus/series-and-transformations/Power Series/script3.py
new file mode 100644
index 0000000..f710f42
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/script3.py
@@ -0,0 +1,156 @@
+from manimlib.imports import*
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Let's analyse")
+ introText2=TextMobject("for")
+ function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
+ function_main.set_color(GREEN)
+ introText1.scale(1.2)
+ introText1.shift(2*UP)
+ introText2.scale(0.7)
+ introText2.shift(UP)
+ function_main.scale(2)
+ function_main.shift(DOWN)
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(1.2)
+ function_expan.shift(2*UP)
+
+ self.play(Write(introText1))
+ self.play(FadeIn(introText2))
+ self.wait(0.5)
+ self.play(Write(function_main))
+ self.wait(1)
+
+ self.play(FadeOut(introText1),FadeOut(introText2))
+ self.play(ApplyMethod(function_main.shift,3*UP))
+ self.wait(0.5)
+ self.play(ReplacementTransform(function_main,function_expan))
+ self.wait(1)
+ self.play(ApplyMethod(function_expan.scale,0.5))
+ function_expan.to_edge(UP+RIGHT)
+ self.play(ReplacementTransform(function_expan,function_expan))
+ self.wait(1)
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1)
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(0.6)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes(animate=True)
+
+ eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
+ for i in range(0,len(eqText)):
+ 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)
+ equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
+ equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
+ equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
+ equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
+ equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
+ equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
+ equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
+
+ textBtwAnim1=TextMobject("Here the graph just","oscilates")
+ textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
+ textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
+ textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
+ textBtwAnim3=TextMobject("$x=1$")
+ textBtwAnim1.scale(0.4)
+ textBtwAnim2.scale(0.4)
+ textBtwAnim3.scale(1.2)
+ textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
+ textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
+ textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
+
+ self.play(ShowCreation(equation1),run_time=0.8)
+ self.add(eqText[0])
+ self.wait(1)
+ self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
+ self.wait(0.4)
+ self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
+ self.wait(0.3)
+ self.play(FadeOut(eqText[3]))
+ self.play(FadeIn(eqTextTerm))
+ self.play(Write(textBtwAnim1),Write(textBtwAnim2))
+ self.play(FadeIn(textBtwAnim3))
+ self.play(ReplacementTransform(equation4,equation5))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation5,equation6))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation6,equation7))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation7,equation8))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation8,equation9))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation9,equation10))
+ self.wait(1)
+
+ self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
+ self.wait(1)
+
+ convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
+ divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
+ divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
+ circle1=Circle(radius=0.01,color=PURPLE_E)
+ circle2=Circle(radius=0.01,color=PURPLE_E)
+ circle1.shift(ORIGIN+LEFT*x_each_unit)
+ circle2.shift(ORIGIN+RIGHT*x_each_unit)
+ convergeText=TextMobject("Converges")
+ divergeText1=TextMobject("Diverges")
+ divergeText2=TextMobject("Diverges")
+ convergeText.set_color(GREEN)
+ divergeText1.set_color(RED)
+ divergeText2.set_color(RED)
+ convergeText.scale(0.5)
+ divergeText1.scale(0.5)
+ divergeText2.scale(0.5)
+ convergeText.shift(1.6*UP)
+ divergeText1.shift(0.3*UP+1.5*LEFT)
+ divergeText2.shift(0.3*UP+1.5*RIGHT)
+ self.play(Write(divergeLineLeft),Write(divergeLineRight))
+ self.play(FadeIn(convergeLine))
+ self.wait(0.5)
+ self.play(FadeOut(self.axes))
+ self.play(Write(circle1),Write(circle2))
+ self.wait(0.5)
+ self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
+ self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
+ self.wait(2)
+
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script4.py b/FSF-2020/calculus/series-and-transformations/Power Series/script4.py
new file mode 100644
index 0000000..412d20c
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/script4.py
@@ -0,0 +1,108 @@
+from manimlib.imports import *
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Consider the","above","example..")
+ introText1.scale(0.8)
+ introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+ self.play(Write(introText1))
+ self.wait(1)
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1),
+ "y_axis_height":7,
+ "x_axis_width":7
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.scale(0.6)
+ function_expan.set_color(RED)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes()
+
+ equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
+ self.play(ShowCreation(equation))
+ self.wait(1)
+
+ dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
+ dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
+ radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
+ rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
+ circle=Circle(radius=x_each_unit)
+ movingPoint=Circle(radius=0.025)
+ movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
+ circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
+ circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
+
+ self.play(Write(dashLineLeft),Write(dashLineRight))
+ self.wait(1)
+
+ equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
+ self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
+ self.wait(0.5)
+ self.play(Write(radiusLine))
+ self.play(MoveAlongPath(movingPoint,circleEq1))
+ self.play(MoveAlongPath(movingPoint,circleEq2))
+ self.play(FadeIn(circle))
+ self.wait(1)
+
+ radiusText=TextMobject("Radius of convergence")
+ radiusText.scale(0.14)
+ radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
+
+ self.play(Write(radiusText))
+ self.wait(0.6)
+
+ 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.3)
+
+ self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
+ extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
+ self.play(Write(extendLine))
+ doubleArrow=TextMobject("$\longleftrightarrow$")
+ doubleArrow.scale(1.6)
+ doubleArrow.set_color(BLUE)
+ doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
+ self.play(FadeIn(doubleArrow))
+ self.wait(1)
+ rangeText=TextMobject("Interval of convergence")
+ rangeText.scale(0.15)
+ rangeText.shift(ORIGIN+y_each_unit*DOWN)
+ self.play(Write(rangeText))
+ self.wait(0.6)
+
+ 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/script5.py b/FSF-2020/calculus/series-and-transformations/Power Series/script5.py
new file mode 100644
index 0000000..e9681aa
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/script5.py
@@ -0,0 +1,136 @@
+from manimlib.imports import *
+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)
+
+
+def gety(x,n):
+ ans=0
+ for i in range(0,n+1):
+ if(i%2==0):
+ ans+=(math.pow(x,2*i))
+ else:
+ ans-=(math.pow(x,2*i))
+ return ans
+
+def makeSeries(x,points,x_each_unit,y_each_unit):
+ p=0
+ for point in points:
+ y=gety(x,p)
+ point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
+ p+=1
+
+def makeLines(x,numPoints,x_each_unit,y_each_unit):
+ lines=[0]*numPoints
+ for i in range(0,numPoints-1):
+ y=gety(x,i)
+ y_next=gety(x,i+1)
+ lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
+ return lines
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$k$",
+ "y_axis_label": "$f(\\frac{1}{2})_k$",
+ "exclude_zero_label": True,
+ "x_axis_width":7,
+ "y_axis_height":7
+ }
+
+ 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)
+ sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
+ sequence.set_color(RED)
+ sequence.scale(0.35)
+ sequence.to_edge(UP+RIGHT)
+ formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
+ formula.set_color(PURPLE_C)
+ formula.scale(0.4)
+ formula.shift(5.3*RIGHT+3*UP)
+ fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
+ fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
+ fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
+ fLineText.set_color(RED)
+ fLineText.scale(0.3)
+ fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
+ points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
+ makeSeries(0.5,points,x_each_unit,y_each_unit)
+ lines=makeLines(0.5,6,x_each_unit,y_each_unit)
+
+
+ self.add(sequence)
+ self.add(formula)
+ self.setup_axes(animate=True)
+ self.play(Write(fLine))
+ self.add(fLineText)
+ for p in points:
+ self.add(p)
+ 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)
+
+ explanation1=TextMobject("Since the series","converges","to")
+ explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
+ explanation2=TextMobject("$\\frac {4}{5}$")
+ explanation2.set_color(BLUE)
+ explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
+ explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
+ explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
+ explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
+ explanation1.scale(0.5)
+ explanation3.scale(0.5)
+ explanation1.shift(1.8*DOWN+3.5*RIGHT)
+ explanation2.shift(2.4*DOWN+3.5*RIGHT)
+ explanation3.shift(1.8*DOWN+3.5*RIGHT)
+ explanation4.shift(2.4*DOWN+3.5*RIGHT)
+
+ self.play(Write(explanation1))
+ self.play(FadeIn(explanation2))
+ self.wait(1)
+ self.play(FadeOut(explanation1),FadeOut(explanation2))
+ self.play(Write(explanation3))
+ self.play(Write(explanation4))
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/README.md b/FSF-2020/calculus/series-and-transformations/README.md
index e69de29..4747205 100644
--- a/FSF-2020/calculus/series-and-transformations/README.md
+++ b/FSF-2020/calculus/series-and-transformations/README.md
@@ -0,0 +1,13 @@
+Contributer: G Sri Harsha
+
+GitHub Handle: GSri30
+
+Sub-Topics Covered:
+
+ - Power Series
+
- Taylor Series
+
- Laplace Transformation
+
- Fourier Transformation
+
- z-Transform
+
- Constant-Q transform
+
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf b/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
new file mode 100644
index 0000000..2096f52
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf differ
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
new file mode 100644
index 0000000..e83eff8
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
@@ -0,0 +1,198 @@
+from manimlib.imports import*
+import math
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+class intro(Scene):
+ def construct(self):
+ equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
+ equation.scale(2)
+ equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
+ text=TextMobject("let $a=0$")
+ text.scale(0.7)
+ text.shift(DOWN)
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text))
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ self.wait(1.4)
+
+ coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
+ coeff[0].shift(3.39*UP+4.88*RIGHT)
+ coeff[0].scale(0.5)
+ coeff[1].shift(3.39*UP+5.3*RIGHT)
+ coeff[1].scale(0.275)
+ coeff[2].shift(3.39*UP+5.98*RIGHT)
+ coeff[2].scale(0.28)
+
+ for obj in coeff:
+ obj.set_color(GOLD_A)
+
+ firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
+ secondApprox=[self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:x+1,color=BLUE),
+ self.get_graph(lambda x:-x+1,color=BLUE)]
+ thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
+
+ firstGraph=self.get_graph(lambda x:1,color=BLUE)
+ secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
+
+ bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence the","slopes","should","even match")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
+
+ bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
+ self.wait(1)
+ self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
+ self.wait(0.6)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
+ finalFormula.scale(0.8)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
+
+ 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/script2.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
new file mode 100644
index 0000000..b5d0a53
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
@@ -0,0 +1,195 @@
+from manimlib.imports import*
+import math
+
+
+class intro(Scene):
+ def construct(self):
+ 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.scale(0.7)
+ text.shift(DOWN)
+
+ shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
+ shiftText.scale(0.6)
+ shiftText.shift(2.4*DOWN)
+
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(Write(shiftText))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ 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)
+
+ 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)]
+
+ 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)
+
+ bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
+
+ bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ 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)
+ self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ 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)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ 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)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
+
+ 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
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
new file mode 100644
index 0000000..a2870d4
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
@@ -0,0 +1,111 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+
+ bottomText1=TextMobject("Apply $f(x)=T_{n}(x)$")
+ bottomText2=TextMobject("Then apply $f'(x)=T_{n}'(x)$")
+ bottomText3=TextMobject("Then apply $f''(x)=T_{n}''(x)$")
+ bottomText4=TextMobject("and so on..")
+
+ bottomText1.scale(0.5)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.5)
+ bottomText4.scale(0.5)
+
+ bottomText1.shift(3*RIGHT+2*DOWN)
+ bottomText2.shift(3*RIGHT+2*DOWN)
+ bottomText3.shift(3*RIGHT+2*DOWN)
+ bottomText4.shift(3*RIGHT+2*DOWN)
+
+ equations=[self.get_graph(lambda x:math.log2(2),color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)]
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(Write(bottomText1))
+ self.wait(0.5)
+ self.play(ShowCreation(equations[0]),Write(terms[0]),Write(terms[1]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText1,bottomText2))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[0],equations[1]),Write(terms[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[1],equations[2]),Write(terms[3]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),Write(terms[4]))
+ self.wait(1.5)
+
+ self.play(FadeOut(terms[0]),FadeOut(terms[1]),FadeOut(terms[2]),FadeOut(terms[3]),FadeOut(terms[4]),FadeOut(bottomText4))
+
+ dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
+ dline.shift(ORIGIN+x_each_unit*4*RIGHT)
+
+ bottomText5=TextMobject("Here","after $x=4$",", the graph","continuously diverges away","from $ln(x)$")
+ bottomText5.scale(0.3)
+ bottomText5.shift(4.5*RIGHT+2*DOWN)
+ bottomText5.set_color_by_tex_to_color_map({"after $x=4$":YELLOW,"continuously diverges away":BLUE})
+
+ self.play(Write(bottomText5),Write(dline))
+ self.wait(1)
+ self.play(ReplacementTransform(equations[2],equations[3]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[3],equations[4]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[4],equations[5]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[5],equations[6]),FadeOut(bottomText5))
+ self.wait(1)
+
+ circle=Circle(radius=ORIGIN+x_each_unit*2,color=PURPLE_E)
+ circle.shift(ORIGIN+RIGHT*x_each_unit*2)
+ radiusLine=Line(start=ORIGIN+x_each_unit*RIGHT*2,end=ORIGIN+x_each_unit*4*RIGHT,color=PURPLE_E)
+ radius=TextMobject("$R$")
+ radius.set_color(RED)
+ radius.scale(0.5)
+ radius.shift(ORIGIN+RIGHT*x_each_unit*2.45+DOWN*y_each_unit*0.6)
+
+ self.play(FadeOut(equations[6]),Write(circle))
+ self.wait(0.6)
+ self.play(Write(radiusLine))
+ self.play(FadeIn(radius))
+ self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
new file mode 100644
index 0000000..1f41c97
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
@@ -0,0 +1,82 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+ equation=self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(FadeIn(equation),FadeIn(terms[0]),FadeIn(terms[1]),FadeIn(terms[2]),FadeIn(terms[3]),FadeIn(terms[4]))
+ self.wait(1)
+
+ 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)
+ increasingText=TextMobject("Increases!")
+ increasingText.set_color(GREEN)
+ followupText=TextMobject("as n increase!")
+ followupText.scale(0.3)
+ followupText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.1)
+ increasingText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.6)
+ 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)
+
+ area1=self.get_riemann_rectangles(lnx,x_max=8,x_min=4,dx=0.01,start_color=BLUE,end_color=RED,stroke_width=0,fill_opacity=0.8)
+ area2=self.get_riemann_rectangles(equation,x_max=5.2,x_min=4,dx=0.025,start_color=BLACK,end_color=BLACK,stroke_width=0,fill_opacity=1)
+
+ 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
diff --git a/FSF-2020/div-curl-grad-and-all-that/README.md b/FSF-2020/div-curl-grad-and-all-that/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/geometry-of-planes-and-curves/README.md b/FSF-2020/geometry-of-planes-and-curves/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/integrals-of-multivariable-functions/README.md b/FSF-2020/integrals-of-multivariable-functions/README.md
deleted file mode 100644
index a321caf..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/README.md
+++ /dev/null
@@ -1 +0,0 @@
-FSF2020--Somnath Pandit
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif b/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
deleted file mode 100644
index a2bfd9d..0000000
Binary files a/FSF-2020/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif and /dev/null differ
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
deleted file mode 100644
index 773840c..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/double-integrals/area_under_func.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from manimlib.imports import *
-
-
-class AreaUnderIntegral(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 5,
- "y_min" : 0,
- "y_max" : 6,
- "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
-
- int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
- area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
-
- opening_text=VGroup(*[int_area_sym,area_mean_text])
- self.play(Write(opening_text),run_time=4)
- self.wait(2)
- self.play(FadeOut(opening_text))
-
- self.setup_axes(animate=True)
- func= self.get_graph(self.Func, x_min=0,x_max=5)
- self.curve=func
-
- func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
- min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
- tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
- max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
- tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
-
- # area = self.get_area(func,1,4)
-
- self.play(ShowCreation(func), ShowCreation(func_text))
-
- self.wait(2)
- self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
-
-
- approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
- self.play(Write(approx_text))
-
- rect_list = self.get_riemann_rectangles_list(
- self.curve, 5,
- max_dx = 0.25,
- x_min = 1,
- x_max = 4,
- )
- flat_graph = self.get_graph(lambda t : 0)
- rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
- for new_rects in rect_list:
- new_rects.set_fill(opacity = 0.8)
- rects.align_submobjects(new_rects)
- for alt_rect in rects[::2]:
- alt_rect.set_fill(opacity = 0)
- self.play(Transform(
- rects, new_rects,
- run_time = 1.5,
- lag_ratio = 0.5
- ))
- conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
- self.play(Transform(approx_text,conclude_text))
- self.wait(3)
- int_area_sym.next_to(self.curve,IN)
- self.play(Transform(conclude_text,int_area_sym))
-
- # self.play(ShowCreation(area))
- self.wait(3)
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
deleted file mode 100644
index 362b6f8..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/double-integrals/elementary_area.py
+++ /dev/null
@@ -1,144 +0,0 @@
-from manimlib.imports import *
-
-class ElementaryArea(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 2,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- # "x_labeled_nums": list(np.arange(0,3)),
- # "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
- }
-
- def construct(self):
- X = self.x_axis_width/(self.x_max- self.x_min)
- Y = self.y_axis_height/(self.y_max- self.y_min)
- self.X=X ;self.Y=Y
- self.setup_axes(animate=False)
-
- caption=TextMobject("The elementary area in ").to_edge(UP)
- rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
- polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
-
- self.add(caption)
- self.play(Write(rect_text))
- self.get_rect_element()
- # self.play(Write(polar_text))
- self.play(ReplacementTransform(rect_text,polar_text),
- FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
- self.get_polar_element()
-
-
-
- def get_rect_element(self):
- rect=Rectangle(
- height=2, width=3,fill_color=BLUE_D,
- fill_opacity=1, color=BLUE_D
- ).scale(.75).move_to(
- self.graph_origin+(RIGHT*self.X+UP*self.Y)
- )
- dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
- dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_gr=VGroup(dx_brace,dx_label)
-
- dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
- dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_gr=VGroup(dy_brace,dy_label)
-
- brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
-
- dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
-
- self.play(FadeIn(rect))
- self.play(GrowFromCenter(brace_gr))
- self.play(GrowFromCenter(dydx))
-
- self.rect=rect
- self.rect_brace_gr=brace_gr
- self.dydx=dydx
- self.wait(2)
-
-
- def get_polar_element(self):
- X=self.X ;Y=self.Y
- theta1=25*DEGREES
- dtheta=TAU/12
- r_in=1.3*X ; r_out=1.9*X
-
- arc=AnnularSector(
- arc_center=self.graph_origin,
- inner_radius=r_in,
- outer_radius=r_out ,
- angle= dtheta,
- start_angle= theta1,
- fill_opacity= 1,
- stroke_width= 0,
- color= BLUE_D,
- )
-
-
- # # #getting braces
- r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
- dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
- dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
- ).rotate(theta1, about_point=r_in_theta1
- )
- dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
- dr_brace_gr=VGroup(dr_brace,dr_label)
-
- theta2=theta1+dtheta
- r_out_theta2=self.graph_origin+r_out*(
- np.cos(theta2)*RIGHT+np.sin(theta2)*UP
- )
- rdt_line=Line(r_out_theta2,r_out_theta2
- +DOWN*(r_out*dtheta)
- )
- rdt_brace=Brace(rdt_line, RIGHT,
- buff = MED_SMALL_BUFF).rotate(
- theta2-(dtheta/2), about_point=r_out_theta2
- )
- rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
- rdt_brace_gr=VGroup(rdt_brace,rdt_label)
-
- #getting label r and dtheta
- r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
- r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
- r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
- r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
- r_brace_gr=VGroup(r_brace,r_label)
-
- dtheta_arc=Arc(
- arc_center=self.graph_origin,
- radius=.5*X,
- angle= dtheta,
- start_angle= theta1,
- )
- dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
- dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
-
-
- rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
- self.play(ReplacementTransform(self.rect,arc))
- self.wait()
- self.play(ShowCreation(r1),
- ShowCreation(r2)
- )
- self.play(ShowCreation(r_brace_gr),
- Write(dtheta_label)
- )
- self.wait()
- self.play(GrowFromCenter(rdt_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(dr_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(rdrdt))
-
- self.wait(2)
-
-
- #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
deleted file mode 100644
index 793a000..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
+++ /dev/null
@@ -1,154 +0,0 @@
-from manimlib.imports import *
-
-class AreaUnderCurve(GraphScene):
- CONFIG = {
- "x_min" : -1,
- "x_max" : 8,
- "y_min" : -1,
- "y_max" : 5,
- "y_axis_label": "$y$",
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(-1, 9)),
- "y_labeled_nums": list(np.arange(-1, 6)),
- "y_axis_height":5.5,
- "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
- }
-
- 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)
-
- sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
- self.play(Write(sofar_text))
- self.play(sofar_text.to_edge,UP)
-
- self.setup_axes(animate=False)
-
- rect= self.get_graph(
- lambda x : 3,
- x_min = 0,
- x_max = 5,
- color = GREEN)
-
- rect_region = self.get_riemann_rectangles(
- rect,
- x_min = 0,
- x_max = 5,
- dx =.01,
- start_color = GREEN,
- end_color = GREEN,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
-
- self.play(ShowCreation(rect_region))
- self.wait(.5)
-
- rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
- rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
- const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
-
- self.play(ReplacementTransform(sofar_text,rect_int))
- self.wait(1.5)
- self.play(FadeIn(rect_lim))
- self.wait(2)
- self.play(Write(const_text))
- self.wait(2)
- self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
-
-
- non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
- non_rect_text.to_edge(UP)
- self.play(Write(non_rect_text))
- self.wait(1.5)
- self.play(FadeOut(rect_region))
-
- c1= self.get_graph(
- lambda x : x**2/4,
- x_min = 0,
- x_max = 4,
- color = RED)
-
- c1_region = self.get_riemann_rectangles(
- c1,
- x_min = 0,
- x_max = 4,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
- self.add(c1,c1_region)
- # self.wait(2)
-
- c2= self.get_graph(
- lambda x :12-2*x,
- x_min = 4,
- x_max = 6,
- color = RED)
-
- c2_region = self.get_riemann_rectangles(
- c2,
- x_min = 4,
- x_max = 6,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = .75,
- stroke_width = 0,
- )
- self.add(c2_region,c2)
- self.wait(1.5)
- c=VGroup(*[c1,c2])
-
- no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
-
- self.play(ReplacementTransform(non_rect_text,no_func_text))
- self.wait(1)
- self.play(Indicate(c))
- self.wait(2)
-
- div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
- self.play(ReplacementTransform(no_func_text,div_region_text))
-
- c2.set_color(YELLOW)
- self.play(c2_region.set_color,YELLOW)
- c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
- c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
- c_text=VGroup(*[c1_text,c2_text])
-
- self.play(FadeIn(c_text))
- self.wait(.4)
- self.play(Indicate(c1),Indicate(c1_text))
- self.play(Indicate(c2),Indicate(c2_text))
-
- easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
- self.play(ReplacementTransform(div_region_text,easy_text))
-
- c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
- c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
-
- self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
- self.wait(2)
-
- total_int=TextMobject(r"The total integraton= ").to_edge(UP)
- plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
- self.play(ReplacementTransform(easy_text,total_int))
- self.play(c2_region.set_color,BLUE)
- self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
-
- region=VGroup(*[c1_region,c2_region])
- region.set_color(GREEN)
- self.play(ShowCreation(region))
- self.wait(3)
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
-
-
-
-
-
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
deleted file mode 100644
index a794f46..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/double-integrals/surface.py
+++ /dev/null
@@ -1,236 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 8,
- "y_min": 0,
- "y_max": 8,
- "z_min": 0,
- "z_max": 6,
- "a":1 ,"b": 6, "c":2 , "d":6,
- "axes_shift":-3*OUT + 5*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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 2+y/4+np.sin(x)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(distance=35,
- phi=80 * DEGREES,
- theta=-80 * DEGREES,
- )
-
- fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- R=TextMobject("R").set_color(BLACK).scale(3)
- R.move_to(self.axes.input_plane,IN)
- self.add(R)
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=0.8,
- fill_color=PINK,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.07)
- self.play(Write(surface))
- # self.play(LaggedStart(ShowCreation(surface)))
-
- self.get_lines()
- # self.play(FadeIn(self.axes.input_plane))
- self.wait(3)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.a,
- "u_max": axes.b,
- "v_min": axes.c,
- "v_max": axes.d,
- "resolution": (
- (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (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
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"RED"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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, RIGHT,
- about_point=axes.c2p(0, 0, 0),
- )
- axes.y_axis.rotate(
- 90 * DEGREES, UP,
- about_point=axes.c2p(0, 0, 0),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.5,
- fill_color=TEAL,
- stroke_width=0,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- 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 = [
- ("a", axes.a),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c),
- ("d", 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)
- 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.5)
- 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(), RIGHT)
- axes.z_axis.label = z_label
- for axis in axes:
- axis.add(axis.label)
- return axes
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py b/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
deleted file mode 100644
index 4894ebf..0000000
--- a/FSF-2020/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
+++ /dev/null
@@ -1,113 +0,0 @@
-from manimlib.imports import *
-
-class YlimitXdependent(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 3.5,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
- }
-
- 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.setup_axes(animate=False)
-
- line= self.get_graph(
- lambda x : 2-2*x ,
- x_min = 0,
- x_max = 1,
- color = RED)
- line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
- self.line=line
-
- caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
- self.play(ShowCreation(line),Write(line_eqn))
- # self.show_area()
- self.show_rects()
- self.play(Write(caption))
- self.show_y_values_at_different_x()
-
- self.wait(.5)
-
- ###################
- def show_area(self):
- area = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.0001,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 1,
- stroke_width = 0,
- )
- self.play(ShowCreation(area))
- # self.transform_between_riemann_rects(self.rects,area)
- self.area = area
-
- def show_rects(self):
- rects = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity =1,
- stroke_width = 0,
- )
- # self.play(ShowCreation(rects))
- # self.transform_between_riemann_rects(self.area,rects)
- self.rects=rects
-
- def show_y_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/10)
- rects_subset = self.rects[3*rp:5*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff = 0)
- y = TexMobject("y=2-2x")#.rotate(PI/2)
- y.next_to(brace, LEFT, SMALL_BUFF)
- anims = [
- rect.set_fill, BLUE_E, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, BLUE, .75,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y, y),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y = y
-
- y = last_y
- y_brace = last_brace
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/intro-to-calculus/README.md b/FSF-2020/intro-to-calculus/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/linear-algebra/linear-transformations/README.md b/FSF-2020/linear-algebra/linear-transformations/README.md
new file mode 100644
index 0000000..692201e
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/README.md
@@ -0,0 +1,9 @@
+# Contributer: Archit Sangal
+My Github Account : architsangal
+
+## Sub-Topics Covered:
++ Vector Space Homomorphisms (Linear Maps)
++ The Four Fundamental Subspaces
++ Rank-Nullity Theorem
++ Orthonormal basis
++ Gramm-Schmidt Orthogonalization Process
diff --git a/FSF-2020/linear-algebra/vector-spaces/README.md b/FSF-2020/linear-algebra/vector-spaces/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py b/FSF-2020/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/linear-transformations/README.md b/FSF-2020/linear-transformations/README.md
deleted file mode 100644
index 692201e..0000000
--- a/FSF-2020/linear-transformations/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Contributer: Archit Sangal
-My Github Account : architsangal
-
-## Sub-Topics Covered:
-+ Vector Space Homomorphisms (Linear Maps)
-+ The Four Fundamental Subspaces
-+ Rank-Nullity Theorem
-+ Orthonormal basis
-+ Gramm-Schmidt Orthogonalization Process
diff --git a/FSF-2020/multivariable-functions-and-paritial-derivatives/README.md b/FSF-2020/multivariable-functions-and-paritial-derivatives/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf b/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
deleted file mode 100644
index 04ed6d5..0000000
Binary files a/FSF-2020/series-and-transformations/Power Series/PowerSeriesQuestions.pdf and /dev/null differ
diff --git a/FSF-2020/series-and-transformations/Power Series/script1.py b/FSF-2020/series-and-transformations/Power Series/script1.py
deleted file mode 100644
index 28eb07c..0000000
--- a/FSF-2020/series-and-transformations/Power Series/script1.py
+++ /dev/null
@@ -1,128 +0,0 @@
-from manimlib.imports import *
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- expansion.scale(0.7)
- return expansion
-
-class pieChart(Scene):
- def construct(self):
- circle1=Circle(radius=3,color=BLUE)
- powerText=TextMobject("Power Series")
- powerText.scale(0.8)
- self.play(FadeIn(powerText))
- self.play(ShowCreation(circle1))
- self.wait(1)
-
- powerGroup=VGroup(circle1,powerText)
-
- self.play(ApplyMethod(powerGroup.scale,0.5))
- self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
- self.wait(0.5)
- expansion_power_coeff=[]
- variables_power=[]
- expansion_power=formFormula(expansion_power_coeff,variables_power)
- self.play(ReplacementTransform(powerText,expansion_power))
- self.wait(1)
-
- circle2=Circle(radius=1.5)
- circle2.shift(2.2*UP)
- expansion_geo_coeff=[0]*3
- variables_geo=[0]*3
- arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
- expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_geo_coeff[i].set_color(GOLD_A)
- variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
- if i!=2:
- expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_geo[2])
- expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
- expansion_geo.scale(0.7)
-
- self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
- self.add(arrow1_2)
- self.wait(1)
-
- ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
- for i in range(0,3):
- ones[i].set_color(GOLD_A)
- ones[0].shift(0.3*DOWN,5*LEFT)
- ones[1].next_to(ones[0],buff=0.5)
- ones[2].next_to(ones[1],buff=0.7)
- self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
- self.wait(1)
- expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
-
- expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
- expansion_geo_final.scale(0.8)
- expansion_geo_final.shift(0.3*DOWN+4*LEFT)
- self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
- self.wait(1)
-
- circle3=Circle(radius=1.5,color=GREEN)
- circle3.shift(2.2*UP)
- expansion_taylor_coeff=[0]*3
- variables_taylor=[0]*3
- arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
- expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_taylor_coeff[i].set_color(GOLD_A)
- variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
- if i!=2:
- expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_taylor[2])
- expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
- expansion_taylor.scale(0.7)
-
- self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
- self.add(arrow1_3)
- self.wait(1)
-
- differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
- for i in range(0,3):
- differentials[i].set_color(GOLD_A)
- differentials[0].shift(1.8*DOWN+1.15*LEFT)
- differentials[1].shift(1.8*DOWN+0.45*LEFT)
- differentials[2].shift(1.8*DOWN+0.45*RIGHT)
- differentials[0].scale(0.35)
- differentials[1].scale(0.35)
- differentials[2].scale(0.35)
- self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
- self.wait(2)
- expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
-
- self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
- geoText=TextMobject("Geometric Series")
- geoText.scale(0.7)
- geoText.shift(4*LEFT+0.3*DOWN)
- taylorText=TextMobject("Taylor Series")
- taylorText.scale(0.7)
- taylorText.shift(1.8*DOWN)
- self.play(FadeIn(geoText),FadeIn(taylorText))
- self.wait(1)
-
- soOntext=TextMobject("So on..!")
- soOntext.shift(4*RIGHT)
- soOntext.scale(0.8)
- self.play(FadeIn(soOntext))
- self.wait(2)
diff --git a/FSF-2020/series-and-transformations/Power Series/script2.py b/FSF-2020/series-and-transformations/Power Series/script2.py
deleted file mode 100644
index 72356c6..0000000
--- a/FSF-2020/series-and-transformations/Power Series/script2.py
+++ /dev/null
@@ -1,94 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-
-class convergence(Scene):
- def construct(self):
- originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
- originalFormula.set_color(RED)
- self.play(Write(originalFormula))
- self.wait(1)
- self.play(ApplyMethod(originalFormula.shift,2.7*UP))
- self.wait(1)
-
- terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
- termsTogetherString="+".join(terms)
- termsTogether=TextMobject(termsTogetherString+"...")
- termsTogether.scale(0.8)
- termsTogether.shift(2.7*UP)
- self.play(ReplacementTransform(originalFormula,termsTogether))
- self.wait(1)
-
- termMobjectRect=[0]*12
- termMobject=TextMobject(terms[0])
- termMobject.shift(2.7*UP+6.2*LEFT)
- for i in range(1,13):
- termMobjectOld=termMobject
- termMobjectOld.scale(0.8)
- if(i<12):
- termMobject=TextMobject(terms[i])
- termMobject.next_to(termMobjectOld)
- if(i==1):
- rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
- rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
- rectDefine.scale(0.7)
- rectDefine.shift(3.2*DOWN)
- self.play(Write(rectDefine))
- self.wait(1)
- if(i==2):
- ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
- ratio.set_color(RED)
- ratio.scale(0.7)
- ratio.move_to(3.2*DOWN)
- inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
- inequality.set_color(RED)
- inequality.scale(0.7)
- inequality.move_to(3.2*DOWN)
- self.play(FadeOut(rectDefine))
- self.play(Write(ratio))
- self.wait(1)
- self.play(ReplacementTransform(ratio,inequality))
- self.wait(1)
- #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
- termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
- termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
- #rectangles[p] = termMobjectRect
- #p+=1
- self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
-
- uparrow=TextMobject("$\\uparrow$")
- uparrow.set_color(GREEN)
- uparrow.scale(6)
- uparrow.shift(4*RIGHT+0.5*DOWN)
- self.play(ShowCreation(uparrow))
- self.wait(1)
-
- converges=TextMobject("Converges!")
- converges.set_color(RED)
- converges.scale(0.6)
- converges.next_to(uparrow)
- self.play(FadeIn(converges))
- self.wait(2)
-
- self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
- self.wait(0.5)
- rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
- self.play(ApplyMethod(rect.scale,0.2))
- for i in range(0,12):
- self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
- func=TextMobject("$\\approx$","$f(x)$")
- func.set_color_by_tex_to_color_map({"$f(x)$":RED})
- func.scale(0.8)
- func.shift(DOWN+4.5*RIGHT+0.1*UP)
- self.play(FadeIn(func))
-
- rightarrow=TextMobject("$\\rightarrow$")
- rightarrow.set_color(GREEN)
- rightarrow.scale(4)
- rightarrow.shift(2*DOWN)
- converges=TextMobject("Hence even the","sum converges!")
- converges.set_color_by_tex_to_color_map({"sum converges!":RED})
- converges.move_to(3*DOWN)
- converges.scale(0.7)
- self.play(Write(rightarrow),FadeIn(converges))
- self.wait(2)
diff --git a/FSF-2020/series-and-transformations/Power Series/script3.py b/FSF-2020/series-and-transformations/Power Series/script3.py
deleted file mode 100644
index f710f42..0000000
--- a/FSF-2020/series-and-transformations/Power Series/script3.py
+++ /dev/null
@@ -1,156 +0,0 @@
-from manimlib.imports import*
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Let's analyse")
- introText2=TextMobject("for")
- function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
- function_main.set_color(GREEN)
- introText1.scale(1.2)
- introText1.shift(2*UP)
- introText2.scale(0.7)
- introText2.shift(UP)
- function_main.scale(2)
- function_main.shift(DOWN)
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(1.2)
- function_expan.shift(2*UP)
-
- self.play(Write(introText1))
- self.play(FadeIn(introText2))
- self.wait(0.5)
- self.play(Write(function_main))
- self.wait(1)
-
- self.play(FadeOut(introText1),FadeOut(introText2))
- self.play(ApplyMethod(function_main.shift,3*UP))
- self.wait(0.5)
- self.play(ReplacementTransform(function_main,function_expan))
- self.wait(1)
- self.play(ApplyMethod(function_expan.scale,0.5))
- function_expan.to_edge(UP+RIGHT)
- self.play(ReplacementTransform(function_expan,function_expan))
- self.wait(1)
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1)
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(0.6)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes(animate=True)
-
- eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
- for i in range(0,len(eqText)):
- 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)
- equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
- equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
- equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
- equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
- equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
- equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
- equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
-
- textBtwAnim1=TextMobject("Here the graph just","oscilates")
- textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
- textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
- textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
- textBtwAnim3=TextMobject("$x=1$")
- textBtwAnim1.scale(0.4)
- textBtwAnim2.scale(0.4)
- textBtwAnim3.scale(1.2)
- textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
- textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
- textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
-
- self.play(ShowCreation(equation1),run_time=0.8)
- self.add(eqText[0])
- self.wait(1)
- self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
- self.wait(0.4)
- self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
- self.wait(0.3)
- self.play(FadeOut(eqText[3]))
- self.play(FadeIn(eqTextTerm))
- self.play(Write(textBtwAnim1),Write(textBtwAnim2))
- self.play(FadeIn(textBtwAnim3))
- self.play(ReplacementTransform(equation4,equation5))
- self.wait(0.2)
- self.play(ReplacementTransform(equation5,equation6))
- self.wait(0.2)
- self.play(ReplacementTransform(equation6,equation7))
- self.wait(0.2)
- self.play(ReplacementTransform(equation7,equation8))
- self.wait(0.2)
- self.play(ReplacementTransform(equation8,equation9))
- self.wait(0.2)
- self.play(ReplacementTransform(equation9,equation10))
- self.wait(1)
-
- self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
- self.wait(1)
-
- convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
- divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
- divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
- circle1=Circle(radius=0.01,color=PURPLE_E)
- circle2=Circle(radius=0.01,color=PURPLE_E)
- circle1.shift(ORIGIN+LEFT*x_each_unit)
- circle2.shift(ORIGIN+RIGHT*x_each_unit)
- convergeText=TextMobject("Converges")
- divergeText1=TextMobject("Diverges")
- divergeText2=TextMobject("Diverges")
- convergeText.set_color(GREEN)
- divergeText1.set_color(RED)
- divergeText2.set_color(RED)
- convergeText.scale(0.5)
- divergeText1.scale(0.5)
- divergeText2.scale(0.5)
- convergeText.shift(1.6*UP)
- divergeText1.shift(0.3*UP+1.5*LEFT)
- divergeText2.shift(0.3*UP+1.5*RIGHT)
- self.play(Write(divergeLineLeft),Write(divergeLineRight))
- self.play(FadeIn(convergeLine))
- self.wait(0.5)
- self.play(FadeOut(self.axes))
- self.play(Write(circle1),Write(circle2))
- self.wait(0.5)
- self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
- self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
- self.wait(2)
-
diff --git a/FSF-2020/series-and-transformations/Power Series/script4.py b/FSF-2020/series-and-transformations/Power Series/script4.py
deleted file mode 100644
index 412d20c..0000000
--- a/FSF-2020/series-and-transformations/Power Series/script4.py
+++ /dev/null
@@ -1,108 +0,0 @@
-from manimlib.imports import *
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Consider the","above","example..")
- introText1.scale(0.8)
- introText1.set_color_by_tex_to_color_map({"above":YELLOW})
- self.play(Write(introText1))
- self.wait(1)
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -5,
- "x_max": 5,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1),
- "y_axis_height":7,
- "x_axis_width":7
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.scale(0.6)
- function_expan.set_color(RED)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes()
-
- equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
- self.play(ShowCreation(equation))
- self.wait(1)
-
- dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
- dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
- radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
- rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
- circle=Circle(radius=x_each_unit)
- movingPoint=Circle(radius=0.025)
- movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
- circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
- circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
-
- self.play(Write(dashLineLeft),Write(dashLineRight))
- self.wait(1)
-
- equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
- self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
- self.wait(0.5)
- self.play(Write(radiusLine))
- self.play(MoveAlongPath(movingPoint,circleEq1))
- self.play(MoveAlongPath(movingPoint,circleEq2))
- self.play(FadeIn(circle))
- self.wait(1)
-
- radiusText=TextMobject("Radius of convergence")
- radiusText.scale(0.14)
- radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
-
- self.play(Write(radiusText))
- self.wait(0.6)
-
- 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.3)
-
- self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
- extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
- self.play(Write(extendLine))
- doubleArrow=TextMobject("$\longleftrightarrow$")
- doubleArrow.scale(1.6)
- doubleArrow.set_color(BLUE)
- doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
- self.play(FadeIn(doubleArrow))
- self.wait(1)
- rangeText=TextMobject("Interval of convergence")
- rangeText.scale(0.15)
- rangeText.shift(ORIGIN+y_each_unit*DOWN)
- self.play(Write(rangeText))
- self.wait(0.6)
-
- 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/series-and-transformations/Power Series/script5.py b/FSF-2020/series-and-transformations/Power Series/script5.py
deleted file mode 100644
index e9681aa..0000000
--- a/FSF-2020/series-and-transformations/Power Series/script5.py
+++ /dev/null
@@ -1,136 +0,0 @@
-from manimlib.imports import *
-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)
-
-
-def gety(x,n):
- ans=0
- for i in range(0,n+1):
- if(i%2==0):
- ans+=(math.pow(x,2*i))
- else:
- ans-=(math.pow(x,2*i))
- return ans
-
-def makeSeries(x,points,x_each_unit,y_each_unit):
- p=0
- for point in points:
- y=gety(x,p)
- point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
- p+=1
-
-def makeLines(x,numPoints,x_each_unit,y_each_unit):
- lines=[0]*numPoints
- for i in range(0,numPoints-1):
- y=gety(x,i)
- y_next=gety(x,i+1)
- lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
- return lines
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -6,
- "x_max": 6,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$k$",
- "y_axis_label": "$f(\\frac{1}{2})_k$",
- "exclude_zero_label": True,
- "x_axis_width":7,
- "y_axis_height":7
- }
-
- 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)
- sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
- sequence.set_color(RED)
- sequence.scale(0.35)
- sequence.to_edge(UP+RIGHT)
- formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
- formula.set_color(PURPLE_C)
- formula.scale(0.4)
- formula.shift(5.3*RIGHT+3*UP)
- fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
- fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
- fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
- fLineText.set_color(RED)
- fLineText.scale(0.3)
- fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
- points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
- makeSeries(0.5,points,x_each_unit,y_each_unit)
- lines=makeLines(0.5,6,x_each_unit,y_each_unit)
-
-
- self.add(sequence)
- self.add(formula)
- self.setup_axes(animate=True)
- self.play(Write(fLine))
- self.add(fLineText)
- for p in points:
- self.add(p)
- 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)
-
- explanation1=TextMobject("Since the series","converges","to")
- explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
- explanation2=TextMobject("$\\frac {4}{5}$")
- explanation2.set_color(BLUE)
- explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
- explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
- explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
- explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
- explanation1.scale(0.5)
- explanation3.scale(0.5)
- explanation1.shift(1.8*DOWN+3.5*RIGHT)
- explanation2.shift(2.4*DOWN+3.5*RIGHT)
- explanation3.shift(1.8*DOWN+3.5*RIGHT)
- explanation4.shift(2.4*DOWN+3.5*RIGHT)
-
- self.play(Write(explanation1))
- self.play(FadeIn(explanation2))
- self.wait(1)
- self.play(FadeOut(explanation1),FadeOut(explanation2))
- self.play(Write(explanation3))
- self.play(Write(explanation4))
- self.wait(2)
diff --git a/FSF-2020/series-and-transformations/README.md b/FSF-2020/series-and-transformations/README.md
deleted file mode 100644
index 4747205..0000000
--- a/FSF-2020/series-and-transformations/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Contributer: G Sri Harsha
-
-GitHub Handle: GSri30
-
-Sub-Topics Covered:
-
- - Power Series
-
- Taylor Series
-
- Laplace Transformation
-
- Fourier Transformation
-
- z-Transform
-
- Constant-Q transform
-
diff --git a/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf b/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
deleted file mode 100644
index 2096f52..0000000
Binary files a/FSF-2020/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf and /dev/null differ
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script1.py b/FSF-2020/series-and-transformations/Taylor Series/script1.py
deleted file mode 100644
index e83eff8..0000000
--- a/FSF-2020/series-and-transformations/Taylor Series/script1.py
+++ /dev/null
@@ -1,198 +0,0 @@
-from manimlib.imports import*
-import math
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-class intro(Scene):
- def construct(self):
- equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
- equation.scale(2)
- equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
- text=TextMobject("let $a=0$")
- text.scale(0.7)
- text.shift(DOWN)
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text))
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- self.wait(1.4)
-
- coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
- coeff[0].shift(3.39*UP+4.88*RIGHT)
- coeff[0].scale(0.5)
- coeff[1].shift(3.39*UP+5.3*RIGHT)
- coeff[1].scale(0.275)
- coeff[2].shift(3.39*UP+5.98*RIGHT)
- coeff[2].scale(0.28)
-
- for obj in coeff:
- obj.set_color(GOLD_A)
-
- firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
- secondApprox=[self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:x+1,color=BLUE),
- self.get_graph(lambda x:-x+1,color=BLUE)]
- thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
-
- firstGraph=self.get_graph(lambda x:1,color=BLUE)
- secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
-
- bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence the","slopes","should","even match")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
-
- bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
- self.wait(1)
- self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
- self.wait(0.6)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
- finalFormula.scale(0.8)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
-
- 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/series-and-transformations/Taylor Series/script2.py b/FSF-2020/series-and-transformations/Taylor Series/script2.py
deleted file mode 100644
index b5d0a53..0000000
--- a/FSF-2020/series-and-transformations/Taylor Series/script2.py
+++ /dev/null
@@ -1,195 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class intro(Scene):
- def construct(self):
- 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.scale(0.7)
- text.shift(DOWN)
-
- shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
- shiftText.scale(0.6)
- shiftText.shift(2.4*DOWN)
-
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(Write(shiftText))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- 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)
-
- 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)]
-
- 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)
-
- bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
-
- bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- 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)
- self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- 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)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- 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)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
-
- 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
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script3.py b/FSF-2020/series-and-transformations/Taylor Series/script3.py
deleted file mode 100644
index a2870d4..0000000
--- a/FSF-2020/series-and-transformations/Taylor Series/script3.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- self.setup_axes(animate=True)
-
- lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
-
- bottomText1=TextMobject("Apply $f(x)=T_{n}(x)$")
- bottomText2=TextMobject("Then apply $f'(x)=T_{n}'(x)$")
- bottomText3=TextMobject("Then apply $f''(x)=T_{n}''(x)$")
- bottomText4=TextMobject("and so on..")
-
- bottomText1.scale(0.5)
- bottomText2.scale(0.5)
- bottomText3.scale(0.5)
- bottomText4.scale(0.5)
-
- bottomText1.shift(3*RIGHT+2*DOWN)
- bottomText2.shift(3*RIGHT+2*DOWN)
- bottomText3.shift(3*RIGHT+2*DOWN)
- bottomText4.shift(3*RIGHT+2*DOWN)
-
- equations=[self.get_graph(lambda x:math.log2(2),color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)]
-
- terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
- for obj in terms:
- obj.scale(0.5)
-
- terms[0].shift(3*UP+3*RIGHT)
- terms[1].next_to(terms[0],buff=0.1)
- terms[2].next_to(terms[1],buff=0.1)
- terms[3].next_to(terms[2],buff=0.1)
- terms[4].next_to(terms[3],buff=0.1)
-
- self.play(ShowCreation(lnx))
- self.wait(1)
- self.play(Write(bottomText1))
- self.wait(0.5)
- self.play(ShowCreation(equations[0]),Write(terms[0]),Write(terms[1]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText1,bottomText2))
- self.wait(0.5)
- self.play(ReplacementTransform(equations[0],equations[1]),Write(terms[2]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- self.play(ReplacementTransform(equations[1],equations[2]),Write(terms[3]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText3,bottomText4),Write(terms[4]))
- self.wait(1.5)
-
- self.play(FadeOut(terms[0]),FadeOut(terms[1]),FadeOut(terms[2]),FadeOut(terms[3]),FadeOut(terms[4]),FadeOut(bottomText4))
-
- dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
- dline.shift(ORIGIN+x_each_unit*4*RIGHT)
-
- bottomText5=TextMobject("Here","after $x=4$",", the graph","continuously diverges away","from $ln(x)$")
- bottomText5.scale(0.3)
- bottomText5.shift(4.5*RIGHT+2*DOWN)
- bottomText5.set_color_by_tex_to_color_map({"after $x=4$":YELLOW,"continuously diverges away":BLUE})
-
- self.play(Write(bottomText5),Write(dline))
- self.wait(1)
- self.play(ReplacementTransform(equations[2],equations[3]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[3],equations[4]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[4],equations[5]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[5],equations[6]),FadeOut(bottomText5))
- self.wait(1)
-
- circle=Circle(radius=ORIGIN+x_each_unit*2,color=PURPLE_E)
- circle.shift(ORIGIN+RIGHT*x_each_unit*2)
- radiusLine=Line(start=ORIGIN+x_each_unit*RIGHT*2,end=ORIGIN+x_each_unit*4*RIGHT,color=PURPLE_E)
- radius=TextMobject("$R$")
- radius.set_color(RED)
- radius.scale(0.5)
- radius.shift(ORIGIN+RIGHT*x_each_unit*2.45+DOWN*y_each_unit*0.6)
-
- self.play(FadeOut(equations[6]),Write(circle))
- self.wait(0.6)
- self.play(Write(radiusLine))
- self.play(FadeIn(radius))
- self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/series-and-transformations/Taylor Series/script4.py b/FSF-2020/series-and-transformations/Taylor Series/script4.py
deleted file mode 100644
index 1f41c97..0000000
--- a/FSF-2020/series-and-transformations/Taylor Series/script4.py
+++ /dev/null
@@ -1,82 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- self.setup_axes(animate=True)
- lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
- equation=self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)
-
- terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
- for obj in terms:
- obj.scale(0.5)
-
- terms[0].shift(3*UP+3*RIGHT)
- terms[1].next_to(terms[0],buff=0.1)
- terms[2].next_to(terms[1],buff=0.1)
- terms[3].next_to(terms[2],buff=0.1)
- terms[4].next_to(terms[3],buff=0.1)
-
- self.play(ShowCreation(lnx))
- self.wait(1)
- self.play(FadeIn(equation),FadeIn(terms[0]),FadeIn(terms[1]),FadeIn(terms[2]),FadeIn(terms[3]),FadeIn(terms[4]))
- self.wait(1)
-
- 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)
- increasingText=TextMobject("Increases!")
- increasingText.set_color(GREEN)
- followupText=TextMobject("as n increase!")
- followupText.scale(0.3)
- followupText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.1)
- increasingText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.6)
- 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)
-
- area1=self.get_riemann_rectangles(lnx,x_max=8,x_min=4,dx=0.01,start_color=BLUE,end_color=RED,stroke_width=0,fill_opacity=0.8)
- area2=self.get_riemann_rectangles(equation,x_max=5.2,x_min=4,dx=0.025,start_color=BLACK,end_color=BLACK,stroke_width=0,fill_opacity=1)
-
- 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
diff --git a/FSF-2020/triple-and-surface-integrals/README.md b/FSF-2020/triple-and-surface-integrals/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/vector-spaces/README.md b/FSF-2020/vector-spaces/README.md
deleted file mode 100644
index e69de29..0000000
--
cgit
From d522cbd8782ba712da3acac9cb60a60edb925b1e Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Sat, 23 May 2020 20:45:28 +0530
Subject: Files added to Linear Transformations (Linear Maps)
---
.../Animation.py | 0
...1_Understand_Linear_Transformations_visually.py | 193 +++++++++++++++++++++
.../file2_Uniform_Scaling.py | 91 ++++++++++
.../file3_Horizontal_Shear.py | 53 ++++++
.../file3_Horizontal_Shear_gif.gif | Bin 0 -> 1566999 bytes
.../file4_Vertical_Shear.py | 52 ++++++
.../file4_Vertical_Shear_gif.gif | Bin 0 -> 1347079 bytes
7 files changed, 389 insertions(+)
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/Animation.py
deleted file mode 100644
index e69de29..0000000
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
new file mode 100644
index 0000000..577032d
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
@@ -0,0 +1,193 @@
+from manimlib.imports import *
+
+class Rotation(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Understanding Linear Transformations")
+ self.play(Write(introText))
+ self.wait(1)
+
+ introText1 = TextMobject("Visually ... ")
+ introText1.move_to(DOWN)
+ self.play(Write(introText1))
+ self.wait(1)
+ self.play(FadeOut(introText), FadeOut(introText1))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $2\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 2\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*LEFT + 0.25*DOWN, end = self.graph_origin+2*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.25*UP)
+ self.play(ShowCreation(arrow_v))
+
+ Text_i = TextMobject("$\hat{i}$")
+ Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ Text_i.scale(0.75)
+ Text_j = TextMobject("$\hat{j}$")
+ Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ Text_j.scale(0.75)
+
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ self.play(ShowCreation(arrow_i), ShowCreation(arrow_j), Write(Text_i), Write(Text_j))
+
+ Text_2i = TextMobject("$2\hat{i}$")
+ Text_2i.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text_3j = TextMobject("$3\hat{j}$")
+ Text_3j.move_to(self.graph_origin+1*XTD*LEFT+1.5*YTD*UP)
+
+ arrow_2i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+2*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_2i.set_color(YELLOW)
+ arrow_3j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+3*YTD*UP+0.25*UP)
+ arrow_3j.set_color(RED)
+ self.wait(0.5)
+ self.play(Transform(arrow_i,arrow_2i), Transform(arrow_j,arrow_3j), Transform(Text_i,Text_2i), Transform(Text_j,Text_3j))
+ self.play(ApplyMethod(arrow_j.move_to,self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP) , ApplyMethod(Text_j.move_to,self.graph_origin+2.5*XTD*RIGHT+1.5*YTD*UP+ 0.15*RIGHT + 0.25*UP))
+
+ new_Text_v = TextMobject("$\overrightarrow{v}$")
+ new_Text_v.move_to(self.graph_origin+0.5*XTD*RIGHT+1.5*YTD*UP)
+ self.play(Write(new_Text_v))
+
+ new_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ new_arrow_i.set_color(YELLOW)
+ new_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ new_arrow_j.set_color(RED)
+
+ new_Text_i = TextMobject("$\hat{i}$")
+ new_Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ new_Text_i.scale(0.75)
+ new_Text_j = TextMobject("$\hat{j}$")
+ new_Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ new_Text_j.scale(0.75)
+
+ self.wait(1)
+
+ self.play(FadeOut(Text_i),
+ FadeOut(Text_j),
+ FadeOut(arrow_i),
+ FadeOut(arrow_j),
+ ShowCreation(new_arrow_i),
+ ShowCreation(new_arrow_j),
+ Write(new_Text_i),
+ Write(new_Text_j))
+
+ self.play(ApplyMethod(Text1.move_to,4*RIGHT))
+ Text3 = TextMobject("Let the be a linear transformation function")
+ Text3.scale(0.5)
+ Text4 = TextMobject("$T$ which rotates the vectors by angle of $90^{\circ}$")
+ Text4.scale(0.5)
+ Text3.move_to(4*RIGHT+3*UP)
+ Text4.move_to(4*RIGHT+2.5*UP)
+ self.play(Write(Text3), Write(Text4))
+ self.wait(2)
+
+ Text6 = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text6.scale(0.75)
+ Text6.set_color(YELLOW)
+ Text6.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text7 = TextMobject(r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text7.scale(0.75)
+ Text7.set_color(RED)
+ Text7.move_to(self.graph_origin+1*XTD*LEFT+1*YTD*UP)
+
+ self.play(Transform(new_Text_i,Text6))
+ self.play(Transform(new_Text_j,Text7))
+
+ Text5 = TextMobject(r"$\overrightarrow{v} = 2 $", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text5[1].set_color(YELLOW)
+ Text5[3].set_color(RED)
+ Text5.move_to(4*RIGHT)
+
+ self.play(Transform(Text1, Text5))
+ self.wait()
+
+ arrow_modified_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*UP, end = self.graph_origin-(1*YTD*UP+0.25*UP))
+ arrow_modified_i.set_color(YELLOW)
+ arrow_modified_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_modified_j.set_color(RED)
+
+ yellow_i = TextMobject(r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$")
+ yellow_i.set_color(YELLOW).scale(0.75)
+ yellow_i.move_to(self.graph_origin + 1*XTD*DOWN + 1*YTD*LEFT)
+
+ red_j = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ red_j.set_color(RED).scale(0.75)
+ red_j.move_to(self.graph_origin + 1*XTD*UP + 1*YTD*RIGHT)
+
+ Text8 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text8[1].set_color(YELLOW)
+ Text8[3].set_color(RED)
+ Text8.move_to(4*RIGHT+1.5*DOWN)
+ Text8.scale(0.75)
+
+ new_Text__v = TextMobject("$\overrightarrow{v}_{transformed}$")
+ new_Text__v.scale(0.75)
+ arrow_modified_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT + 0.15*UP, end = self.graph_origin+2*XTD*DOWN+3*YTD*RIGHT+ 0.15*DOWN + 0.25*RIGHT)
+ self.play(Transform(arrow_v, arrow_modified_v),
+ Transform(new_arrow_i, arrow_modified_i),
+ Transform(new_arrow_j, arrow_modified_j),
+ Transform(new_Text_i,yellow_i),
+ Transform(new_Text_j,red_j),
+ FadeOut(new_Text_v),
+ ApplyMethod(new_Text__v.move_to,self.graph_origin+3*XTD*RIGHT+0.5*YTD*DOWN),
+ Write(Text8))
+
+ self.play(FadeOut(Text1), FadeOut(Text3), FadeOut(Text4), ApplyMethod(Text8.move_to,4*RIGHT+3*UP))
+
+ Text9 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\hat{i}_{transformed}$", r"+3", r"$\hat{j}_{transformed}$")
+ Text9[1].set_color(YELLOW)
+ Text9[3].set_color(RED)
+ Text9.move_to(4*RIGHT+2*UP)
+ Text9.scale(0.5)
+
+ self.play(Write(Text9))
+
+ v_transformed = TextMobject(r"$\overrightarrow{v}_{transformed} \equiv T(\overrightarrow{v})$")
+ v_transformed.scale(0.75).move_to(4*RIGHT+UP)
+ i_transformed = TextMobject(r"$\hat{i}_{transformed} \equiv T(\hat{i})$")
+ i_transformed.set_color(YELLOW).scale(0.75).move_to(4*RIGHT)
+ j_transformed = TextMobject(r"$\hat{v}_{transformed} \equiv T(\hat{j})$")
+ j_transformed.set_color(RED).scale(0.75).move_to(4*RIGHT+DOWN)
+
+ self.play(Write(v_transformed), Write(i_transformed), Write(j_transformed))
+ self.wait(3)
+
+ Text10 = TextMobject(r"$T(\overrightarrow{v}) = $", r"$\begin{pmatrix} 3 \\ -2 \end{pmatrix}$")
+ Text10[1].set_color(BLUE_E)
+ Text10.move_to(4*RIGHT+1*UP)
+ Text10.scale(0.75)
+
+ self.play(Write(Text10), ApplyMethod(v_transformed.move_to,4*RIGHT+2*UP), FadeOut(i_transformed), FadeOut(j_transformed), FadeOut(Text9))
+ self.wait(1)
+
+ self.play(FadeOut(self.axes),
+ FadeOut(arrow_v),
+ FadeOut(new_arrow_i),
+ FadeOut(new_arrow_j),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_j),
+ FadeOut(new_Text__v),
+ FadeOut(Text10),
+ FadeOut(v_transformed),
+ FadeOut(Text8))
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
new file mode 100644
index 0000000..a7856a5
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class Scaling(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ introText = TextMobject("Uniform Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $3\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 3\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 4, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+3*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ vector_v = TextMobject(r"$\vec{v}$")
+ vector_v.move_to(self.graph_origin + 1*XTD*RIGHT + 2*YTD*UP )
+ self.play(ShowCreation(arrow_v),Write(vector_v))
+ scaling_factor = TextMobject(r"Scaling Factor = $\frac{4}{3}$")
+ scaling_factor.scale(0.75)
+ scaled_vector = TextMobject(r"$T(\vec{v}) = \frac{4}{3} \left[ \begin{array} {c} 3 \\ 3 \end{array} \right] = \left[ \begin{array} {c} 4 \\ 4 \end{array} \right]$")
+ scaled_vector.set_color(DARK_BLUE)
+ scaled_vector.scale(0.75)
+ scaling_factor.move_to(4*RIGHT)
+ scaled_vector.move_to(4*RIGHT+DOWN)
+ self.play(Write(scaling_factor))
+ self.wait()
+ self.play(Write(scaled_vector))
+
+ transformed_arrow_v = Arrow(stroke_width = 2, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+4*XTD*RIGHT+4*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ transformed_arrow_v.set_color(DARK_BLUE)
+ transformed_vector_v = TextMobject(r"$T(\vec{v})$")
+ transformed_vector_v.move_to(self.graph_origin + 4.5*XTD*RIGHT + 4.5*YTD*UP )
+ transformed_vector_v.set_color(DARK_BLUE)
+ self.play(ShowCreation(transformed_arrow_v), Write(transformed_vector_v))
+
+ self.wait()
+
+ represent_text1 = TextMobject("Representation of scaling")
+ represent_text2 = TextMobject("of vectors in point form")
+ represent_text1.move_to(4*RIGHT+3*UP)
+ represent_text2.move_to(4*RIGHT+2*UP)
+ self.play(Write(represent_text1), Write(represent_text2))
+
+ dot_init = Dot(self.graph_origin+3*XTD*RIGHT+3*YTD*UP)
+ dot_trans = Dot(self.graph_origin+4*XTD*RIGHT+4*YTD*UP)
+
+ self.play(ApplyMethod(vector_v.move_to,self.graph_origin+2.5*XTD*RIGHT+2.5*YTD*UP),
+ ApplyMethod(transformed_vector_v.move_to,self.graph_origin+4.5*XTD*RIGHT+4.5*YTD*UP),
+ ShowCreation(dot_init),
+ Transform(arrow_v,dot_init),
+ Transform(transformed_arrow_v,dot_trans))
+
+ self.wait(2)
+
+ self.play(FadeOut(dot_init),
+ FadeOut(arrow_v),
+ FadeOut(transformed_arrow_v),
+ FadeOut(represent_text1),
+ FadeOut(represent_text2),
+ FadeOut(self.axes),
+ FadeOut(scaling_factor),
+ FadeOut(scaled_vector),
+ FadeOut(transformed_vector_v),
+ FadeOut(vector_v),
+ FadeOut(Text1))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
new file mode 100644
index 0000000..91f098e
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
@@ -0,0 +1,53 @@
+from manimlib.imports import *
+
+class Hori_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Horizontal")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Horizontal")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+4*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), Transform(square,rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif
new file mode 100644
index 0000000..9bef1b6
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
new file mode 100644
index 0000000..718e4e0
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
@@ -0,0 +1,52 @@
+from manimlib.imports import *
+
+class Ver_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Vertical")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Vertical")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+ 0.25*UP)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*UP, self.graph_origin+2*XTD*RIGHT+4*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), FadeOut(square), ShowCreation(rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif
new file mode 100644
index 0000000..7ca323f
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif differ
--
cgit
From 29d18cfc55db1775f1c34a068ba9632bf7514d27 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:43:30 +0530
Subject: added scalar functions folder
---
.../scalar_function_application.py | 129 +++++++++++++++
.../scalar_function_domain_range.py | 132 +++++++++++++++
.../scalar_function_level_curves.mp4 | Bin 0 -> 726339 bytes
.../scalar_function_level_curves2.mp4 | Bin 0 -> 2088849 bytes
.../scalar_function_neural_nets.py | 177 +++++++++++++++++++++
.../scalar_function_parabola_example.py | 35 ++++
6 files changed, 473 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
new file mode 100644
index 0000000..56b3e53
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
@@ -0,0 +1,129 @@
+from manimlib.imports import *
+
+class ScalarApplication(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ cube = Cube()
+ cube.set_fill(YELLOW_E, opacity = 0.1)
+ cube.scale(2)
+ self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+ self.play(ShowCreation(cube),ShowCreation(axes))
+
+ dot = Sphere()
+ dot.scale(0.1)
+ dot.move_to(np.array([1,0.5,1]))
+ dot.set_fill(RED)
+
+ #dot = Dot(np.array([1,0.5,1]), color = RED)
+ temp_func = TextMobject("T(x,y,z)")
+ temp_func.next_to(dot,RIGHT)
+ temp_func.set_color(RED)
+ temp_func_trans = TextMobject("T(1,0.5,1)")
+ temp_func_trans.next_to(dot,RIGHT)
+ temp_func_trans.set_color(RED)
+ temp = TextMobject(r"$36 ^\circ$")
+ temp.next_to(dot,RIGHT)
+ temp.set_color(RED_E)
+
+
+ self.play(ShowCreation(dot))
+ self.play(ShowCreation(temp_func))
+ self.play(Transform(temp_func, temp_func_trans))
+ self.wait(1)
+ self.play(Transform(temp_func, temp))
+
+
+
+
+ dot1 = Sphere()
+ dot1.scale(0.1)
+ dot1.move_to(np.array([-1,-0.8,-1.5]))
+ dot1.set_fill(BLUE_E)
+ #dot1 = Dot(np.array([-1,-0.8,-1.5]), color = BLUE)
+ temp_func1 = TextMobject("T(x,y,z)")
+ temp_func1.next_to(dot1,LEFT)
+ temp_func1.set_color(BLUE)
+ temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
+ temp_func_trans1.next_to(dot1,LEFT)
+ temp_func_trans1.set_color(BLUE)
+ temp1 = TextMobject(r"$24 ^\circ$")
+ temp1.next_to(dot1,LEFT)
+ temp1.set_color(BLUE)
+
+ self.play(ShowCreation(dot1))
+ self.play(ShowCreation(temp_func1))
+ self.play(Transform(temp_func1, temp_func_trans1))
+ self.wait(1)
+ self.play(Transform(temp_func1, temp1))
+
+ self.play(FadeOut(temp_func))
+ self.play(FadeOut(temp_func1))
+
+
+ self.move_camera(phi=80* DEGREES,theta=45*DEGREES,run_time=3)
+
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.wait(4)
+ self.stop_ambient_camera_rotation()
+ self.wait(2)
+
+
+
+
+class AddTempScale(Scene):
+ def construct(self):
+ temp_scale = ImageMobject("tempscale.png")
+ temp_scale.scale(4)
+ temp_scale.move_to(2*RIGHT)
+ self.play(ShowCreation(temp_scale))
+
+
+ temp_func = TextMobject("T(x,y,z)")
+ temp_func.move_to(3*UP +2*LEFT)
+ temp_func.set_color(RED)
+ temp_func_trans = TextMobject("T(1,0.5,1)")
+ temp_func_trans.move_to(3*UP +2*LEFT)
+ temp_func_trans.set_color(RED)
+ temp = TextMobject(r"$36 ^\circ$")
+ temp.set_color(RED)
+ temp.move_to(3*UP +2*LEFT)
+ temp.scale(0.7)
+
+ self.play(ShowCreation(temp_func))
+ self.play(Transform(temp_func, temp_func_trans))
+ self.wait(1)
+ self.play(Transform(temp_func, temp))
+ self.play(ApplyMethod(temp_func.move_to, 1.8*UP +1.8*RIGHT))
+
+
+ temp_func1 = TextMobject("T(x,y,z)")
+ temp_func1.move_to(2*UP +2*LEFT)
+ temp_func1.set_color(BLUE)
+ temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
+ temp_func_trans1.move_to(2*UP +2*LEFT)
+ temp_func_trans1.set_color(BLUE)
+ temp1 = TextMobject(r"$24 ^\circ$")
+ temp1.set_color(BLUE)
+ temp1.move_to(2*UP +2*LEFT)
+ temp1.scale(0.7)
+
+ self.play(ShowCreation(temp_func1))
+ self.play(Transform(temp_func1, temp_func_trans1))
+ self.wait(1)
+ self.play(Transform(temp_func1, temp1))
+ self.play(ApplyMethod(temp_func1.move_to, 0.6*UP +1.8*RIGHT))
+
+
+
+ transtext = TextMobject("Scalar Function Transform:")
+ transtext.set_color(GREEN)
+ transtext1 = TextMobject(r"$\mathbb{R}^3 \rightarrow \mathbb{R}$")
+ transtext1.set_color(YELLOW_E)
+ transtext.move_to(3*UP +3*LEFT)
+ transtext1.next_to(transtext,DOWN)
+ self.play(Write(transtext))
+ self.play(Write(transtext1))
+ self.wait(2)
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
new file mode 100644
index 0000000..9b1ca7b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
@@ -0,0 +1,132 @@
+# Plotting Graphs
+from manimlib.imports import *
+
+class PlotGraphs(GraphScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": 0,
+ "y_max": 4,
+ "graph_origin": ORIGIN + 2.5* DOWN,
+ "x_labeled_nums": list(range(-5, 6)),
+ "y_labeled_nums": list(range(0, 5)),
+ }
+ def construct(self):
+
+ topic = TextMobject("Domain and Range")
+ topic.scale(2)
+ topic.set_color(YELLOW)
+ self.play(Write(topic))
+ self.play(FadeOut(topic))
+ self.wait(1)
+
+
+ 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(animate = True)
+
+ graphobj = self.get_graph(lambda x : np.sqrt(x + 4), x_min = -4, x_max = 5)
+ graph_lab = self.get_graph_label(graphobj, label = r"\sqrt{x + 4}")
+
+
+ rangeline1 = Arrow(self.graph_origin+2.2*YTD*UP+5*XTD*LEFT, self.graph_origin+4.1*YTD*UP+5*XTD*LEFT)
+ rangeline2 = Arrow(self.graph_origin+1.7*YTD*UP+5*XTD*LEFT, self.graph_origin+5*XTD*LEFT)
+ rangeline1.set_color(RED)
+ rangeline2.set_color(RED)
+
+ rangeMsg = TextMobject(r"Range: $y \geq 0$")
+ rangeMsg.move_to(self.graph_origin+2*YTD*UP+5*XTD*LEFT)
+ rangeMsg.scale(0.5)
+ rangeMsg.set_color(YELLOW)
+
+ domainline1 = Line(self.graph_origin+0.6*YTD*DOWN+1.2*XTD*LEFT, self.graph_origin+0.6*YTD*DOWN + 4*XTD*LEFT)
+ domainline2 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.1*XTD*RIGHT, self.graph_origin+0.6*YTD*DOWN + 5.3*XTD*RIGHT)
+ domainline1.set_color(PINK)
+ domainline2.set_color(PINK)
+
+ domainMsg = TextMobject(r"Domain: $x \geq -4$")
+ domainMsg.move_to(self.graph_origin+0.6*YTD*DOWN)
+ domainMsg.scale(0.5)
+ domainMsg.set_color(GREEN)
+
+
+
+
+ self.play(ShowCreation(graphobj))
+ self.play(ShowCreation(graph_lab))
+ self.wait(1)
+ self.play(GrowArrow(rangeline1))
+ self.play(GrowArrow(rangeline2))
+ self.play(Write(rangeMsg))
+ self.wait(1)
+ self.play(GrowArrow(domainline1))
+ self.play(GrowArrow(domainline2))
+ self.play(Write(domainMsg))
+ self.wait(3)
+
+ self.wait(2)
+
+
+
+
+class PlotSineGraphs(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN,
+ "x_labeled_nums": list(range(-8, 9)),
+ "y_labeled_nums": list(range(-1, 2)),
+ }
+ 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(animate = True)
+
+ sineobj = self.get_graph(lambda x : np.sin(x), x_min = -7, x_max = 8)
+ sine_lab = self.get_graph_label(sineobj, label = "\\sin(x)")
+
+
+ rangeline1 = Line(8*XTD*LEFT,1*YTD*UP+8*XTD*LEFT)
+ rangeline2 = Line(8*XTD*LEFT,1*YTD*DOWN+8*XTD*LEFT)
+ rangeline1.set_color(RED)
+ rangeline2.set_color(RED)
+
+ rangeMsg = TextMobject(r"Range: $-1 \leq y \leq 1$")
+ rangeMsg.move_to(1.1*YTD*UP+8.5*XTD*LEFT)
+ rangeMsg.scale(0.5)
+ rangeMsg.set_color(YELLOW)
+
+
+ domainline1 = Arrow(1.1*YTD*DOWN+2*XTD*LEFT, 1.1*YTD*DOWN + 8.5*XTD*LEFT)
+ domainline2 = Arrow(1.1*YTD*DOWN+2*XTD*RIGHT, 1.1*YTD*DOWN + 8.5*XTD*RIGHT)
+ domainline1.set_color(PINK)
+ domainline2.set_color(PINK)
+
+ domainMsg = TextMobject(r"Domain: $[-\infty, \infty]$")
+ domainMsg.move_to(1.1*YTD*DOWN)
+ domainMsg.scale(0.5)
+ domainMsg.set_color(GREEN)
+
+
+
+ self.play(ShowCreation(sineobj))
+ self.play(ShowCreation(sine_lab))
+ self.wait(1)
+ self.play(GrowArrow(rangeline1))
+ self.play(GrowArrow(rangeline2))
+ self.play(Write(rangeMsg))
+ self.wait(1)
+ self.play(GrowArrow(domainline1))
+ self.play(GrowArrow(domainline2))
+ self.play(Write(domainMsg))
+ self.wait(3)
+
+
+
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4 b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4
new file mode 100644
index 0000000..6af2670
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4 differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4 b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4
new file mode 100644
index 0000000..b21ae25
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4 differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
new file mode 100644
index 0000000..eb6bf45
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
@@ -0,0 +1,177 @@
+from manimlib.imports import *
+
+class SigmoidFunc(GraphScene):
+ CONFIG = {
+ "x_min": -4,
+ "x_max": 4,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN + 0.8*DOWN,
+ "x_labeled_nums": list(range(-4, 5)),
+ "y_labeled_nums": list(range(-1, 2)),
+ "y_axis_height": 4.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)
+
+ topic = TextMobject("Sigmoid Function")
+ topic.move_to(3.2*UP)
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.setup_axes(animate = True)
+ sigmoid_func = self.get_graph(lambda x : (1/(1 + np.exp(-x))), x_min = -4, x_max = 4)
+ sigmoid_lab = self.get_graph_label(sigmoid_func, label = r"\frac{1}{1 + e^{-z}}")
+
+
+
+
+ self.play(ShowCreation(sigmoid_func),Write(sigmoid_lab))
+ self.play(Write(topic))
+ self.wait(2)
+ self.play(FadeOut(sigmoid_func), FadeOut(sigmoid_lab))
+ self.wait(1)
+
+
+
+class NeuralNet(GraphScene):
+ def construct(self):
+
+ sigmoid_exp = TextMobject(r"g(z) = g($\theta^T$ X) = $\frac{1}{1 + e^{-z}}$")
+ sigmoid_exp.move_to(3*UP + 4*LEFT)
+ sigmoid_exp.scale(0.8)
+ sigmoid_exp.set_color(BLUE)
+ sigmoid_exp1 = TextMobject(r"Predict: 'y = 1'",r"When g(z) $\geq$ 0.5, z $\geq$ 0, $\theta^T$ X $\geq$ 0")
+ sigmoid_exp2 = TextMobject(r"Predict: 'y = 0'", r"When g(z) $\leq$ 0.5, z $\leq$ 0, $\theta^T$ X $\leq$ 0")
+ sigmoid_exp1.scale(0.5)
+ sigmoid_exp2.scale(0.5)
+ sigmoid_exp1.set_color(PURPLE)
+ sigmoid_exp2.set_color(PURPLE)
+
+ sigmoid_exp1[0].next_to(sigmoid_exp, 1.5*DOWN)
+ sigmoid_exp1[1].next_to(sigmoid_exp1[0], DOWN)
+ sigmoid_exp2[0].next_to(sigmoid_exp1[1], 1.5*DOWN)
+ sigmoid_exp2[1].next_to(sigmoid_exp2[0], DOWN)
+
+
+ self.play(Write(sigmoid_exp))
+ self.play(Write(sigmoid_exp1[0]), Write(sigmoid_exp1[1]))
+ self.play(Write(sigmoid_exp2[0]), Write(sigmoid_exp2[1]))
+ self.wait(2)
+
+
+ neuron1 = Circle()
+ neuron1.set_fill(YELLOW_A, opacity = 0.5)
+
+ neuron2 = Circle()
+ neuron2.set_fill(ORANGE, opacity = 0.5)
+
+ neuron3 = Circle()
+ neuron3.set_fill(GREEN_E, opacity = 0.5)
+
+ neuron1.move_to(2*UP+RIGHT)
+ neuron2.move_to(2*DOWN+RIGHT)
+ neuron3.move_to(4*RIGHT)
+
+ arrow1 = Arrow(neuron1.get_right(),neuron3.get_left(),buff=0.1)
+ arrow1.set_color(RED)
+ arrow2 = Arrow(neuron2.get_right(),neuron3.get_left(),buff=0.1)
+ arrow2.set_color(RED)
+
+ arrow3 = Arrow(neuron3.get_right(),7*RIGHT,buff=0.1)
+ arrow3.set_color(RED)
+
+
+ sign1 = TextMobject("+1")
+ sign1.move_to(2*UP+RIGHT)
+ sign1.scale(2)
+ sign2 = TextMobject(r"$x_1$")
+ sign2.move_to(2*DOWN+RIGHT)
+ sign2.scale(2)
+ sign3 = TextMobject(r"$h_{\theta}(x)$")
+ sign3.move_to(6*RIGHT+0.4*DOWN)
+ sign3.scale(0.7)
+ sign4 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign4.next_to(sign3,DOWN)
+ sign4.scale(0.5)
+ sign5 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign5.next_to(sign3,DOWN)
+ sign5.scale(0.5)
+ sign6 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign6.next_to(sign3,DOWN)
+ sign6.scale(0.5)
+
+
+ weight1 = TextMobject("10")
+ weight1.next_to(arrow1,UP)
+ weight2 = TextMobject("-20")
+ weight2.next_to(arrow2,DOWN)
+
+ gate = TextMobject("NOT GATE")
+ gate.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ gate.scale(1.5)
+ gate.move_to(3*RIGHT+3.5*UP)
+
+
+
+ truth_table = TextMobject(r"\begin{displaymath}\begin{array}{|c|c|} x & y\\ \hline 1 & 0 \\0 & 1 \\\end{array}\end{displaymath}")
+ truth_table.next_to(sigmoid_exp2[1], 3*DOWN)
+
+ values = TextMobject("1", "0")
+ values.scale(2)
+
+ sign4_trans1 = TextMobject(r"$= g(10 - 20(1))$")
+ sign4_trans2 = TextMobject(r"$= g(10 - 20(0))$")
+ sign4_trans1.next_to(sign3,DOWN)
+ sign4_trans2.next_to(sign3,DOWN)
+ sign4_trans1.scale(0.5)
+ sign4_trans2.scale(0.5)
+
+
+
+ output1 = TextMobject("y = 0")
+ output2 = TextMobject("y = 1")
+ output1.next_to(sign4,DOWN)
+ output2.next_to(sign4,DOWN)
+ output1.scale(1.5)
+ output2.scale(1.5)
+
+
+
+ self.play(ShowCreation(neuron1),ShowCreation(neuron2))
+ self.play(ShowCreation(neuron3))
+ self.play(ShowCreation(sign1),ShowCreation(sign2))
+ self.wait(1)
+
+ self.play(GrowArrow(arrow1))
+ self.play(GrowArrow(arrow2))
+ self.play(ShowCreation(weight1),ShowCreation(weight2))
+
+
+
+ self.play(GrowArrow(arrow3))
+ self.play(Write(sign3),Write(sign4))
+
+ self.play(Write(gate))
+ self.play(ShowCreation(truth_table))
+
+ self.play(ApplyMethod(values[0].move_to, 2*DOWN+RIGHT))
+ self.play(FadeOut(values[0]))
+ self.play(Transform(sign4,sign4_trans1))
+ self.play(Write(output1))
+ self.wait(1)
+ self.play(FadeOut(output1))
+ self.play(Transform(sign4, sign5))
+
+
+ self.play(ApplyMethod(values[1].move_to, 2*DOWN+RIGHT))
+ self.play(FadeOut(values[1]))
+ self.play(Transform(sign4,sign4_trans2))
+ self.play(Write(output2))
+ self.wait(1)
+ self.play(FadeOut(output2))
+ self.play(Transform(sign4, sign6))
+
+ self.wait(2)
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
new file mode 100644
index 0000000..74dc063
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
@@ -0,0 +1,35 @@
+from manimlib.imports import *
+
+class Parabola(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ paraboloid = ParametricSurface(
+ lambda u, v: np.array([
+ 2*np.cosh(u)*np.cos(v),
+ 2*np.cosh(u)*np.sin(v),
+ 2*np.sinh(u)
+ ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],
+ resolution=(15, 32))
+
+ text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", "z = f(x,y)")
+ self.add_fixed_in_frame_mobjects(text3d)
+ text3d[0].move_to(4*LEFT+2*DOWN)
+ text3d[1].next_to(text3d[0], DOWN)
+ text3d[0].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ text3d[1].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE)
+
+ #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+ self.move_camera(phi=110* DEGREES,theta=45*DEGREES)
+ self.add(axes)
+ self.play(ShowCreation(paraboloid))
+ self.play(Write(text3d[0]))
+ self.play(Write(text3d[1]))
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.wait(3)
+ self.move_camera(phi=0 * DEGREES,theta=180*DEGREES,run_time=3)
+ self.wait(3)
+ self.move_camera(phi=110* DEGREES,theta=90*DEGREES,run_time=3)
+ self.wait(3)
+
+
\ No newline at end of file
--
cgit
From 9c45f041b4702c28767117c129ce3a09ae1863ac Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:44:29 +0530
Subject: Added Multivariable Function folder
---
.../multivariable_func_derivative_vectorvf.py | 247 +++++++++++++++++++++
.../multivariable_func_examples.py | 69 ++++++
.../multivariable_func_plot_sphere.py | 42 ++++
.../multivariable_func_respresntation.py | 80 +++++++
.../multivariable_func_vectorvf_sine.py | 91 ++++++++
5 files changed, 529 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
new file mode 100644
index 0000000..466e389
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
@@ -0,0 +1,247 @@
+from manimlib.imports import *
+
+class Derivative(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 3,
+ "y_min": 0,
+ "y_max": 5,
+ "graph_origin": ORIGIN+6*LEFT+3*DOWN,
+ "x_axis_width": 6,
+ "x_labeled_nums": list(range(0, 4)),
+ "y_labeled_nums": list(range(0, 6)),
+ }
+ 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(animate = True)
+
+ graph = self.get_graph(lambda x : x*x, x_min = 0.5, x_max = 2, color = GREEN)
+
+ point1 = Dot().shift(self.graph_origin+0.25*YTD*UP + 0.5*XTD*RIGHT)
+ point1_lab = TextMobject(r"$t = a$")
+ point1_lab.scale(0.7)
+ point1_lab.next_to(point1, RIGHT)
+
+ point2 = Dot().shift(self.graph_origin+2*XTD*RIGHT+4*YTD*UP)
+ point2_lab = TextMobject(r"$t = b$")
+ point2_lab.scale(0.7)
+ point2_lab.next_to(point2, RIGHT)
+
+
+ vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, buff=0.02, color = RED)
+ vector1_lab = TextMobject(r"$\vec r(t)$", color = RED)
+ vector1_lab.move_to(self.graph_origin+1.2*XTD*RIGHT+ 0.75*YTD*UP)
+ vector1_lab.scale(0.8)
+
+ vector2 = Arrow(self.graph_origin, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = YELLOW_C)
+ vector2_lab = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
+ vector2_lab.move_to(self.graph_origin+0.5*XTD*RIGHT+ 2*YTD*UP)
+ vector2_lab.scale(0.8)
+
+ vector3 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PINK)
+ vector3_lab = TextMobject(r"$\vec r(t + h) - \vec r(t)$", color = PINK)
+ vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 1.5*YTD*UP)
+ vector3_lab.scale(0.8)
+
+
+ self.play(ShowCreation(graph))
+ self.play(ShowCreation(point1), Write(point1_lab))
+ self.play(ShowCreation(point2), Write(point2_lab))
+
+ self.play(GrowArrow(vector1),Write(vector1_lab))
+ self.play(GrowArrow(vector2),Write(vector2_lab))
+ self.play(GrowArrow(vector3),Write(vector3_lab))
+ self.wait(1)
+
+ self.display_text()
+
+ self.play(ApplyMethod(vector3_lab.move_to,(self.graph_origin+2.3*XTD*RIGHT+ 2.2*YTD*UP)))
+
+ vector4 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PURPLE)
+ vector4_lab = TextMobject(r"$dx$", color = PURPLE)
+ vector4_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 0.8*YTD*UP)
+ vector4_lab.scale(0.7)
+
+ vector5 = Arrow(self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = ORANGE)
+ vector5_lab = TextMobject(r"$dy$", color = ORANGE)
+ vector5_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 1.4*YTD*UP)
+ vector5_lab.scale(0.7)
+
+ self.play(GrowArrow(vector4),Write(vector4_lab))
+ self.play(GrowArrow(vector5),Write(vector5_lab))
+ self.wait(2)
+
+
+
+ def display_text(self):
+ text1 = TextMobject(r"$\vec r(t)$",r"+", r"$\vec r(t + h) - \vec r(t)$")
+ text1[0].set_color(RED)
+ text1[2].set_color(PINK)
+ text1.scale(0.7)
+
+ text2 = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
+ text2.scale(0.7)
+
+ text3 = TextMobject(r"$ \vec r(t + h) - \vec r(t)$", color = PINK)
+ text3.scale(0.7)
+
+ text4 = TextMobject(r"[", r"$x(t+h)$", r"$\vec i$", r"+", r"$y(t+h)$", r"$\vec j$", r"$] - [$", r"$x(t)$", r"$\vec i$", r"+", r"y(t)", r"$\vec j$", r"]")
+ text4.set_color_by_tex(r"\vec i", BLUE)
+ text4.set_color_by_tex(r"\vec j", GREEN)
+ text4[1].set_color(YELLOW_C)
+ text4[4].set_color(YELLOW_C)
+ text4[-6].set_color(RED)
+ text4[-3].set_color(RED)
+ text4.scale(0.7)
+
+ text5 = TextMobject(r"$[x(t+h) - x(t)]$", r"$\vec i$", r"+", r"$[y(t+h) + y(t)]$", r"$\vec j$")
+ text5.set_color_by_tex(r"\vec i", BLUE)
+ text5.set_color_by_tex(r"\vec j", GREEN)
+ text5[0].set_color(PURPLE)
+ text5[3].set_color(ORANGE)
+ text5.scale(0.7)
+
+ text6 = TextMobject(r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
+ text6.set_color_by_tex(r"\vec i", BLUE)
+ text6.set_color_by_tex(r"\vec j", GREEN)
+ text6[0].set_color(PINK)
+ text6[2].set_color(PURPLE)
+ text6[-2].set_color(ORANGE)
+ text6.scale(0.8)
+
+ text7 = TextMobject(r"$\lim_{h \rightarrow 0}$", r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\lim_{h \rightarrow 0}$", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\lim_{h \rightarrow 0}$", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
+ text7.set_color_by_tex(r"\vec i", BLUE)
+ text7.set_color_by_tex(r"\vec j", GREEN)
+ text7[1].set_color(PINK)
+ text7[4].set_color(PURPLE)
+ text7[-2].set_color(ORANGE)
+ text7.scale(0.6)
+
+ text8 = TextMobject(r"$\vec r'(t)$", r"=",r"$\vec x'(t)$", r"$\vec i$", r"+", r"$\vec y'(t)$", r"$\vec j$")
+ text8.set_color_by_tex(r"\vec i", BLUE)
+ text8.set_color_by_tex(r"\vec j", GREEN)
+ text8[0].set_color(PINK)
+ text8[2].set_color(PURPLE)
+ text8[5].set_color(ORANGE)
+ text8.scale(0.7)
+
+ text9 = TextMobject(r"$\frac{d \vec r}{dt}$", r"=", r"$\frac{d \vec x}{dt}$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}$", r"$\vec j$")
+ text9.set_color_by_tex(r"\vec i", BLUE)
+ text9.set_color_by_tex(r"\vec j", GREEN)
+ text9[0].set_color(PINK)
+ text9[2].set_color(PURPLE)
+ text9[5].set_color(ORANGE)
+ text9.scale(0.7)
+
+
+ text10 = TextMobject(r"$d \vec r$", r"=", r"$\frac{d \vec x}{dt}dt$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}dt$", r"$\vec j$")
+ text10.set_color_by_tex(r"\vec i", BLUE)
+ text10.set_color_by_tex(r"\vec j", GREEN)
+ text10[0].set_color(PINK)
+ text10[2].set_color(PURPLE)
+ text10[5].set_color(ORANGE)
+ text10.scale(0.7)
+
+ text11 = TextMobject(r"$d \vec r$", r"=", r"$x'(t)dt$", r"$\vec i$", r"+", r"$y'(t)dt$", r"$\vec j$")
+ text11.set_color_by_tex(r"\vec i", BLUE)
+ text11.set_color_by_tex(r"\vec j", GREEN)
+ text11[0].set_color(PINK)
+ text11[2].set_color(PURPLE)
+ text11[5].set_color(ORANGE)
+ text11.scale(0.7)
+
+ text12 = TextMobject(r"$d \vec r$", r"=", r"$dx$", r"$\vec i$", r"+", r"$dy$", r"$\vec j$")
+ text12.set_color_by_tex(r"\vec i", BLUE)
+ text12.set_color_by_tex(r"\vec j", GREEN)
+ text12[0].set_color(PINK)
+ text12[2].set_color(PURPLE)
+ text12[5].set_color(ORANGE)
+ text12.scale(0.7)
+
+
+ text1.move_to(1*UP+2.7*RIGHT)
+ text2.move_to(1*UP+2.7*RIGHT)
+ text3.move_to(1*UP+2.7*RIGHT)
+ text4.move_to(1*UP+2.7*RIGHT)
+ text5.move_to(1*UP+2.7*RIGHT)
+ text6.move_to(1*UP+2.7*RIGHT)
+ text7.move_to(1*UP+2.5*RIGHT)
+ text8.move_to(1*UP+2.7*RIGHT)
+ text9.move_to(1*UP+2.7*RIGHT)
+ text10.move_to(1*UP+2.7*RIGHT)
+ text11.move_to(1*UP+2.7*RIGHT)
+ text12.move_to(1*UP+2.7*RIGHT)
+
+ brace1 = Brace(text7[0:2], DOWN, buff = SMALL_BUFF)
+ brace2 = Brace(text7[3:6], UP, buff = SMALL_BUFF)
+ brace3 = Brace(text7[7:], DOWN, buff = SMALL_BUFF)
+ t1 = brace1.get_text(r"$\vec r'(t)$")
+ t1.set_color(PINK)
+
+ t2 = brace2.get_text(r"$\vec x'(t)$")
+ t2.set_color(PURPLE)
+
+ t3 = brace3.get_text(r"$\vec y'(t)$")
+ t3.set_color(ORANGE)
+
+
+ self.play(Write(text1))
+ self.play(Transform(text1, text2))
+ self.wait(1)
+
+ self.play(Transform(text1, text3))
+ self.wait(1)
+
+ self.play(Transform(text1, text4))
+ self.wait(1)
+
+ self.play(Transform(text1, text5))
+ self.wait(1)
+
+ self.play(Transform(text1, text6))
+ self.wait(1)
+
+ self.play(Transform(text1, text7))
+ self.wait(1)
+
+ self.play(
+ GrowFromCenter(brace1),
+ FadeIn(t1),
+ )
+ self.wait()
+ self.play(
+ ReplacementTransform(brace1.copy(),brace2),
+ ReplacementTransform(t1.copy(),t2)
+ )
+ self.wait()
+ self.play(
+ ReplacementTransform(brace2.copy(),brace3),
+ ReplacementTransform(t2.copy(),t3)
+ )
+ self.wait()
+
+ self.play(FadeOut(brace1), FadeOut(t1), FadeOut(brace2), FadeOut(t2), FadeOut(brace3), FadeOut(t3),)
+ self.wait()
+
+ self.play(Transform(text1, text8))
+ self.wait(1)
+
+ self.play(Transform(text1, text9))
+ self.wait(1)
+
+ self.play(Transform(text1, text10))
+ self.wait(1)
+
+ self.play(Transform(text1, text11))
+ self.wait(1)
+
+ self.play(Transform(text1, text12))
+ self.wait(1)
+
+
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
new file mode 100644
index 0000000..7322e47
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
@@ -0,0 +1,69 @@
+from manimlib.imports import *
+
+class Examples(GraphScene):
+ def construct(self):
+
+ rectangle = Rectangle(height = 3, width = 4, color = GREEN)
+ square = Square(side_length = 5, color = PURPLE)
+ circle = Circle(radius = 2, color = PINK)
+ radius = Line(ORIGIN,2*RIGHT)
+
+ radius.set_color(RED)
+
+ rectangle_area_func = TextMobject(r"$Area = f(Length, Breadth)$")
+ rectangle_area_func.scale(0.6)
+ square_area_func = TextMobject(r"$Area = f(Length)$")
+ circle_area_func = TextMobject(r"$Area = f(r)$")
+
+
+ rectangle_area = TextMobject(r"$Area = Length \times Breadth$")
+ rectangle_area.scale(0.6)
+ square_area = TextMobject(r"$Area = Length^2$")
+ circle_area = TextMobject(r"$Area = \pi r^2$")
+
+ braces_rect1 = Brace(rectangle, LEFT)
+ eq_text1 = braces_rect1.get_text("Length")
+ braces_rect2 = Brace(rectangle, UP)
+ eq_text2 = braces_rect2.get_text("Breadth")
+
+ braces_square = Brace(square, LEFT)
+ braces_square_text = braces_square.get_text("Length")
+
+ radius_text = TextMobject("r")
+ radius_text.next_to(radius,UP)
+
+
+
+ self.play(ShowCreation(rectangle))
+ self.wait(1)
+ self.play(GrowFromCenter(braces_rect1),Write(eq_text1),GrowFromCenter(braces_rect2),Write(eq_text2))
+ self.wait(1)
+ self.play(Write(rectangle_area_func))
+ self.wait(1)
+ self.play(Transform(rectangle_area_func, rectangle_area))
+ self.wait(1)
+ self.play(FadeOut(braces_rect1),FadeOut(eq_text1),FadeOut(braces_rect2),FadeOut(eq_text2),FadeOut(rectangle_area_func))
+
+
+ self.play(Transform(rectangle, square))
+ self.wait(1)
+ self.play(GrowFromCenter(braces_square),Write(braces_square_text))
+ self.wait(1)
+ self.play(Write(square_area_func))
+ self.wait(1)
+ self.play(Transform(square_area_func, square_area))
+ self.wait(1)
+ self.play(FadeOut(braces_square),FadeOut(braces_square_text),FadeOut(square_area_func))
+
+
+ self.play(Transform(rectangle, circle))
+ self.wait(1)
+ self.play(ShowCreation(radius),Write(radius_text))
+ self.wait(1)
+ self.play(FadeOut(radius_text),FadeOut(radius))
+ self.wait(1)
+ self.play(Write(circle_area_func))
+ self.wait(1)
+ self.play(Transform(circle_area_func, circle_area))
+ self.wait(1)
+ self.play(FadeOut(circle_area_func))
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
new file mode 100644
index 0000000..baf08b1
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
@@ -0,0 +1,42 @@
+from manimlib.imports import *
+
+class Sphere(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ sphere = ParametricSurface(
+ lambda u, v: np.array([
+ np.sin(u)*np.cos(v),
+ np.sin(u)*np.sin(v),
+ np.cos(u)
+ ]),u_min=0,u_max=PI,v_min=0,v_max=2*PI,checkerboard_colors=[RED_D, RED_E],
+ resolution=(15, 32)).scale(2)
+
+
+
+ #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+
+ text3d = TextMobject(r"$f(x,y) \rightarrow Point(x,y,z)$")
+ text3d1 = TextMobject(r"$f(x,y) \rightarrow Point(x,y, 1 - x^2 - y^2)$")
+ self.add_fixed_in_frame_mobjects(text3d)
+ text3d.scale(0.7)
+ text3d1.scale(0.7)
+ text3d.to_corner(UL)
+ text3d1.to_corner(UL)
+ text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ text3d1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(text3d))
+ self.wait(1)
+
+ self.play(Transform(text3d,text3d1))
+ self.add_fixed_in_frame_mobjects(text3d1)
+ self.play(FadeOut(text3d))
+
+
+ self.set_camera_orientation(phi=75 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+
+ self.add(axes)
+ self.play(Write(sphere))
+ self.wait(5)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
new file mode 100644
index 0000000..4bfcf21
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
@@ -0,0 +1,80 @@
+from manimlib.imports import *
+
+class MultivariableFunc(Scene):
+ def construct(self):
+
+ topic = TextMobject("Multivariable Functions")
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ topic.scale(2)
+
+ self.play(Write(topic))
+ self.wait(1)
+ self.play(FadeOut(topic))
+
+
+ circle = Circle()
+ circle.scale(3)
+
+ eqn1 = TextMobject(r"f(x,y) = $x^2y$")
+ eqn1.set_color(YELLOW)
+
+
+
+ number1 = TextMobject("(2,1)")
+ number1.move_to(3*UP+ 3*LEFT)
+ number1.scale(1.2)
+ number1.set_color(GREEN)
+
+ output1 = TextMobject("4")
+ output1.scale(1.5)
+ output1.set_color(BLUE)
+
+ eqn1_1 = TextMobject(r"f(2,1) = $2^2(1)$")
+ eqn1_1.set_color(YELLOW)
+
+
+ self.play(ShowCreation(circle),Write(eqn1))
+ self.wait(1)
+ self.play(ApplyMethod(number1.move_to, 0.6*LEFT))
+ self.play(FadeOut(number1))
+ self.play(Transform(eqn1, eqn1_1))
+ self.wait(1)
+ self.play(ApplyMethod(output1.move_to, 3*DOWN+4*RIGHT))
+ self.wait(1)
+ self.play(FadeOut(output1))
+
+
+ eqn2 = TextMobject(r"f(x,y,z) = $x^2y+2yz$")
+ eqn2.set_color(YELLOW)
+
+ number2 = TextMobject("(2,1,3)")
+ number2.move_to(3*UP+ 3*LEFT)
+ number2.scale(1.2)
+ number2.set_color(GREEN)
+
+ output2 = TextMobject("8")
+ output2.scale(1.5)
+ output2.set_color(BLUE)
+
+ eqn2_1 = TextMobject(r"f(2,1,3) = $2^2(1) + 2(1)(3)$")
+ eqn2_1.set_color(YELLOW)
+
+ eqn2_2 = TextMobject(r"f(2,1,3) = $2 + 6$")
+ eqn2_2.set_color(YELLOW)
+
+
+
+ self.play(FadeOut(eqn1))
+ self.play(Write(eqn2))
+
+ self.wait(1)
+ self.play(ApplyMethod(number2.move_to, 1.2*LEFT))
+ self.play(FadeOut(number2))
+ self.play(Transform(eqn2, eqn2_1))
+ self.wait(1)
+ self.play(Transform(eqn2, eqn2_2))
+ self.wait(1)
+ self.play(ApplyMethod(output2.move_to, 3*DOWN+4*RIGHT))
+ self.wait(1)
+ self.play(FadeOut(output2),FadeOut(eqn2),FadeOut(circle))
+ self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
new file mode 100644
index 0000000..06e225e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class SineVectors(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 10,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN+4*LEFT,
+ #"x_labeled_nums": list(range(-5, 6)),
+ #"y_labeled_nums": list(range(0, 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(animate = True)
+
+
+ sine1 = self.get_graph(lambda x : np.sin(x), x_min = 0, x_max = 1.575, color = GREEN)
+
+ point1 = Dot().shift(self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT)
+ point1_lab = TextMobject(r"$t = (\frac{\pi}{2})$")
+ point1_lab.scale(0.7)
+ point1_lab.next_to(point1, UP)
+
+ vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT, buff=0.1, color = RED)
+ vector1_lab = TextMobject(r"$r(\frac{\pi}{2})$", color = RED)
+ vector1_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.5*YTD*UP)
+
+ self.play(GrowArrow(vector1),Write(vector1_lab))
+ self.play(ShowCreation(point1), Write(point1_lab))
+ self.play(ShowCreation(sine1))
+ self.wait(1)
+
+
+ sine2 = self.get_graph(lambda x : np.sin(x), x_min = 1.575, x_max = 3.15, color = GREEN)
+
+ point2 = Dot().shift(self.graph_origin+3.15*XTD*RIGHT)
+ point2_lab = TextMobject(r"$t = (\pi)$")
+ point2_lab.scale(0.7)
+ point2_lab.next_to(point2, UP+RIGHT)
+
+ vector2 = Arrow(self.graph_origin, self.graph_origin+3.15*XTD*RIGHT, buff=0.1, color = BLUE)
+ vector2_lab = TextMobject(r"$r(\pi)$", color = BLUE)
+ vector2_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.15*YTD*UP)
+
+ self.play(GrowArrow(vector2),Write(vector2_lab))
+ self.play(ShowCreation(point2), Write(point2_lab))
+ self.play(ShowCreation(sine2))
+ self.wait(1)
+
+
+ sine3 = self.get_graph(lambda x : np.sin(x), x_min = 3.15, x_max = 4.725, color = GREEN)
+
+ point3 = Dot().shift(self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT)
+ point3_lab = TextMobject(r"$t = (\frac{3\pi}{2})$")
+ point3_lab.scale(0.7)
+ point3_lab.next_to(point3, DOWN)
+
+ vector3 = Arrow(self.graph_origin, self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT, buff=0.1, color = YELLOW_C)
+ vector3_lab = TextMobject(r"$r(\frac{3\pi}{2})$", color = YELLOW_C)
+ vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 0.7*YTD*DOWN)
+
+ self.play(GrowArrow(vector3),Write(vector3_lab))
+ self.play(ShowCreation(point3), Write(point3_lab))
+ self.play(ShowCreation(sine3))
+ self.wait(1)
+
+
+ sine4 = self.get_graph(lambda x : np.sin(x), x_min = 4.725, x_max = 6.3, color = GREEN)
+
+ point4 = Dot().shift(self.graph_origin+6.3*XTD*RIGHT)
+ point4_lab = TextMobject(r"$t = (2\pi)$")
+ point4_lab.scale(0.7)
+ point4_lab.next_to(point4, UP+RIGHT)
+
+ vector4 = Arrow(self.graph_origin, self.graph_origin+6.3*XTD*RIGHT, buff=0.1, color = PURPLE)
+ vector4_lab = TextMobject(r"$r(2\pi)$", color = PURPLE)
+ vector4_lab.move_to(self.graph_origin+4.5*XTD*RIGHT+ 0.15*YTD*DOWN)
+
+ self.play(GrowArrow(vector4),Write(vector4_lab))
+ self.play(ShowCreation(point4), Write(point4_lab))
+ self.play(ShowCreation(sine4))
+ self.wait(3)
+
--
cgit
From bb9e15afaafe5305d27e3037530831e33a3e254c Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:45:13 +0530
Subject: Added Limits and Continuity Folder
---
.../limit_approach_point.py | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
new file mode 100644
index 0000000..57d1d45
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
@@ -0,0 +1,66 @@
+from manimlib.imports import *
+
+class Limit(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "graph_origin": ORIGIN + 3* DOWN+4*LEFT,
+ "x_labeled_nums": list(range(0, 4)),
+ "y_labeled_nums": list(range(0, 5)),
+ }
+ def construct(self):
+ topic = TextMobject("Different paths of approach to limit point")
+ topic.scale(1.5)
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(topic))
+ self.wait(1)
+ self.play(FadeOut(topic))
+
+
+
+ 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(animate = True)
+
+ y_x = self.get_graph(lambda x : x, x_min = -1, x_max = 4)
+ y_x_lab = self.get_graph_label(y_x, label = r"y = x")
+
+ y_xsquare = self.get_graph(lambda x : x*x, x_min = -1, x_max = 4)
+ y_xsquare_lab = self.get_graph_label(y_xsquare, label = r"y = x^2")
+
+ y_1 = self.get_graph(lambda x : 1, x_min = -1, x_max = 4)
+ y_1_lab = self.get_graph_label(y_1, label = r"y = 1")
+
+ y_2minusx = self.get_graph(lambda x : 2 - x, x_min = -1, x_max = 4, color = RED)
+ y_2minusx_lab = self.get_graph_label(y_2minusx, label = r"y = 2 - x")
+
+ limit_point = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
+ limit_point_lab = TextMobject(r"(1,1)")
+ limit_point_lab.next_to(limit_point, DOWN)
+
+ self.play(ShowCreation(limit_point))
+ self.play(Write(limit_point_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_x))
+ self.play(Write(y_x_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_xsquare))
+ self.play(Write(y_xsquare_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_1))
+ self.play(Write(y_1_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_2minusx))
+ self.play(Write(y_2minusx_lab))
+ self.wait(1)
+
+
+
+
\ No newline at end of file
--
cgit
From ab5f5c2d48794961ace6716a1b0405c24495e9e1 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:46:00 +0530
Subject: Delete scalar_function_level_curves.mp4
---
.../Scalar Functions/scalar_function_level_curves.mp4 | Bin 726339 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4 b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4
deleted file mode 100644
index 6af2670..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves.mp4 and /dev/null differ
--
cgit
From d5f72078a32cd6196b34778ccc4ae8cf299b2d22 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:46:10 +0530
Subject: Delete scalar_function_level_curves2.mp4
---
.../scalar_function_level_curves2.mp4 | Bin 2088849 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4 b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4
deleted file mode 100644
index b21ae25..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_level_curves2.mp4 and /dev/null differ
--
cgit
From b705303069a5fd14c5f8bde6fdb7d42454103782 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:46:53 +0530
Subject: Add files via upload
---
.../Scalar Functions/Scalar_Function_Quiz.pdf | Bin 0 -> 87455 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf
new file mode 100644
index 0000000..6d94a2c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf differ
--
cgit
From 00cf8aab6f8073ad4fd14cffabf90bf55a70d5eb Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:47:31 +0530
Subject: Add files via upload
---
.../Multivariable_Functions_Quiz.pdf | Bin 0 -> 109631 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf
new file mode 100644
index 0000000..7895843
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf differ
--
cgit
From fed36d85239ebc725f0eabc50c67394ea32f203f Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 17:55:13 +0530
Subject: Updated Readme.md
---
.../multivariable-functions-and-paritial-derivatives/README.md | 9 +++++++++
1 file changed, 9 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
index e69de29..b50200d 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
@@ -0,0 +1,9 @@
+# Contributer: Nishan Poojary
+Github Account : nishanpoojary
+
+## Sub-Topics Covered:
++ Scalar Functions
++ Multivariable Functions
++ Limits and continuity of Multivariable Function
++ Partial Derivatives
++ Directonal Derivatives
--
cgit
From cf3141c14d109277d01fe7fcbd4bee5171390d1a Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 18:02:15 +0530
Subject: Add files via upload
---
.../Scalar Functions/gifs/domain_range.gif | Bin 0 -> 19837 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif
new file mode 100644
index 0000000..e1ae6a5
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif differ
--
cgit
From aaf94154db0bcb3d2c6559c1a3f608e851ab3747 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 18:15:40 +0530
Subject: Added gifs to Scalar Function Folder
---
.../Scalar Functions/gifs/domain_range.gif | Bin 19837 -> 74879 bytes
.../gifs/scalar_function_application.gif | Bin 0 -> 225144 bytes
.../gifs/scalar_function_level_curves.gif | Bin 0 -> 245384 bytes
.../gifs/scalar_function_level_curves2.gif | Bin 0 -> 893426 bytes
.../gifs/scalar_function_neural_nets.gif | Bin 0 -> 95828 bytes
.../gifs/scalar_function_parabola_example.gif | Bin 0 -> 905534 bytes
6 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif
index e1ae6a5..d0351e5 100644
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif
new file mode 100644
index 0000000..831ec8e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif
new file mode 100644
index 0000000..2df2fde
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif
new file mode 100644
index 0000000..724c27d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif
new file mode 100644
index 0000000..9d24688
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif
new file mode 100644
index 0000000..3fdecf4
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif differ
--
cgit
From c19477e961fe4ccfaf2c4bc3cd4707fbddcddc33 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 18:25:01 +0530
Subject: Added gifs to Multivariable Function Folder
---
.../gifs/multivariable_func_derivative_vectorvf.gif | Bin 0 -> 117597 bytes
.../gifs/multivariable_func_examples.gif | Bin 0 -> 57945 bytes
.../gifs/multivariable_func_plot_sphere.gif | Bin 0 -> 198324 bytes
.../gifs/multivariable_func_respresntation.gif | Bin 0 -> 73055 bytes
.../gifs/multivariable_func_vectorvf_sine.gif | Bin 0 -> 29814 bytes
5 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif
new file mode 100644
index 0000000..a94de90
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif
new file mode 100644
index 0000000..11f66f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif
new file mode 100644
index 0000000..ad7582c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif
new file mode 100644
index 0000000..a173bda
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif
new file mode 100644
index 0000000..4f6b931
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif differ
--
cgit
From 4e99a40878f7ba614e0c693ba22de3ae21b1ffd7 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Sun, 24 May 2020 18:27:40 +0530
Subject: Added gif to Limits and Continuity Folder
---
.../gifs/limit_approach_point.gif | Bin 0 -> 47411 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif
new file mode 100644
index 0000000..830b6f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif differ
--
cgit
From c36313078049f0f94fca6229b434bffefd323e95 Mon Sep 17 00:00:00 2001
From: Padmapriya Mohan
Date: Mon, 25 May 2020 16:33:03 +0530
Subject: Code for subtopic one: Gradient
---
.../gradient/file1_missile-example.py | 37 +++++++
.../gradient/file2_gradient-example-1.py | 43 ++++++++
.../gradient/file3_gradient-example-2.py | 39 +++++++
.../gradient/file4-multidimensional-gradient.py | 113 +++++++++++++++++++++
.../gradient/file4_gradient-example-3.py | 40 ++++++++
.../gradient/file5_steepest-ascent-analogy.py | 71 +++++++++++++
.../gradient/file6-maximum.py | 39 +++++++
7 files changed, 382 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file1_missile-example.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file2_gradient-example-1.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4-multidimensional-gradient.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4_gradient-example-3.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file5_steepest-ascent-analogy.py
create mode 100644 FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file6-maximum.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file1_missile-example.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file1_missile-example.py
new file mode 100644
index 0000000..cd754cd
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file1_missile-example.py
@@ -0,0 +1,37 @@
+from manimlib.imports import *
+import numpy as np
+
+
+def function(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ np.sin(x-y),
+ np.exp(y),
+ 0
+ ])
+def func(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ -2*x,
+ y,
+ 0])
+
+class Missiles(GraphScene):
+ def construct(self):
+
+ field = VectorField(function)
+ #path = ParametricFunction(lambda x: -2*x)
+
+ dot = SVGMobject("miss").move_to(DL).scale(0.09).set_color(WHITE).rotate(PI/4 + PI)
+ path = ArcBetweenPoints(dot.get_center(), UP+0.2*LEFT)
+
+ self.play(FadeIn(field))
+ self.wait()
+ self.play(FadeIn(dot))
+ self.wait()
+ self.play(MoveAlongPath(dot, path))
+ self.play(ApplyMethod(dot.rotate, PI/4), rate = 0.2)
+ self.play(ApplyMethod(dot.move_to, 3.5*UP), rate = 0.3)
+ #self.play(ApplyMethod(dot.move_to, 3.5*UP))
+ #self.add_fixed_in_frame_mobjects(text_field)
+ self.wait()
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file2_gradient-example-1.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file2_gradient-example-1.py
new file mode 100644
index 0000000..7a95867
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file2_gradient-example-1.py
@@ -0,0 +1,43 @@
+from manimlib.imports import *
+import numpy as np
+
+
+def function(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ 0.4*x,
+ 0.4*y,
+ 0.4*np.cos(np.sqrt((x**2)+(y**2))
+ )])
+
+class ThreeDVector(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+ self.set_camera_orientation(phi=45*DEGREES,theta=60*DEGREES,distance=40)
+ self.begin_ambient_camera_rotation(rate=0.5)
+
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ 0.4*u,
+ 0.4*v,
+ 0.4*np.cos(np.sqrt((u**2)+(v**2)))
+ ]),u_min=-20,u_max=20, v_min=-10,v_max=10).set_color(BLUE_E).fade(0.7)
+
+ text_func = TexMobject(r"\textbf{Input: Function}").shift(4.4*LEFT+3.3*UP).scale(0.7)
+ text_field = TexMobject(r"\textbf{Output: Vector Field}").shift(4.4*LEFT+3.3*UP).scale(0.7)
+
+
+ self.add_fixed_in_frame_mobjects(text_func)
+ self.play(ShowCreation(surface))
+ self.wait(3)
+
+ field = VectorField(function)
+ self.play(FadeIn(field), FadeOut(text_func))
+ self.add_fixed_in_frame_mobjects(text_field)
+ self.wait()
+ self.play(FadeOut(surface))
+ self.wait()
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py
new file mode 100644
index 0000000..e37581d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file3_gradient-example-2.py
@@ -0,0 +1,39 @@
+from manimlib.imports import *
+import numpy as np
+
+
+def function(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ x,
+ y,
+ x**2 - y**2
+ ])
+
+class ThreeDVector_three(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+ self.set_camera_orientation(phi=45*DEGREES,theta=85*DEGREES,distance=40)
+ self.begin_ambient_camera_rotation(rate=0.5)
+
+ surface = ParametricSurface(
+ lambda x, y: np.array([
+ x,
+ y,
+ x**2 - y**2
+ ]),u_min=-2,u_max=2, v_min=-1.5,v_max=1.5).set_color(BLUE_E).fade(0.7).scale(1.7)
+
+ text_func = TexMobject(r"\textbf{Input: Function}").shift(4.4*LEFT+3.3*UP).scale(0.7)
+ text_field = TexMobject(r"\textbf{Output: Vector Field}").shift(4.4*LEFT+3.3*UP).scale(0.7)
+
+ self.add_fixed_in_frame_mobjects(text_func)
+ self.play(ShowCreation(surface))
+ self.wait(3)
+
+ field = VectorField(function)
+ self.play(FadeIn(field), FadeOut(text_func))
+ self.add_fixed_in_frame_mobjects(text_field)
+ self.wait()
+ self.play(FadeOut(surface))
+ self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4-multidimensional-gradient.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4-multidimensional-gradient.py
new file mode 100644
index 0000000..e9c8fd0
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4-multidimensional-gradient.py
@@ -0,0 +1,113 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class Hills(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes(
+ number_line_config={
+ "color": GREEN,
+ "include_tip": False,
+ "exclude_zero_from_default_numbers": True,
+ }
+ )
+ self.add(axes)
+
+ self.set_camera_orientation(phi=45*DEGREES,theta=45*DEGREES,distance=40)
+ #self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait()
+
+ cylinder_1 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 7*u*v/np.exp(u**2+v**2)
+ ]),u_min=-3,u_max=3, v_min=-1,v_max=-0.95).set_color(YELLOW_E).rotate(PI/2).shift(LEFT).fade(0.5)
+ cylinder = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 7*u*v/np.exp(u**2+v**2)
+ ]),u_min=-3,u_max=3, v_min=-3,v_max=3).set_color(YELLOW_E).rotate(PI/2).shift(LEFT).fade(0.5)
+ text_one = TexMobject(r"\textrm{Single variable functions slope up and down}")
+ #name = TexMobject(r"\textrm{PROBE}").next_to(text_one, DOWN, buff = SMALL_BUFF).scale(0.7)
+ text_one_a = TexMobject(r"\textrm{Position }", r" \rightarrow ").next_to(text_one, DOWN, buff = SMALL_BUFF)
+ probe = Sphere(radius = 0.2).next_to(text_one_a, RIGHT).set_color(BLUE_E)
+ text_one_b = TexMobject(r" \rightarrow ", r"\textrm{ slope }").next_to(probe, RIGHT, buff = SMALL_BUFF)
+ name = TextMobject("PROBE").next_to(probe, DOWN, buff = SMALL_BUFF).scale(0.5)
+ text = VGroup(text_one, text_one_a, probe, text_one_b, name).to_edge(UP+1.5*LEFT).scale(0.5)
+
+ text_two = TexMobject(r"\textrm{Multivariable functions slope in infinitely many directions!}")
+ #name_two = TexMobject(r"\textrm{PROBE2.0}").next_to(text_two, DOWN, buff = SMALL_BUFF).scale(0.7)
+ text_two_a = TexMobject(r"\textrm{Position, Direction }", r" \rightarrow ").next_to(text_two, DOWN, buff = SMALL_BUFF)
+ probe_two = Sphere(radius = 0.2).next_to(text_two_a, RIGHT).set_color(PURPLE_E)
+ text_two_b = TexMobject(r" \rightarrow ", r"\textrm{ slope }").next_to(probe_two, RIGHT, buff = SMALL_BUFF)
+ name_two = TextMobject("PROBE2.0").next_to(probe_two, DOWN, buff = SMALL_BUFF).scale(0.5)
+ two = VGroup(text_two, text_two_a, probe_two, text_two_b, name_two).to_edge(UP+LEFT).scale(0.5).shift(3.5*LEFT)
+
+
+
+
+
+
+ self.play(ShowCreation(cylinder_1))
+ self.wait()
+ self.add_fixed_in_frame_mobjects(text)
+ self.wait(3.5)
+ self.play(FadeOut(text))
+ self.play(ReplacementTransform(cylinder_1, cylinder))
+ self.wait()
+ self.add_fixed_in_frame_mobjects(two)
+ self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait(4)
+
+class OneMore(ThreeDScene, GraphScene):
+ def setup(self):
+ GraphScene.setup(self)
+ ThreeDScene.setup(self)
+
+ def construct(self):
+ axes = ThreeDAxes(
+ number_line_config={
+ "color": GREEN,
+ "include_tip": False,
+ "exclude_zero_from_default_numbers": True,
+ }
+ )
+ self.add(axes)
+
+ self.set_camera_orientation(phi=90*DEGREES,theta=90*DEGREES,distance=40)
+ #self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait()
+
+ shape = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2 - u**2 - v**2,
+ ]),u_min=0,u_max =0.01, v_min=-2,v_max=2).set_color(GREEN_C)
+
+ shape_A = ParametricSurface(
+ lambda u, v: np.array([
+ 0*u,
+ 0,
+ v,
+ ]),u_min=-2,u_max = 2, v_min=-2,v_max=2).set_color(GREEN_C)
+
+
+ '''
+ path = self.get_graph(lambda u,v: np.array([
+ u,
+ 2 - u**2 - v**2]), u_min=-2,u_max=2, v_min=-2,v_max=2)
+ location = np.array([-2,-2, -2]) #location: Point
+ dot = Dot(location)
+ '''
+
+ self.play(ShowCreation(shape))
+ self.add(shape_A)
+ #self.play(ShowCreation(path), ShowCreation(dot))
+ #self.play(MoveAlongPath(dot, path))
+ #self.wait(3)
+ self.play(ApplyMethod(shape.fade, 0.5))
+ self.begin_ambient_camera_rotation(rate = 0.5)
+ self.wait(3)
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4_gradient-example-3.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4_gradient-example-3.py
new file mode 100644
index 0000000..7c0ef54
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file4_gradient-example-3.py
@@ -0,0 +1,40 @@
+from manimlib.imports import *
+import numpy as np
+
+
+def function(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ x,
+ y,
+ 1/np.cos(x*y),
+ ])
+
+class ThreeDVector(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+ self.set_camera_orientation(phi=45*DEGREES,theta=45*DEGREES,distance=40)
+ self.begin_ambient_camera_rotation(rate=0.5)
+
+ surface = ParametricSurface(
+ lambda x, y: np.array([
+ x,
+ y,
+ 1/np.cos(x*y),
+ ]),u_min=-1.15,u_max=1.15, v_min=-1.15,v_max=1.15).set_color(BLUE_E).fade(0.7).scale(1.4)
+
+ text_func = TexMobject(r"\textbf{Input: Function}").shift(4.4*LEFT+3.3*UP).scale(0.3)
+ text_field = TexMobject(r"\textbf{Output: Vector Field}").shift(4.4*LEFT+3.3*UP).scale(0.7)
+
+ self.add_fixed_in_frame_mobjects(text_func)
+ self.play(ShowCreation(surface))
+ self.wait(2)
+
+ field = VectorField(function).scale(0.7)
+ self.play(FadeIn(field), FadeOut(text_func))
+ self.add_fixed_in_frame_mobjects(text_field)
+ self.wait()
+
+ self.play(FadeOut(surface))
+ self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file5_steepest-ascent-analogy.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file5_steepest-ascent-analogy.py
new file mode 100644
index 0000000..803ea4a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file5_steepest-ascent-analogy.py
@@ -0,0 +1,71 @@
+from manimlib.imports import *
+import numpy as np
+
+class Rules(ThreeDScene):
+
+ def setup(self):
+ ThreeDScene.setup(self)
+
+ def construct(self):
+ axes = ThreeDAxes()#.scale(0.8)#.shift(2*RIGHT, 2*DOWN)
+ self.set_camera_orientation(phi=PI/3 + 10*DEGREES,theta=-PI/4 + 25*DEGREES,distance=60)
+
+ plane = Polygon(np.array([4,4,0]), np.array([4, -4, 0]), np.array([-4, -4, 0]), np.array([-4, 4, 0]), color = BLACK, fill_color = YELLOW_E, fill_opacity = 0.3)
+
+ path_one = Line(start = ORIGIN, end = np.array([3, 0, 0])).set_color(BLUE_E)
+ path_one_text = TexMobject(r"\textrm{3 steps in the x direction}").shift(2*DOWN+3.5*LEFT).scale(0.5).set_color(BLUE_E)
+ path_two_text = TexMobject(r"\textrm{2 steps in the y direction}").next_to(path_one_text, DOWN, buff = SMALL_BUFF).scale(0.5).set_color(GREEN_C)
+ path_three_text = TexMobject(r"\textrm{2 steps in the z direction}").next_to(path_two_text, DOWN, buff = SMALL_BUFF).scale(0.5).set_color(PURPLE_E)
+ obj = TextMobject("Objective: ", "Maximise points for a set number of steps").scale(0.8).to_edge(UP+LEFT)
+
+ steps = TexMobject(r"\textrm{Total steps = 7}").to_edge(RIGHT, buff = LARGE_BUFF).set_color(YELLOW_E).scale(0.7).shift(1*UP)
+ points_one = TexMobject(r"\textrm{Total points = 13}").next_to(steps, DOWN, buff = SMALL_BUFF).scale(0.7).set_color(YELLOW_E)
+ question = TexMobject(r"\textrm{Change direction to score more points?}").shift(2*DOWN+2.5*RIGHT).scale(0.9)
+
+ path_two = Line(start = np.array([3, 0, 0]), end = np.array([3, 2, 0])).set_color(GREEN_C)
+ path_three = Line(start = np.array([3, 2, 0]), end = np.array([3, 2, 2])).set_color(PURPLE_E)
+ total = Line(start = np.array([0, 0, 0]), end = np.array([3, 2, 2])).set_color(YELLOW_E)
+ projection_total = Line(start = np.array([0, 0, 0]), end = np.array([3, 2, 0]))
+ paths = VGroup(path_one, path_two, path_three, path_one_text, path_two_text, path_three_text)
+
+ total_one = VGroup(total, projection_total)
+
+ total_two = Line(start = np.array([0, 0, 0]), end = np.array([4, 1, 2])).set_color(YELLOW_E)
+ projection_total_two = Line(start = np.array([0, 0, 0]), end = np.array([4, 1, 0]))
+ points_two = TexMobject(r"\textrm{Total points = 12}").next_to(steps, DOWN, buff = SMALL_BUFF).scale(0.7).set_color(YELLOW_E)
+
+ total_three = Line(start = np.array([0, 0, 0]), end = np.array([1, 4, 2])).set_color(YELLOW_E)
+ projection_total_three = Line(start = np.array([0, 0, 0]), end = np.array([1, 4, 0]))
+ points_three = TexMobject(r"\textrm{Total points = 15}").next_to(steps, DOWN, buff = SMALL_BUFF).scale(0.7).set_color(YELLOW_E)
+
+ everything = VGroup(axes, plane, path_one, path_two, path_three, total, projection_total, total_two, projection_total_two, total_three, projection_total_three)
+ everything.scale(0.7).shift(2*LEFT+1*DOWN)
+ self.add_fixed_in_frame_mobjects(obj)
+ self.add(axes, plane)
+ self.wait()
+ self.add_fixed_in_frame_mobjects(path_one_text)
+ self.play(ShowCreation(path_one))
+ self.wait()
+ self.add_fixed_in_frame_mobjects(path_two_text)
+ self.play(ShowCreation(path_two))
+ self.wait()
+ self.add_fixed_in_frame_mobjects(path_three_text)
+ self.play(ShowCreation(path_three))
+ self.add_fixed_in_frame_mobjects(steps, points_one)
+ self.wait()
+ self.play(ShowCreation(total))
+ self.play(ReplacementTransform(total.copy(), projection_total))
+ self.wait()
+ self.play(FadeOut(paths))
+ self.add_fixed_in_frame_mobjects(question)
+ self.wait()
+ self.play(ReplacementTransform(total, total_two), ReplacementTransform(projection_total, projection_total_two))
+ self.play(FadeOut(points_one))
+ self.add_fixed_in_frame_mobjects(points_two)
+ self.wait()
+ self.play(ReplacementTransform(total_two, total_three), ReplacementTransform(projection_total_two, projection_total_three))
+ self.play(FadeOut(points_two))
+ self.add_fixed_in_frame_mobjects(points_three)
+ self.wait()
+
+
diff --git a/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file6-maximum.py b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file6-maximum.py
new file mode 100644
index 0000000..255a0eb
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/div-curl-grad-and-all-that/gradient/file6-maximum.py
@@ -0,0 +1,39 @@
+from manimlib.imports import *
+import numpy as np
+
+
+def function(coordinate):
+ x,y = coordinate[:2]
+ return np.array([
+ x,
+ y,
+ 2 - x**2 - y**2
+ ])
+
+class ThreeDVector_one(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=45*DEGREES,distance=40)
+ self.begin_ambient_camera_rotation(rate=0.5)
+
+ surface = ParametricSurface(
+ lambda x, y: np.array([
+ x,
+ y,
+ 2 - x**2 - y**2
+ ]),u_min=-2,u_max=2, v_min=-2,v_max=2).set_color(RED_E).fade(0.7)
+
+ probe = Sphere(radius = 0.2).set_color(PURPLE_E)
+ probe_one = Sphere(radius = 0.1).set_color(PURPLE_E).move_to(np.array([0,0,2.1]))
+ text_one_b = TexMobject(r" \textrm{ reads 0 at local maximum }").next_to(probe, RIGHT, buff = SMALL_BUFF)
+ name = TextMobject("PROBE2.0 ").next_to(probe, DOWN, buff = SMALL_BUFF).scale(0.5)
+ text = VGroup(probe, text_one_b, name).to_edge(1.5*UP+0.5*LEFT).scale(0.5)
+
+
+ self.play(ShowCreation(surface))
+ self.add(probe_one)
+ field = VectorField(function).scale(0.8)
+ self.play(FadeIn(field))
+ self.add_fixed_in_frame_mobjects(text)
+ self.wait(3)
--
cgit
From 72005384492cc35cc6e4dfb8f9237485eebd49d6 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Mon, 25 May 2020 20:33:23 +0530
Subject: gif files added
---
.../double-integrals/YlimitXdependent.gif | Bin 1170435 -> 0 bytes
.../double-integrals/area_Under_func.gif | Bin 0 -> 1277788 bytes
.../double-integrals/elementary_area.gif | Bin 0 -> 547368 bytes
.../double-integrals/non_rect_region.gif | Bin 0 -> 2529511 bytes
.../double-integrals/surface.gif | Bin 0 -> 3365528 bytes
.../double-integrals/y_limit_dependent_on_x.gif | Bin 0 -> 1170435 bytes
6 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif
deleted file mode 100644
index a2bfd9d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/YlimitXdependent.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif
new file mode 100644
index 0000000..223218b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif
new file mode 100644
index 0000000..5c9ac03
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif
new file mode 100644
index 0000000..c8e7c8c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif
new file mode 100644
index 0000000..ae23a7b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif
new file mode 100644
index 0000000..a2bfd9d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif differ
--
cgit
From 7e916bc0e70e242451a49896286e4928693c2663 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Mon, 25 May 2020 20:51:21 +0530
Subject: added fubini's theorem
---
.../fubini's_theorem/SurfacesAnimation.gif | Bin 0 -> 3752052 bytes
.../fubini's_theorem/surface1.py | 230 +++++++++++++++++++++
2 files changed, 230 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif
new file mode 100644
index 0000000..8c9fa0a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
new file mode 100644
index 0000000..3d04bf4
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
@@ -0,0 +1,230 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "z_min": -4,
+ "z_max": 4,
+ "a":0 ,"b": 4, "c":0 , "d":4,
+ "axes_shift":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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 5*(x**2-y**2)/((1e-4+x**2+y**2)**2)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(#distance=10,
+ phi=80 * DEGREES,
+ theta=35 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=\dfrac{x^2-y^2}{(x^2+y^2)^2}$").set_color(BLUE)
+ fn_text.to_corner(UR,buff=1)
+ self.add_fixed_in_frame_mobjects(fn_text)
+
+ R=TextMobject("R").set_color(BLACK).scale(2).rotate(180*DEGREES , OUT)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.6,
+ fill_color=BLUE_E,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.play(Write(surface))
+
+ self.get_lines()
+ self.wait(4)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.x_max,
+ "u_max": axes.x_min,
+ "v_min": axes.y_max,
+ "v_max": axes.y_min,
+ "resolution": (10,10),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"YELLOW"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=PINK,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a+.4),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c+.4),
+ ("d", 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, LEFT)
+ 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
+
+
--
cgit
From 14402f0e37ee1a58e81f7e322f8b6d06e7cb797a Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Mon, 25 May 2020 21:03:23 +0530
Subject: renamed surafce1 gif in fubini's theorem
---
.../fubini's_theorem/SurfacesAnimation.gif | Bin 3752052 -> 0 bytes
.../fubini's_theorem/surface1.gif | Bin 0 -> 3752052 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif
deleted file mode 100644
index 8c9fa0a..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/SurfacesAnimation.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif
new file mode 100644
index 0000000..8c9fa0a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif differ
--
cgit
From eca0130163ba0a8520d9a28565456078ee963e69 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Mon, 25 May 2020 21:18:37 +0530
Subject: added tag to surface1.py in fubini
---
.../integrals-of-multivariable-functions/fubini's_theorem/surface1.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
index 3d04bf4..bad318f 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
@@ -227,4 +227,6 @@ class SurfacesAnimation(ThreeDScene):
axis.add(axis.label)
return axes
-
+#uploaded by Somnath Pandit.FSF2020_Fubini's Theorem
+
+
--
cgit
From 0a079186b73414908e7af909bb950dacb7ebac07 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 26 May 2020 03:08:39 +0530
Subject: added surface2
---
.../fubini's_theorem/surface1.py | 2 +-
.../fubini's_theorem/surface2.gif | Bin 0 -> 2556585 bytes
.../fubini's_theorem/surface2.py | 286 +++++++++++++++++++++
3 files changed, 287 insertions(+), 1 deletion(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
index bad318f..a590a53 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
@@ -227,6 +227,6 @@ class SurfacesAnimation(ThreeDScene):
axis.add(axis.label)
return axes
-#uploaded by Somnath Pandit.FSF2020_Fubini's Theorem
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif
new file mode 100644
index 0000000..ac13f21
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
new file mode 100644
index 0000000..c998f3b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
@@ -0,0 +1,286 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "z_min": -2,
+ "z_max": 4,
+ "a":0 ,"b": 4, "c":0 , "d":4,
+ "axes_shift":IN+2*LEFT+2*DOWN,
+ "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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: x*y/4
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(
+ distance=30,
+ phi=75 * DEGREES,
+ theta=20 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=xy$").set_color(BLUE).scale(1.5)
+ fn_text.to_corner(UR,buff=2)
+ self.add_fixed_in_frame_mobjects(fn_text)
+
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=.5,
+ fill_color=BLUE_E,
+ stroke_width=0.2,
+ stroke_color=WHITE,
+ )
+ #get boundary curves
+ c1=self.get_curve(
+ self.axes, lambda x: x**2/4
+ )
+ c1_label=TextMobject("$y=x^2$").next_to(c1,IN+OUT).shift(DOWN+RIGHT)
+ c1_label.rotate(PI)
+ c1_group=VGroup(c1,c1_label).set_color(ORANGE)
+
+ c2=self.get_curve(
+ self.axes, lambda x: x
+ ).set_color(PINK)
+ c2_label=TextMobject("$y=x$").next_to(c2,IN+OUT)
+ c2_label.rotate(PI/2,about_point=(c2_label.get_corner(UL)))
+ c2_group=VGroup(c2,c2_label).set_color(YELLOW_E)
+
+
+
+ self.add(c1,c2,c1_label,c2_label)
+
+ self.begin_ambient_camera_rotation(rate=0.4)
+ self.get_region(self.axes,c1,c2)
+ self.play(Write(surface))
+ self.get_lines()
+ self.wait(1)
+ self.stop_ambient_camera_rotation()
+ self.move_camera(
+ distance=20,
+ phi=10 * DEGREES,
+ theta=80 * DEGREES,
+ run_time=2.5
+ )
+ self.wait(2)
+
+
+
+ def get_curve(self,axes, func, **kwargs):
+ config = {
+ "t_min": axes.x_min,
+ "t_max": axes.x_max,
+ }
+ config.update(kwargs)
+ return ParametricFunction(
+ lambda x : axes.c2p(
+ x, func(x),0
+ ),
+ **config
+ )
+
+ def get_region(self,axes,curve1,curve2,**kwargs):
+ x_vals=np.arange(axes.x_min,axes.x_max,.1)
+ c1_points=[curve1.get_point_from_function(x) for x in x_vals]
+ c2_points=[curve2.get_point_from_function(x) for x in x_vals]
+ c2_points.reverse()
+ points=c1_points+c2_points
+ region=Polygon(*points,
+ stroke_width=0,
+ fill_color=PINK,
+ fill_opacity=.5
+ )
+ R=TextMobject("R").set_color(PINK).scale(2).rotate(180*DEGREES , OUT)
+ R.move_to(region,IN+RIGHT)
+
+ self.play(Write(region))
+ self.add(R)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.x_max,
+ "u_max": axes.x_min,
+ "v_min": axes.y_max,
+ "v_max": axes.y_min,
+ "resolution": (10,10),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"YELLOW"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ 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)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=PINK,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ # axes.add(axes.input_plane)
+ 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, LEFT)
+ 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_Fubini's_Theorem
+
+
--
cgit
From b6de789e96b766e899195c8915017f76698380fa Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:17:06 +0530
Subject: Delete scalar_function_parabola_example.py
---
.../scalar_function_parabola_example.py | 35 ----------------------
1 file changed, 35 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
deleted file mode 100644
index 74dc063..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_parabola_example.py
+++ /dev/null
@@ -1,35 +0,0 @@
-from manimlib.imports import *
-
-class Parabola(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes() # creates a 3D Axis
-
- paraboloid = ParametricSurface(
- lambda u, v: np.array([
- 2*np.cosh(u)*np.cos(v),
- 2*np.cosh(u)*np.sin(v),
- 2*np.sinh(u)
- ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],
- resolution=(15, 32))
-
- text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", "z = f(x,y)")
- self.add_fixed_in_frame_mobjects(text3d)
- text3d[0].move_to(4*LEFT+2*DOWN)
- text3d[1].next_to(text3d[0], DOWN)
- text3d[0].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- text3d[1].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE)
-
- #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
- self.move_camera(phi=110* DEGREES,theta=45*DEGREES)
- self.add(axes)
- self.play(ShowCreation(paraboloid))
- self.play(Write(text3d[0]))
- self.play(Write(text3d[1]))
- self.begin_ambient_camera_rotation(rate=0.2)
- self.wait(3)
- self.move_camera(phi=0 * DEGREES,theta=180*DEGREES,run_time=3)
- self.wait(3)
- self.move_camera(phi=110* DEGREES,theta=90*DEGREES,run_time=3)
- self.wait(3)
-
-
\ No newline at end of file
--
cgit
From d6f6012145d9b00b1a4b9c569e7dcffb92eb9d56 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:17:16 +0530
Subject: Delete scalar_function_neural_nets.py
---
.../scalar_function_neural_nets.py | 177 ---------------------
1 file changed, 177 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
deleted file mode 100644
index eb6bf45..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_neural_nets.py
+++ /dev/null
@@ -1,177 +0,0 @@
-from manimlib.imports import *
-
-class SigmoidFunc(GraphScene):
- CONFIG = {
- "x_min": -4,
- "x_max": 4,
- "y_min": -1,
- "y_max": 1,
- "graph_origin": ORIGIN + 0.8*DOWN,
- "x_labeled_nums": list(range(-4, 5)),
- "y_labeled_nums": list(range(-1, 2)),
- "y_axis_height": 4.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)
-
- topic = TextMobject("Sigmoid Function")
- topic.move_to(3.2*UP)
- topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
-
- self.setup_axes(animate = True)
- sigmoid_func = self.get_graph(lambda x : (1/(1 + np.exp(-x))), x_min = -4, x_max = 4)
- sigmoid_lab = self.get_graph_label(sigmoid_func, label = r"\frac{1}{1 + e^{-z}}")
-
-
-
-
- self.play(ShowCreation(sigmoid_func),Write(sigmoid_lab))
- self.play(Write(topic))
- self.wait(2)
- self.play(FadeOut(sigmoid_func), FadeOut(sigmoid_lab))
- self.wait(1)
-
-
-
-class NeuralNet(GraphScene):
- def construct(self):
-
- sigmoid_exp = TextMobject(r"g(z) = g($\theta^T$ X) = $\frac{1}{1 + e^{-z}}$")
- sigmoid_exp.move_to(3*UP + 4*LEFT)
- sigmoid_exp.scale(0.8)
- sigmoid_exp.set_color(BLUE)
- sigmoid_exp1 = TextMobject(r"Predict: 'y = 1'",r"When g(z) $\geq$ 0.5, z $\geq$ 0, $\theta^T$ X $\geq$ 0")
- sigmoid_exp2 = TextMobject(r"Predict: 'y = 0'", r"When g(z) $\leq$ 0.5, z $\leq$ 0, $\theta^T$ X $\leq$ 0")
- sigmoid_exp1.scale(0.5)
- sigmoid_exp2.scale(0.5)
- sigmoid_exp1.set_color(PURPLE)
- sigmoid_exp2.set_color(PURPLE)
-
- sigmoid_exp1[0].next_to(sigmoid_exp, 1.5*DOWN)
- sigmoid_exp1[1].next_to(sigmoid_exp1[0], DOWN)
- sigmoid_exp2[0].next_to(sigmoid_exp1[1], 1.5*DOWN)
- sigmoid_exp2[1].next_to(sigmoid_exp2[0], DOWN)
-
-
- self.play(Write(sigmoid_exp))
- self.play(Write(sigmoid_exp1[0]), Write(sigmoid_exp1[1]))
- self.play(Write(sigmoid_exp2[0]), Write(sigmoid_exp2[1]))
- self.wait(2)
-
-
- neuron1 = Circle()
- neuron1.set_fill(YELLOW_A, opacity = 0.5)
-
- neuron2 = Circle()
- neuron2.set_fill(ORANGE, opacity = 0.5)
-
- neuron3 = Circle()
- neuron3.set_fill(GREEN_E, opacity = 0.5)
-
- neuron1.move_to(2*UP+RIGHT)
- neuron2.move_to(2*DOWN+RIGHT)
- neuron3.move_to(4*RIGHT)
-
- arrow1 = Arrow(neuron1.get_right(),neuron3.get_left(),buff=0.1)
- arrow1.set_color(RED)
- arrow2 = Arrow(neuron2.get_right(),neuron3.get_left(),buff=0.1)
- arrow2.set_color(RED)
-
- arrow3 = Arrow(neuron3.get_right(),7*RIGHT,buff=0.1)
- arrow3.set_color(RED)
-
-
- sign1 = TextMobject("+1")
- sign1.move_to(2*UP+RIGHT)
- sign1.scale(2)
- sign2 = TextMobject(r"$x_1$")
- sign2.move_to(2*DOWN+RIGHT)
- sign2.scale(2)
- sign3 = TextMobject(r"$h_{\theta}(x)$")
- sign3.move_to(6*RIGHT+0.4*DOWN)
- sign3.scale(0.7)
- sign4 = TextMobject(r"$= g(10 - 20x_1)$")
- sign4.next_to(sign3,DOWN)
- sign4.scale(0.5)
- sign5 = TextMobject(r"$= g(10 - 20x_1)$")
- sign5.next_to(sign3,DOWN)
- sign5.scale(0.5)
- sign6 = TextMobject(r"$= g(10 - 20x_1)$")
- sign6.next_to(sign3,DOWN)
- sign6.scale(0.5)
-
-
- weight1 = TextMobject("10")
- weight1.next_to(arrow1,UP)
- weight2 = TextMobject("-20")
- weight2.next_to(arrow2,DOWN)
-
- gate = TextMobject("NOT GATE")
- gate.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- gate.scale(1.5)
- gate.move_to(3*RIGHT+3.5*UP)
-
-
-
- truth_table = TextMobject(r"\begin{displaymath}\begin{array}{|c|c|} x & y\\ \hline 1 & 0 \\0 & 1 \\\end{array}\end{displaymath}")
- truth_table.next_to(sigmoid_exp2[1], 3*DOWN)
-
- values = TextMobject("1", "0")
- values.scale(2)
-
- sign4_trans1 = TextMobject(r"$= g(10 - 20(1))$")
- sign4_trans2 = TextMobject(r"$= g(10 - 20(0))$")
- sign4_trans1.next_to(sign3,DOWN)
- sign4_trans2.next_to(sign3,DOWN)
- sign4_trans1.scale(0.5)
- sign4_trans2.scale(0.5)
-
-
-
- output1 = TextMobject("y = 0")
- output2 = TextMobject("y = 1")
- output1.next_to(sign4,DOWN)
- output2.next_to(sign4,DOWN)
- output1.scale(1.5)
- output2.scale(1.5)
-
-
-
- self.play(ShowCreation(neuron1),ShowCreation(neuron2))
- self.play(ShowCreation(neuron3))
- self.play(ShowCreation(sign1),ShowCreation(sign2))
- self.wait(1)
-
- self.play(GrowArrow(arrow1))
- self.play(GrowArrow(arrow2))
- self.play(ShowCreation(weight1),ShowCreation(weight2))
-
-
-
- self.play(GrowArrow(arrow3))
- self.play(Write(sign3),Write(sign4))
-
- self.play(Write(gate))
- self.play(ShowCreation(truth_table))
-
- self.play(ApplyMethod(values[0].move_to, 2*DOWN+RIGHT))
- self.play(FadeOut(values[0]))
- self.play(Transform(sign4,sign4_trans1))
- self.play(Write(output1))
- self.wait(1)
- self.play(FadeOut(output1))
- self.play(Transform(sign4, sign5))
-
-
- self.play(ApplyMethod(values[1].move_to, 2*DOWN+RIGHT))
- self.play(FadeOut(values[1]))
- self.play(Transform(sign4,sign4_trans2))
- self.play(Write(output2))
- self.wait(1)
- self.play(FadeOut(output2))
- self.play(Transform(sign4, sign6))
-
- self.wait(2)
-
-
--
cgit
From 8bbc08351b26bff772c5a7b3e17aec3ee0d3392e Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:17:24 +0530
Subject: Delete scalar_function_domain_range.py
---
.../scalar_function_domain_range.py | 132 ---------------------
1 file changed, 132 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
deleted file mode 100644
index 9b1ca7b..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_domain_range.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# Plotting Graphs
-from manimlib.imports import *
-
-class PlotGraphs(GraphScene):
- CONFIG = {
- "x_min": -5,
- "x_max": 5,
- "y_min": 0,
- "y_max": 4,
- "graph_origin": ORIGIN + 2.5* DOWN,
- "x_labeled_nums": list(range(-5, 6)),
- "y_labeled_nums": list(range(0, 5)),
- }
- def construct(self):
-
- topic = TextMobject("Domain and Range")
- topic.scale(2)
- topic.set_color(YELLOW)
- self.play(Write(topic))
- self.play(FadeOut(topic))
- self.wait(1)
-
-
- 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(animate = True)
-
- graphobj = self.get_graph(lambda x : np.sqrt(x + 4), x_min = -4, x_max = 5)
- graph_lab = self.get_graph_label(graphobj, label = r"\sqrt{x + 4}")
-
-
- rangeline1 = Arrow(self.graph_origin+2.2*YTD*UP+5*XTD*LEFT, self.graph_origin+4.1*YTD*UP+5*XTD*LEFT)
- rangeline2 = Arrow(self.graph_origin+1.7*YTD*UP+5*XTD*LEFT, self.graph_origin+5*XTD*LEFT)
- rangeline1.set_color(RED)
- rangeline2.set_color(RED)
-
- rangeMsg = TextMobject(r"Range: $y \geq 0$")
- rangeMsg.move_to(self.graph_origin+2*YTD*UP+5*XTD*LEFT)
- rangeMsg.scale(0.5)
- rangeMsg.set_color(YELLOW)
-
- domainline1 = Line(self.graph_origin+0.6*YTD*DOWN+1.2*XTD*LEFT, self.graph_origin+0.6*YTD*DOWN + 4*XTD*LEFT)
- domainline2 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.1*XTD*RIGHT, self.graph_origin+0.6*YTD*DOWN + 5.3*XTD*RIGHT)
- domainline1.set_color(PINK)
- domainline2.set_color(PINK)
-
- domainMsg = TextMobject(r"Domain: $x \geq -4$")
- domainMsg.move_to(self.graph_origin+0.6*YTD*DOWN)
- domainMsg.scale(0.5)
- domainMsg.set_color(GREEN)
-
-
-
-
- self.play(ShowCreation(graphobj))
- self.play(ShowCreation(graph_lab))
- self.wait(1)
- self.play(GrowArrow(rangeline1))
- self.play(GrowArrow(rangeline2))
- self.play(Write(rangeMsg))
- self.wait(1)
- self.play(GrowArrow(domainline1))
- self.play(GrowArrow(domainline2))
- self.play(Write(domainMsg))
- self.wait(3)
-
- self.wait(2)
-
-
-
-
-class PlotSineGraphs(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -1,
- "y_max": 1,
- "graph_origin": ORIGIN,
- "x_labeled_nums": list(range(-8, 9)),
- "y_labeled_nums": list(range(-1, 2)),
- }
- 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(animate = True)
-
- sineobj = self.get_graph(lambda x : np.sin(x), x_min = -7, x_max = 8)
- sine_lab = self.get_graph_label(sineobj, label = "\\sin(x)")
-
-
- rangeline1 = Line(8*XTD*LEFT,1*YTD*UP+8*XTD*LEFT)
- rangeline2 = Line(8*XTD*LEFT,1*YTD*DOWN+8*XTD*LEFT)
- rangeline1.set_color(RED)
- rangeline2.set_color(RED)
-
- rangeMsg = TextMobject(r"Range: $-1 \leq y \leq 1$")
- rangeMsg.move_to(1.1*YTD*UP+8.5*XTD*LEFT)
- rangeMsg.scale(0.5)
- rangeMsg.set_color(YELLOW)
-
-
- domainline1 = Arrow(1.1*YTD*DOWN+2*XTD*LEFT, 1.1*YTD*DOWN + 8.5*XTD*LEFT)
- domainline2 = Arrow(1.1*YTD*DOWN+2*XTD*RIGHT, 1.1*YTD*DOWN + 8.5*XTD*RIGHT)
- domainline1.set_color(PINK)
- domainline2.set_color(PINK)
-
- domainMsg = TextMobject(r"Domain: $[-\infty, \infty]$")
- domainMsg.move_to(1.1*YTD*DOWN)
- domainMsg.scale(0.5)
- domainMsg.set_color(GREEN)
-
-
-
- self.play(ShowCreation(sineobj))
- self.play(ShowCreation(sine_lab))
- self.wait(1)
- self.play(GrowArrow(rangeline1))
- self.play(GrowArrow(rangeline2))
- self.play(Write(rangeMsg))
- self.wait(1)
- self.play(GrowArrow(domainline1))
- self.play(GrowArrow(domainline2))
- self.play(Write(domainMsg))
- self.wait(3)
-
-
-
\ No newline at end of file
--
cgit
From 54f1ced7c719db38c5f0801a097e360c459d1637 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:17:32 +0530
Subject: Delete scalar_function_application.py
---
.../scalar_function_application.py | 129 ---------------------
1 file changed, 129 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
deleted file mode 100644
index 56b3e53..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/scalar_function_application.py
+++ /dev/null
@@ -1,129 +0,0 @@
-from manimlib.imports import *
-
-class ScalarApplication(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes() # creates a 3D Axis
-
- cube = Cube()
- cube.set_fill(YELLOW_E, opacity = 0.1)
- cube.scale(2)
- self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
- self.play(ShowCreation(cube),ShowCreation(axes))
-
- dot = Sphere()
- dot.scale(0.1)
- dot.move_to(np.array([1,0.5,1]))
- dot.set_fill(RED)
-
- #dot = Dot(np.array([1,0.5,1]), color = RED)
- temp_func = TextMobject("T(x,y,z)")
- temp_func.next_to(dot,RIGHT)
- temp_func.set_color(RED)
- temp_func_trans = TextMobject("T(1,0.5,1)")
- temp_func_trans.next_to(dot,RIGHT)
- temp_func_trans.set_color(RED)
- temp = TextMobject(r"$36 ^\circ$")
- temp.next_to(dot,RIGHT)
- temp.set_color(RED_E)
-
-
- self.play(ShowCreation(dot))
- self.play(ShowCreation(temp_func))
- self.play(Transform(temp_func, temp_func_trans))
- self.wait(1)
- self.play(Transform(temp_func, temp))
-
-
-
-
- dot1 = Sphere()
- dot1.scale(0.1)
- dot1.move_to(np.array([-1,-0.8,-1.5]))
- dot1.set_fill(BLUE_E)
- #dot1 = Dot(np.array([-1,-0.8,-1.5]), color = BLUE)
- temp_func1 = TextMobject("T(x,y,z)")
- temp_func1.next_to(dot1,LEFT)
- temp_func1.set_color(BLUE)
- temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
- temp_func_trans1.next_to(dot1,LEFT)
- temp_func_trans1.set_color(BLUE)
- temp1 = TextMobject(r"$24 ^\circ$")
- temp1.next_to(dot1,LEFT)
- temp1.set_color(BLUE)
-
- self.play(ShowCreation(dot1))
- self.play(ShowCreation(temp_func1))
- self.play(Transform(temp_func1, temp_func_trans1))
- self.wait(1)
- self.play(Transform(temp_func1, temp1))
-
- self.play(FadeOut(temp_func))
- self.play(FadeOut(temp_func1))
-
-
- self.move_camera(phi=80* DEGREES,theta=45*DEGREES,run_time=3)
-
- self.begin_ambient_camera_rotation(rate=0.2)
- self.wait(4)
- self.stop_ambient_camera_rotation()
- self.wait(2)
-
-
-
-
-class AddTempScale(Scene):
- def construct(self):
- temp_scale = ImageMobject("tempscale.png")
- temp_scale.scale(4)
- temp_scale.move_to(2*RIGHT)
- self.play(ShowCreation(temp_scale))
-
-
- temp_func = TextMobject("T(x,y,z)")
- temp_func.move_to(3*UP +2*LEFT)
- temp_func.set_color(RED)
- temp_func_trans = TextMobject("T(1,0.5,1)")
- temp_func_trans.move_to(3*UP +2*LEFT)
- temp_func_trans.set_color(RED)
- temp = TextMobject(r"$36 ^\circ$")
- temp.set_color(RED)
- temp.move_to(3*UP +2*LEFT)
- temp.scale(0.7)
-
- self.play(ShowCreation(temp_func))
- self.play(Transform(temp_func, temp_func_trans))
- self.wait(1)
- self.play(Transform(temp_func, temp))
- self.play(ApplyMethod(temp_func.move_to, 1.8*UP +1.8*RIGHT))
-
-
- temp_func1 = TextMobject("T(x,y,z)")
- temp_func1.move_to(2*UP +2*LEFT)
- temp_func1.set_color(BLUE)
- temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
- temp_func_trans1.move_to(2*UP +2*LEFT)
- temp_func_trans1.set_color(BLUE)
- temp1 = TextMobject(r"$24 ^\circ$")
- temp1.set_color(BLUE)
- temp1.move_to(2*UP +2*LEFT)
- temp1.scale(0.7)
-
- self.play(ShowCreation(temp_func1))
- self.play(Transform(temp_func1, temp_func_trans1))
- self.wait(1)
- self.play(Transform(temp_func1, temp1))
- self.play(ApplyMethod(temp_func1.move_to, 0.6*UP +1.8*RIGHT))
-
-
-
- transtext = TextMobject("Scalar Function Transform:")
- transtext.set_color(GREEN)
- transtext1 = TextMobject(r"$\mathbb{R}^3 \rightarrow \mathbb{R}$")
- transtext1.set_color(YELLOW_E)
- transtext.move_to(3*UP +3*LEFT)
- transtext1.next_to(transtext,DOWN)
- self.play(Write(transtext))
- self.play(Write(transtext1))
- self.wait(2)
-
-
--
cgit
From 58ddbb958fc1ac480567f2350ecbdecc63a3fd95 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:17:40 +0530
Subject: Delete Scalar_Function_Quiz.pdf
---
.../Scalar Functions/Scalar_Function_Quiz.pdf | Bin 87455 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf
deleted file mode 100644
index 6d94a2c..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/Scalar_Function_Quiz.pdf and /dev/null differ
--
cgit
From 3aa621d1008073c3c49a33b1bffedb6e9983fd03 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:04 +0530
Subject: Delete scalar_function_parabola_example.gif
---
.../gifs/scalar_function_parabola_example.gif | Bin 905534 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif
deleted file mode 100644
index 3fdecf4..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_parabola_example.gif and /dev/null differ
--
cgit
From dd9043d91bbbf2b0cf6b5a4a632a671cb8a2d929 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:13 +0530
Subject: Delete scalar_function_neural_nets.gif
---
.../gifs/scalar_function_neural_nets.gif | Bin 95828 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif
deleted file mode 100644
index 9d24688..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_neural_nets.gif and /dev/null differ
--
cgit
From c622a0175e0a017cb05fb7af8d130f882fa83ae2 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:21 +0530
Subject: Delete scalar_function_level_curves2.gif
---
.../gifs/scalar_function_level_curves2.gif | Bin 893426 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif
deleted file mode 100644
index 724c27d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves2.gif and /dev/null differ
--
cgit
From 18313c23484ba13001b2d149f1702173ed7a8140 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:30 +0530
Subject: Delete scalar_function_level_curves.gif
---
.../gifs/scalar_function_level_curves.gif | Bin 245384 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif
deleted file mode 100644
index 2df2fde..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_level_curves.gif and /dev/null differ
--
cgit
From 1a9c20fd31274791c8a8d493a1e0a8d93e1ee9a1 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:40 +0530
Subject: Delete scalar_function_application.gif
---
.../gifs/scalar_function_application.gif | Bin 225144 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif
deleted file mode 100644
index 831ec8e..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/scalar_function_application.gif and /dev/null differ
--
cgit
From 7e4f501a3873b76a6c14586fb6f14f210243a67b Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:18:49 +0530
Subject: Delete domain_range.gif
---
.../Scalar Functions/gifs/domain_range.gif | Bin 74879 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif
deleted file mode 100644
index d0351e5..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Scalar Functions/gifs/domain_range.gif and /dev/null differ
--
cgit
From 80dd36e43b3f884b7b352af7e0cebb9cb5275452 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:07 +0530
Subject: Delete multivariable_func_vectorvf_sine.py
---
.../multivariable_func_vectorvf_sine.py | 91 ----------------------
1 file changed, 91 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
deleted file mode 100644
index 06e225e..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_vectorvf_sine.py
+++ /dev/null
@@ -1,91 +0,0 @@
-from manimlib.imports import *
-
-class SineVectors(GraphScene):
- CONFIG = {
- "x_min": 0,
- "x_max": 10,
- "y_min": -1,
- "y_max": 1,
- "graph_origin": ORIGIN+4*LEFT,
- #"x_labeled_nums": list(range(-5, 6)),
- #"y_labeled_nums": list(range(0, 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(animate = True)
-
-
- sine1 = self.get_graph(lambda x : np.sin(x), x_min = 0, x_max = 1.575, color = GREEN)
-
- point1 = Dot().shift(self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT)
- point1_lab = TextMobject(r"$t = (\frac{\pi}{2})$")
- point1_lab.scale(0.7)
- point1_lab.next_to(point1, UP)
-
- vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT, buff=0.1, color = RED)
- vector1_lab = TextMobject(r"$r(\frac{\pi}{2})$", color = RED)
- vector1_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.5*YTD*UP)
-
- self.play(GrowArrow(vector1),Write(vector1_lab))
- self.play(ShowCreation(point1), Write(point1_lab))
- self.play(ShowCreation(sine1))
- self.wait(1)
-
-
- sine2 = self.get_graph(lambda x : np.sin(x), x_min = 1.575, x_max = 3.15, color = GREEN)
-
- point2 = Dot().shift(self.graph_origin+3.15*XTD*RIGHT)
- point2_lab = TextMobject(r"$t = (\pi)$")
- point2_lab.scale(0.7)
- point2_lab.next_to(point2, UP+RIGHT)
-
- vector2 = Arrow(self.graph_origin, self.graph_origin+3.15*XTD*RIGHT, buff=0.1, color = BLUE)
- vector2_lab = TextMobject(r"$r(\pi)$", color = BLUE)
- vector2_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.15*YTD*UP)
-
- self.play(GrowArrow(vector2),Write(vector2_lab))
- self.play(ShowCreation(point2), Write(point2_lab))
- self.play(ShowCreation(sine2))
- self.wait(1)
-
-
- sine3 = self.get_graph(lambda x : np.sin(x), x_min = 3.15, x_max = 4.725, color = GREEN)
-
- point3 = Dot().shift(self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT)
- point3_lab = TextMobject(r"$t = (\frac{3\pi}{2})$")
- point3_lab.scale(0.7)
- point3_lab.next_to(point3, DOWN)
-
- vector3 = Arrow(self.graph_origin, self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT, buff=0.1, color = YELLOW_C)
- vector3_lab = TextMobject(r"$r(\frac{3\pi}{2})$", color = YELLOW_C)
- vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 0.7*YTD*DOWN)
-
- self.play(GrowArrow(vector3),Write(vector3_lab))
- self.play(ShowCreation(point3), Write(point3_lab))
- self.play(ShowCreation(sine3))
- self.wait(1)
-
-
- sine4 = self.get_graph(lambda x : np.sin(x), x_min = 4.725, x_max = 6.3, color = GREEN)
-
- point4 = Dot().shift(self.graph_origin+6.3*XTD*RIGHT)
- point4_lab = TextMobject(r"$t = (2\pi)$")
- point4_lab.scale(0.7)
- point4_lab.next_to(point4, UP+RIGHT)
-
- vector4 = Arrow(self.graph_origin, self.graph_origin+6.3*XTD*RIGHT, buff=0.1, color = PURPLE)
- vector4_lab = TextMobject(r"$r(2\pi)$", color = PURPLE)
- vector4_lab.move_to(self.graph_origin+4.5*XTD*RIGHT+ 0.15*YTD*DOWN)
-
- self.play(GrowArrow(vector4),Write(vector4_lab))
- self.play(ShowCreation(point4), Write(point4_lab))
- self.play(ShowCreation(sine4))
- self.wait(3)
-
--
cgit
From b1d37a71c5b9d80a9487092aaa548082929657ad Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:16 +0530
Subject: Delete multivariable_func_respresntation.py
---
.../multivariable_func_respresntation.py | 80 ----------------------
1 file changed, 80 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
deleted file mode 100644
index 4bfcf21..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_respresntation.py
+++ /dev/null
@@ -1,80 +0,0 @@
-from manimlib.imports import *
-
-class MultivariableFunc(Scene):
- def construct(self):
-
- topic = TextMobject("Multivariable Functions")
- topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- topic.scale(2)
-
- self.play(Write(topic))
- self.wait(1)
- self.play(FadeOut(topic))
-
-
- circle = Circle()
- circle.scale(3)
-
- eqn1 = TextMobject(r"f(x,y) = $x^2y$")
- eqn1.set_color(YELLOW)
-
-
-
- number1 = TextMobject("(2,1)")
- number1.move_to(3*UP+ 3*LEFT)
- number1.scale(1.2)
- number1.set_color(GREEN)
-
- output1 = TextMobject("4")
- output1.scale(1.5)
- output1.set_color(BLUE)
-
- eqn1_1 = TextMobject(r"f(2,1) = $2^2(1)$")
- eqn1_1.set_color(YELLOW)
-
-
- self.play(ShowCreation(circle),Write(eqn1))
- self.wait(1)
- self.play(ApplyMethod(number1.move_to, 0.6*LEFT))
- self.play(FadeOut(number1))
- self.play(Transform(eqn1, eqn1_1))
- self.wait(1)
- self.play(ApplyMethod(output1.move_to, 3*DOWN+4*RIGHT))
- self.wait(1)
- self.play(FadeOut(output1))
-
-
- eqn2 = TextMobject(r"f(x,y,z) = $x^2y+2yz$")
- eqn2.set_color(YELLOW)
-
- number2 = TextMobject("(2,1,3)")
- number2.move_to(3*UP+ 3*LEFT)
- number2.scale(1.2)
- number2.set_color(GREEN)
-
- output2 = TextMobject("8")
- output2.scale(1.5)
- output2.set_color(BLUE)
-
- eqn2_1 = TextMobject(r"f(2,1,3) = $2^2(1) + 2(1)(3)$")
- eqn2_1.set_color(YELLOW)
-
- eqn2_2 = TextMobject(r"f(2,1,3) = $2 + 6$")
- eqn2_2.set_color(YELLOW)
-
-
-
- self.play(FadeOut(eqn1))
- self.play(Write(eqn2))
-
- self.wait(1)
- self.play(ApplyMethod(number2.move_to, 1.2*LEFT))
- self.play(FadeOut(number2))
- self.play(Transform(eqn2, eqn2_1))
- self.wait(1)
- self.play(Transform(eqn2, eqn2_2))
- self.wait(1)
- self.play(ApplyMethod(output2.move_to, 3*DOWN+4*RIGHT))
- self.wait(1)
- self.play(FadeOut(output2),FadeOut(eqn2),FadeOut(circle))
- self.wait(2)
\ No newline at end of file
--
cgit
From 4f83639077a36f1775c3c063f0b6be1c40097247 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:24 +0530
Subject: Delete multivariable_func_plot_sphere.py
---
.../multivariable_func_plot_sphere.py | 42 ----------------------
1 file changed, 42 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
deleted file mode 100644
index baf08b1..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_plot_sphere.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from manimlib.imports import *
-
-class Sphere(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes() # creates a 3D Axis
-
- sphere = ParametricSurface(
- lambda u, v: np.array([
- np.sin(u)*np.cos(v),
- np.sin(u)*np.sin(v),
- np.cos(u)
- ]),u_min=0,u_max=PI,v_min=0,v_max=2*PI,checkerboard_colors=[RED_D, RED_E],
- resolution=(15, 32)).scale(2)
-
-
-
- #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
-
- text3d = TextMobject(r"$f(x,y) \rightarrow Point(x,y,z)$")
- text3d1 = TextMobject(r"$f(x,y) \rightarrow Point(x,y, 1 - x^2 - y^2)$")
- self.add_fixed_in_frame_mobjects(text3d)
- text3d.scale(0.7)
- text3d1.scale(0.7)
- text3d.to_corner(UL)
- text3d1.to_corner(UL)
- text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- text3d1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- self.play(Write(text3d))
- self.wait(1)
-
- self.play(Transform(text3d,text3d1))
- self.add_fixed_in_frame_mobjects(text3d1)
- self.play(FadeOut(text3d))
-
-
- self.set_camera_orientation(phi=75 * DEGREES)
- self.begin_ambient_camera_rotation(rate=0.3)
-
-
- self.add(axes)
- self.play(Write(sphere))
- self.wait(5)
\ No newline at end of file
--
cgit
From 9046a816f265c4f1e99c65a919d2d8240f4118a0 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:32 +0530
Subject: Delete multivariable_func_examples.py
---
.../multivariable_func_examples.py | 69 ----------------------
1 file changed, 69 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
deleted file mode 100644
index 7322e47..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_examples.py
+++ /dev/null
@@ -1,69 +0,0 @@
-from manimlib.imports import *
-
-class Examples(GraphScene):
- def construct(self):
-
- rectangle = Rectangle(height = 3, width = 4, color = GREEN)
- square = Square(side_length = 5, color = PURPLE)
- circle = Circle(radius = 2, color = PINK)
- radius = Line(ORIGIN,2*RIGHT)
-
- radius.set_color(RED)
-
- rectangle_area_func = TextMobject(r"$Area = f(Length, Breadth)$")
- rectangle_area_func.scale(0.6)
- square_area_func = TextMobject(r"$Area = f(Length)$")
- circle_area_func = TextMobject(r"$Area = f(r)$")
-
-
- rectangle_area = TextMobject(r"$Area = Length \times Breadth$")
- rectangle_area.scale(0.6)
- square_area = TextMobject(r"$Area = Length^2$")
- circle_area = TextMobject(r"$Area = \pi r^2$")
-
- braces_rect1 = Brace(rectangle, LEFT)
- eq_text1 = braces_rect1.get_text("Length")
- braces_rect2 = Brace(rectangle, UP)
- eq_text2 = braces_rect2.get_text("Breadth")
-
- braces_square = Brace(square, LEFT)
- braces_square_text = braces_square.get_text("Length")
-
- radius_text = TextMobject("r")
- radius_text.next_to(radius,UP)
-
-
-
- self.play(ShowCreation(rectangle))
- self.wait(1)
- self.play(GrowFromCenter(braces_rect1),Write(eq_text1),GrowFromCenter(braces_rect2),Write(eq_text2))
- self.wait(1)
- self.play(Write(rectangle_area_func))
- self.wait(1)
- self.play(Transform(rectangle_area_func, rectangle_area))
- self.wait(1)
- self.play(FadeOut(braces_rect1),FadeOut(eq_text1),FadeOut(braces_rect2),FadeOut(eq_text2),FadeOut(rectangle_area_func))
-
-
- self.play(Transform(rectangle, square))
- self.wait(1)
- self.play(GrowFromCenter(braces_square),Write(braces_square_text))
- self.wait(1)
- self.play(Write(square_area_func))
- self.wait(1)
- self.play(Transform(square_area_func, square_area))
- self.wait(1)
- self.play(FadeOut(braces_square),FadeOut(braces_square_text),FadeOut(square_area_func))
-
-
- self.play(Transform(rectangle, circle))
- self.wait(1)
- self.play(ShowCreation(radius),Write(radius_text))
- self.wait(1)
- self.play(FadeOut(radius_text),FadeOut(radius))
- self.wait(1)
- self.play(Write(circle_area_func))
- self.wait(1)
- self.play(Transform(circle_area_func, circle_area))
- self.wait(1)
- self.play(FadeOut(circle_area_func))
\ No newline at end of file
--
cgit
From ae89b51ed274c28c5351113b9a37beb0eeb0c487 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:40 +0530
Subject: Delete multivariable_func_derivative_vectorvf.py
---
.../multivariable_func_derivative_vectorvf.py | 247 ---------------------
1 file changed, 247 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
deleted file mode 100644
index 466e389..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/multivariable_func_derivative_vectorvf.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from manimlib.imports import *
-
-class Derivative(GraphScene):
- CONFIG = {
- "x_min": 0,
- "x_max": 3,
- "y_min": 0,
- "y_max": 5,
- "graph_origin": ORIGIN+6*LEFT+3*DOWN,
- "x_axis_width": 6,
- "x_labeled_nums": list(range(0, 4)),
- "y_labeled_nums": list(range(0, 6)),
- }
- 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(animate = True)
-
- graph = self.get_graph(lambda x : x*x, x_min = 0.5, x_max = 2, color = GREEN)
-
- point1 = Dot().shift(self.graph_origin+0.25*YTD*UP + 0.5*XTD*RIGHT)
- point1_lab = TextMobject(r"$t = a$")
- point1_lab.scale(0.7)
- point1_lab.next_to(point1, RIGHT)
-
- point2 = Dot().shift(self.graph_origin+2*XTD*RIGHT+4*YTD*UP)
- point2_lab = TextMobject(r"$t = b$")
- point2_lab.scale(0.7)
- point2_lab.next_to(point2, RIGHT)
-
-
- vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, buff=0.02, color = RED)
- vector1_lab = TextMobject(r"$\vec r(t)$", color = RED)
- vector1_lab.move_to(self.graph_origin+1.2*XTD*RIGHT+ 0.75*YTD*UP)
- vector1_lab.scale(0.8)
-
- vector2 = Arrow(self.graph_origin, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = YELLOW_C)
- vector2_lab = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
- vector2_lab.move_to(self.graph_origin+0.5*XTD*RIGHT+ 2*YTD*UP)
- vector2_lab.scale(0.8)
-
- vector3 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PINK)
- vector3_lab = TextMobject(r"$\vec r(t + h) - \vec r(t)$", color = PINK)
- vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 1.5*YTD*UP)
- vector3_lab.scale(0.8)
-
-
- self.play(ShowCreation(graph))
- self.play(ShowCreation(point1), Write(point1_lab))
- self.play(ShowCreation(point2), Write(point2_lab))
-
- self.play(GrowArrow(vector1),Write(vector1_lab))
- self.play(GrowArrow(vector2),Write(vector2_lab))
- self.play(GrowArrow(vector3),Write(vector3_lab))
- self.wait(1)
-
- self.display_text()
-
- self.play(ApplyMethod(vector3_lab.move_to,(self.graph_origin+2.3*XTD*RIGHT+ 2.2*YTD*UP)))
-
- vector4 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PURPLE)
- vector4_lab = TextMobject(r"$dx$", color = PURPLE)
- vector4_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 0.8*YTD*UP)
- vector4_lab.scale(0.7)
-
- vector5 = Arrow(self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = ORANGE)
- vector5_lab = TextMobject(r"$dy$", color = ORANGE)
- vector5_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 1.4*YTD*UP)
- vector5_lab.scale(0.7)
-
- self.play(GrowArrow(vector4),Write(vector4_lab))
- self.play(GrowArrow(vector5),Write(vector5_lab))
- self.wait(2)
-
-
-
- def display_text(self):
- text1 = TextMobject(r"$\vec r(t)$",r"+", r"$\vec r(t + h) - \vec r(t)$")
- text1[0].set_color(RED)
- text1[2].set_color(PINK)
- text1.scale(0.7)
-
- text2 = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
- text2.scale(0.7)
-
- text3 = TextMobject(r"$ \vec r(t + h) - \vec r(t)$", color = PINK)
- text3.scale(0.7)
-
- text4 = TextMobject(r"[", r"$x(t+h)$", r"$\vec i$", r"+", r"$y(t+h)$", r"$\vec j$", r"$] - [$", r"$x(t)$", r"$\vec i$", r"+", r"y(t)", r"$\vec j$", r"]")
- text4.set_color_by_tex(r"\vec i", BLUE)
- text4.set_color_by_tex(r"\vec j", GREEN)
- text4[1].set_color(YELLOW_C)
- text4[4].set_color(YELLOW_C)
- text4[-6].set_color(RED)
- text4[-3].set_color(RED)
- text4.scale(0.7)
-
- text5 = TextMobject(r"$[x(t+h) - x(t)]$", r"$\vec i$", r"+", r"$[y(t+h) + y(t)]$", r"$\vec j$")
- text5.set_color_by_tex(r"\vec i", BLUE)
- text5.set_color_by_tex(r"\vec j", GREEN)
- text5[0].set_color(PURPLE)
- text5[3].set_color(ORANGE)
- text5.scale(0.7)
-
- text6 = TextMobject(r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
- text6.set_color_by_tex(r"\vec i", BLUE)
- text6.set_color_by_tex(r"\vec j", GREEN)
- text6[0].set_color(PINK)
- text6[2].set_color(PURPLE)
- text6[-2].set_color(ORANGE)
- text6.scale(0.8)
-
- text7 = TextMobject(r"$\lim_{h \rightarrow 0}$", r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\lim_{h \rightarrow 0}$", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\lim_{h \rightarrow 0}$", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
- text7.set_color_by_tex(r"\vec i", BLUE)
- text7.set_color_by_tex(r"\vec j", GREEN)
- text7[1].set_color(PINK)
- text7[4].set_color(PURPLE)
- text7[-2].set_color(ORANGE)
- text7.scale(0.6)
-
- text8 = TextMobject(r"$\vec r'(t)$", r"=",r"$\vec x'(t)$", r"$\vec i$", r"+", r"$\vec y'(t)$", r"$\vec j$")
- text8.set_color_by_tex(r"\vec i", BLUE)
- text8.set_color_by_tex(r"\vec j", GREEN)
- text8[0].set_color(PINK)
- text8[2].set_color(PURPLE)
- text8[5].set_color(ORANGE)
- text8.scale(0.7)
-
- text9 = TextMobject(r"$\frac{d \vec r}{dt}$", r"=", r"$\frac{d \vec x}{dt}$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}$", r"$\vec j$")
- text9.set_color_by_tex(r"\vec i", BLUE)
- text9.set_color_by_tex(r"\vec j", GREEN)
- text9[0].set_color(PINK)
- text9[2].set_color(PURPLE)
- text9[5].set_color(ORANGE)
- text9.scale(0.7)
-
-
- text10 = TextMobject(r"$d \vec r$", r"=", r"$\frac{d \vec x}{dt}dt$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}dt$", r"$\vec j$")
- text10.set_color_by_tex(r"\vec i", BLUE)
- text10.set_color_by_tex(r"\vec j", GREEN)
- text10[0].set_color(PINK)
- text10[2].set_color(PURPLE)
- text10[5].set_color(ORANGE)
- text10.scale(0.7)
-
- text11 = TextMobject(r"$d \vec r$", r"=", r"$x'(t)dt$", r"$\vec i$", r"+", r"$y'(t)dt$", r"$\vec j$")
- text11.set_color_by_tex(r"\vec i", BLUE)
- text11.set_color_by_tex(r"\vec j", GREEN)
- text11[0].set_color(PINK)
- text11[2].set_color(PURPLE)
- text11[5].set_color(ORANGE)
- text11.scale(0.7)
-
- text12 = TextMobject(r"$d \vec r$", r"=", r"$dx$", r"$\vec i$", r"+", r"$dy$", r"$\vec j$")
- text12.set_color_by_tex(r"\vec i", BLUE)
- text12.set_color_by_tex(r"\vec j", GREEN)
- text12[0].set_color(PINK)
- text12[2].set_color(PURPLE)
- text12[5].set_color(ORANGE)
- text12.scale(0.7)
-
-
- text1.move_to(1*UP+2.7*RIGHT)
- text2.move_to(1*UP+2.7*RIGHT)
- text3.move_to(1*UP+2.7*RIGHT)
- text4.move_to(1*UP+2.7*RIGHT)
- text5.move_to(1*UP+2.7*RIGHT)
- text6.move_to(1*UP+2.7*RIGHT)
- text7.move_to(1*UP+2.5*RIGHT)
- text8.move_to(1*UP+2.7*RIGHT)
- text9.move_to(1*UP+2.7*RIGHT)
- text10.move_to(1*UP+2.7*RIGHT)
- text11.move_to(1*UP+2.7*RIGHT)
- text12.move_to(1*UP+2.7*RIGHT)
-
- brace1 = Brace(text7[0:2], DOWN, buff = SMALL_BUFF)
- brace2 = Brace(text7[3:6], UP, buff = SMALL_BUFF)
- brace3 = Brace(text7[7:], DOWN, buff = SMALL_BUFF)
- t1 = brace1.get_text(r"$\vec r'(t)$")
- t1.set_color(PINK)
-
- t2 = brace2.get_text(r"$\vec x'(t)$")
- t2.set_color(PURPLE)
-
- t3 = brace3.get_text(r"$\vec y'(t)$")
- t3.set_color(ORANGE)
-
-
- self.play(Write(text1))
- self.play(Transform(text1, text2))
- self.wait(1)
-
- self.play(Transform(text1, text3))
- self.wait(1)
-
- self.play(Transform(text1, text4))
- self.wait(1)
-
- self.play(Transform(text1, text5))
- self.wait(1)
-
- self.play(Transform(text1, text6))
- self.wait(1)
-
- self.play(Transform(text1, text7))
- self.wait(1)
-
- self.play(
- GrowFromCenter(brace1),
- FadeIn(t1),
- )
- self.wait()
- self.play(
- ReplacementTransform(brace1.copy(),brace2),
- ReplacementTransform(t1.copy(),t2)
- )
- self.wait()
- self.play(
- ReplacementTransform(brace2.copy(),brace3),
- ReplacementTransform(t2.copy(),t3)
- )
- self.wait()
-
- self.play(FadeOut(brace1), FadeOut(t1), FadeOut(brace2), FadeOut(t2), FadeOut(brace3), FadeOut(t3),)
- self.wait()
-
- self.play(Transform(text1, text8))
- self.wait(1)
-
- self.play(Transform(text1, text9))
- self.wait(1)
-
- self.play(Transform(text1, text10))
- self.wait(1)
-
- self.play(Transform(text1, text11))
- self.wait(1)
-
- self.play(Transform(text1, text12))
- self.wait(1)
-
-
-
-
-
--
cgit
From 8efa8b48786fdad5b4041239584fb561bcc6e09e Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:48 +0530
Subject: Delete Multivariable_Functions_Quiz.pdf
---
.../Multivariable_Functions_Quiz.pdf | Bin 109631 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf
deleted file mode 100644
index 7895843..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/Multivariable_Functions_Quiz.pdf and /dev/null differ
--
cgit
From 8a4169e79d266f3c1de05dc4ca4ae1455ad44733 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:19:59 +0530
Subject: Delete multivariable_func_vectorvf_sine.gif
---
.../gifs/multivariable_func_vectorvf_sine.gif | Bin 29814 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif
deleted file mode 100644
index 4f6b931..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_vectorvf_sine.gif and /dev/null differ
--
cgit
From 4634d7d86485e311656c284865b148df3eb32311 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:08 +0530
Subject: Delete multivariable_func_respresntation.gif
---
.../gifs/multivariable_func_respresntation.gif | Bin 73055 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif
deleted file mode 100644
index a173bda..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_respresntation.gif and /dev/null differ
--
cgit
From d4a743c0cd3a7213f74584e5e66af3a256c347c1 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:16 +0530
Subject: Delete multivariable_func_plot_sphere.gif
---
.../gifs/multivariable_func_plot_sphere.gif | Bin 198324 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif
deleted file mode 100644
index ad7582c..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_plot_sphere.gif and /dev/null differ
--
cgit
From 693f36507eab8073fdd5fead632139a8f2dbcf40 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:25 +0530
Subject: Delete multivariable_func_examples.gif
---
.../gifs/multivariable_func_examples.gif | Bin 57945 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif
deleted file mode 100644
index 11f66f1..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_examples.gif and /dev/null differ
--
cgit
From 9834675082d4ec9ab0b765348eb03194eb12c834 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:33 +0530
Subject: Delete multivariable_func_derivative_vectorvf.gif
---
.../gifs/multivariable_func_derivative_vectorvf.gif | Bin 117597 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif
deleted file mode 100644
index a94de90..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Multivariable Functions/gifs/multivariable_func_derivative_vectorvf.gif and /dev/null differ
--
cgit
From 5d91fddefadc72abbdfe9961cd38b48c77b60abd Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:46 +0530
Subject: Delete limit_approach_point.py
---
.../limit_approach_point.py | 66 ----------------------
1 file changed, 66 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
deleted file mode 100644
index 57d1d45..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/limit_approach_point.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from manimlib.imports import *
-
-class Limit(GraphScene):
- CONFIG = {
- "x_min": 0,
- "x_max": 4,
- "y_min": 0,
- "y_max": 4,
- "graph_origin": ORIGIN + 3* DOWN+4*LEFT,
- "x_labeled_nums": list(range(0, 4)),
- "y_labeled_nums": list(range(0, 5)),
- }
- def construct(self):
- topic = TextMobject("Different paths of approach to limit point")
- topic.scale(1.5)
- topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- self.play(Write(topic))
- self.wait(1)
- self.play(FadeOut(topic))
-
-
-
- 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(animate = True)
-
- y_x = self.get_graph(lambda x : x, x_min = -1, x_max = 4)
- y_x_lab = self.get_graph_label(y_x, label = r"y = x")
-
- y_xsquare = self.get_graph(lambda x : x*x, x_min = -1, x_max = 4)
- y_xsquare_lab = self.get_graph_label(y_xsquare, label = r"y = x^2")
-
- y_1 = self.get_graph(lambda x : 1, x_min = -1, x_max = 4)
- y_1_lab = self.get_graph_label(y_1, label = r"y = 1")
-
- y_2minusx = self.get_graph(lambda x : 2 - x, x_min = -1, x_max = 4, color = RED)
- y_2minusx_lab = self.get_graph_label(y_2minusx, label = r"y = 2 - x")
-
- limit_point = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
- limit_point_lab = TextMobject(r"(1,1)")
- limit_point_lab.next_to(limit_point, DOWN)
-
- self.play(ShowCreation(limit_point))
- self.play(Write(limit_point_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_x))
- self.play(Write(y_x_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_xsquare))
- self.play(Write(y_xsquare_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_1))
- self.play(Write(y_1_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_2minusx))
- self.play(Write(y_2minusx_lab))
- self.wait(1)
-
-
-
-
\ No newline at end of file
--
cgit
From dcf9888ff648234c364a6b0733aeadc48e855e8b Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:20:56 +0530
Subject: Delete limit_approach_point.gif
---
.../gifs/limit_approach_point.gif | Bin 47411 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif
deleted file mode 100644
index 830b6f1..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/Limits and Continuity of Multivariable Functions/gifs/limit_approach_point.gif and /dev/null differ
--
cgit
From 7741043e07cf71c0dc47a80d4cd71dbbcd2e09b8 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 26 May 2020 12:29:59 +0530
Subject: Delete example.py
---
.../Critical Points/example.py | 32 ----------------------
1 file changed, 32 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical Points/example.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/example.py b/FSF-2020/approximations-and-optimizations/Critical Points/example.py
deleted file mode 100644
index 3a41be7..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/example.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from manimlib.imports import*
-
-class ExampleAnimation(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- f_text = TextMobject("$f(x,y) = (y-x)(1-2x-3y)$").to_corner(UL)
- d = Dot(np.array([0,0,0]), color = '#800000') #---- Critical Point
- d_text = TextMobject("$(0.2,0.2)$",color = '#DC143C').scale(0.5).shift(0.2*UP) #----x = 0.2, y = 0.2
- r_text=TextMobject("Critical Point",color = '#00FFFF').shift(0.3*DOWN).scale(0.6)
-
- #----f(x,y) = (y-x)(1-2x-3y)
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (v-u)*(1-2*u-3*v)
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [PURPLE_D, PURPLE_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES)
- self.begin_ambient_camera_rotation(rate=0.5)
-
- self.add_fixed_in_frame_mobjects(f_text)
- self.wait(1)
- self.add(axes)
- self.play(Write(f),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(d_text)
- self.wait(1)
- self.add_fixed_in_frame_mobjects(r_text)
- self.wait(3)
--
cgit
From c9ca55539047853d53019ecd96e5ff2eaf88efe9 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 26 May 2020 12:30:28 +0530
Subject: Delete motivation.py
---
.../Critical Points/motivation.py | 30 ----------------------
1 file changed, 30 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical Points/motivation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py b/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py
deleted file mode 100644
index 27354ef..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from manimlib.imports import*
-
-class MotivationAnimation(Scene):
- def construct(self):
-
- r = Rectangle(height = 7,breadth = 2,color = BLUE, fill_opacity = 0.3).scale(0.6) #----metal strip
- b = Brace(r,UP)
- r_text = TextMobject("$x$ metres",color = YELLOW).shift(3*UP)
- m_text = TextMobject("Metal Strip").shift(3*DOWN)
- a = Arc(radius=2).rotate(1).shift(LEFT+0.5*UP)
- a2 = Arc(radius=2).rotate(5).shift(0.7*LEFT+0.9*UP).scale(0.2)
- START = [1,0,0]
- END = [0,3,0]
- l = Line(START,END,color = RED).shift(0.9*DOWN)
- a2_text = TextMobject("$\\theta$",color = PINK).shift(1.6*UP+0.4*RIGHT)
-
- group1 = VGroup(r_text,b,a,l,a2,a2_text)
- f_text = TextMobject("$A = f(x,\\theta)$").shift(2*DOWN)
-
- ring = Annulus(inner_radius = 0.7, outer_radius = 1, color = BLUE) #--bent metal strip
-
- self.play(Write(r))
- self.wait(1)
- self.play(ShowCreation(m_text))
- self.wait(1)
- self.play(Write(group1))
- self.wait(2)
- self.play(FadeOut(group1))
- self.wait(1)
- self.play(ReplacementTransform(r,ring),ShowCreation(f_text))
--
cgit
From 154071b94df207e7791666d5ab2ab91a11caac0c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 26 May 2020 12:30:50 +0530
Subject: Delete theorem.py
---
.../Critical Points/theorem.py | 55 ----------------------
1 file changed, 55 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical Points/theorem.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py b/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py
deleted file mode 100644
index 7c82aa9..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py
+++ /dev/null
@@ -1,55 +0,0 @@
-from manimlib.imports import*
-
-class TheoremAnimation(ThreeDScene):
- def construct(self):
-
- axes = ThreeDAxes()
-
- #----parabola: x**2+y**2
- parabola1 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [TEAL_E],
- resolution = (20, 20)).scale(1)
-
- #----parabola: -x**2-y**2
- parabola2 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [PURPLE_E,PURPLE_E],
- resolution = (20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES)
- self.begin_ambient_camera_rotation(rate = 0.4)
-
- d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
- r = Rectangle(fill_color = '#C0C0C0',fill_opacity = 0.3).move_to(ORIGIN) #----tangent plane
-
- parabola1_text = TextMobject("Maximum with horizontal tangent plane").scale(0.7).to_corner(UL)
-
- parabola2_text = TextMobject("Minimum with horizontal tangent plane").scale(0.7).to_corner(UL)
-
- self.add(axes)
- self.add_fixed_in_frame_mobjects(parabola2_text)
- self.wait(1)
- self.play(Write(parabola1))
- self.wait(1)
- self.play(ShowCreation(d))
- self.wait(1)
- self.play(ShowCreation(r))
- self.wait(2)
- self.play(FadeOut(parabola2_text),FadeOut(parabola1),FadeOut(r),FadeOut(d))
-
- self.wait(1)
- self.add_fixed_in_frame_mobjects(parabola1_text)
- self.wait(1)
- self.play(Write(parabola2))
- self.wait(1)
- self.play(ShowCreation(d))
- self.wait(1)
- self.play(ShowCreation(r))
- self.wait(2)
--
cgit
From 005df55ffdc15c828a5edd82080b3055ff418afb Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 26 May 2020 12:31:08 +0530
Subject: Delete types_of_cp.py
---
.../Critical Points/types_of_cp.py | 70 ----------------------
1 file changed, 70 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical Points/types_of_cp.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/types_of_cp.py b/FSF-2020/approximations-and-optimizations/Critical Points/types_of_cp.py
deleted file mode 100644
index f9055e6..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/types_of_cp.py
+++ /dev/null
@@ -1,70 +0,0 @@
-from manimlib.imports import *
-
-class TypescpAnimation(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- r_text = TextMobject("Relative Maximum at ORIGIN",color ='#87CEFA')
- f_text = TextMobject("$f(x,y) = -x^2-y^2$").to_corner(UL)
-
- #----graph of first function f(x,y) = -x**2-y**2
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_D, YELLOW_E],
- resolution = (20, 20)).scale(1)
-
- r2_text = TextMobject("Saddle Point at ORIGIN",color ='#87CEFA')
- f2_text = TextMobject("$f(x,y) = -x^2+y^2$").to_corner(UL)
-
- #----graph of second function f(x,y) = -x**2+y**2
- f2 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
- resolution = (20, 20)).scale(1)
-
- r3_text = TextMobject("Relative Minimum at ORIGIN",color ='#87CEFA')
- f3_text = TextMobject("$f(x,y) = x^2+y^2$").to_corner(UL)
-
- #----graph of third function f(x,y) = x**2+y**2
- f3 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [GREEN_D, GREEN_E],
- resolution = (20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES, theta = -45 * DEGREES )
- d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
-
- self.add_fixed_in_frame_mobjects(r_text)
- self.wait(1)
- self.play(FadeOut(r_text))
- self.add(axes)
- self.play(Write(f),Write(d))
- self.add_fixed_in_frame_mobjects(f_text)
- self.wait(2)
- self.play(FadeOut(axes),FadeOut(f),FadeOut(f_text),FadeOut(d))
-
- self.add_fixed_in_frame_mobjects(r2_text)
- self.wait(1)
- self.play(FadeOut(r2_text))
- self.add(axes)
- self.play(Write(f2),Write(d))
- self.add_fixed_in_frame_mobjects(f2_text)
- self.wait(2)
- self.play(FadeOut(axes),FadeOut(f2),FadeOut(f2_text),FadeOut(d))
-
- self.add_fixed_in_frame_mobjects(r3_text)
- self.wait(1)
- self.play(FadeOut(r3_text))
- self.add(axes)
- self.play(Write(f3),Write(d))
- self.add_fixed_in_frame_mobjects(f3_text)
- self.wait(2)
--
cgit
From e92c84ba37bd991b5a7f093fbc411280568ea380 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:34:24 +0530
Subject: Upload scalar-functions Folder
---
.../scalar-functions/Scalar_Function_Quiz.pdf | Bin 0 -> 87455 bytes
.../scalar-functions/file1_domain_range.py | 132 +++++++++++++++
.../file2_scalar_function_application.py | 129 +++++++++++++++
.../scalar-functions/file3_parabola_example.py | 35 ++++
.../scalar-functions/file4_neural_nets.py | 177 +++++++++++++++++++++
.../scalar-functions/gifs/file1_domain_range.gif | Bin 0 -> 74879 bytes
.../gifs/file2_scalar_function_application.gif | Bin 0 -> 225144 bytes
.../gifs/file3_parabola_example.gif | Bin 0 -> 905534 bytes
.../scalar-functions/gifs/file4_neural_nets.gif | Bin 0 -> 95828 bytes
9 files changed, 473 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/Scalar_Function_Quiz.pdf
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/Scalar_Function_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/Scalar_Function_Quiz.pdf
new file mode 100644
index 0000000..6d94a2c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/Scalar_Function_Quiz.pdf differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py
new file mode 100644
index 0000000..9b1ca7b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py
@@ -0,0 +1,132 @@
+# Plotting Graphs
+from manimlib.imports import *
+
+class PlotGraphs(GraphScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": 0,
+ "y_max": 4,
+ "graph_origin": ORIGIN + 2.5* DOWN,
+ "x_labeled_nums": list(range(-5, 6)),
+ "y_labeled_nums": list(range(0, 5)),
+ }
+ def construct(self):
+
+ topic = TextMobject("Domain and Range")
+ topic.scale(2)
+ topic.set_color(YELLOW)
+ self.play(Write(topic))
+ self.play(FadeOut(topic))
+ self.wait(1)
+
+
+ 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(animate = True)
+
+ graphobj = self.get_graph(lambda x : np.sqrt(x + 4), x_min = -4, x_max = 5)
+ graph_lab = self.get_graph_label(graphobj, label = r"\sqrt{x + 4}")
+
+
+ rangeline1 = Arrow(self.graph_origin+2.2*YTD*UP+5*XTD*LEFT, self.graph_origin+4.1*YTD*UP+5*XTD*LEFT)
+ rangeline2 = Arrow(self.graph_origin+1.7*YTD*UP+5*XTD*LEFT, self.graph_origin+5*XTD*LEFT)
+ rangeline1.set_color(RED)
+ rangeline2.set_color(RED)
+
+ rangeMsg = TextMobject(r"Range: $y \geq 0$")
+ rangeMsg.move_to(self.graph_origin+2*YTD*UP+5*XTD*LEFT)
+ rangeMsg.scale(0.5)
+ rangeMsg.set_color(YELLOW)
+
+ domainline1 = Line(self.graph_origin+0.6*YTD*DOWN+1.2*XTD*LEFT, self.graph_origin+0.6*YTD*DOWN + 4*XTD*LEFT)
+ domainline2 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.1*XTD*RIGHT, self.graph_origin+0.6*YTD*DOWN + 5.3*XTD*RIGHT)
+ domainline1.set_color(PINK)
+ domainline2.set_color(PINK)
+
+ domainMsg = TextMobject(r"Domain: $x \geq -4$")
+ domainMsg.move_to(self.graph_origin+0.6*YTD*DOWN)
+ domainMsg.scale(0.5)
+ domainMsg.set_color(GREEN)
+
+
+
+
+ self.play(ShowCreation(graphobj))
+ self.play(ShowCreation(graph_lab))
+ self.wait(1)
+ self.play(GrowArrow(rangeline1))
+ self.play(GrowArrow(rangeline2))
+ self.play(Write(rangeMsg))
+ self.wait(1)
+ self.play(GrowArrow(domainline1))
+ self.play(GrowArrow(domainline2))
+ self.play(Write(domainMsg))
+ self.wait(3)
+
+ self.wait(2)
+
+
+
+
+class PlotSineGraphs(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN,
+ "x_labeled_nums": list(range(-8, 9)),
+ "y_labeled_nums": list(range(-1, 2)),
+ }
+ 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(animate = True)
+
+ sineobj = self.get_graph(lambda x : np.sin(x), x_min = -7, x_max = 8)
+ sine_lab = self.get_graph_label(sineobj, label = "\\sin(x)")
+
+
+ rangeline1 = Line(8*XTD*LEFT,1*YTD*UP+8*XTD*LEFT)
+ rangeline2 = Line(8*XTD*LEFT,1*YTD*DOWN+8*XTD*LEFT)
+ rangeline1.set_color(RED)
+ rangeline2.set_color(RED)
+
+ rangeMsg = TextMobject(r"Range: $-1 \leq y \leq 1$")
+ rangeMsg.move_to(1.1*YTD*UP+8.5*XTD*LEFT)
+ rangeMsg.scale(0.5)
+ rangeMsg.set_color(YELLOW)
+
+
+ domainline1 = Arrow(1.1*YTD*DOWN+2*XTD*LEFT, 1.1*YTD*DOWN + 8.5*XTD*LEFT)
+ domainline2 = Arrow(1.1*YTD*DOWN+2*XTD*RIGHT, 1.1*YTD*DOWN + 8.5*XTD*RIGHT)
+ domainline1.set_color(PINK)
+ domainline2.set_color(PINK)
+
+ domainMsg = TextMobject(r"Domain: $[-\infty, \infty]$")
+ domainMsg.move_to(1.1*YTD*DOWN)
+ domainMsg.scale(0.5)
+ domainMsg.set_color(GREEN)
+
+
+
+ self.play(ShowCreation(sineobj))
+ self.play(ShowCreation(sine_lab))
+ self.wait(1)
+ self.play(GrowArrow(rangeline1))
+ self.play(GrowArrow(rangeline2))
+ self.play(Write(rangeMsg))
+ self.wait(1)
+ self.play(GrowArrow(domainline1))
+ self.play(GrowArrow(domainline2))
+ self.play(Write(domainMsg))
+ self.wait(3)
+
+
+
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py
new file mode 100644
index 0000000..56b3e53
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py
@@ -0,0 +1,129 @@
+from manimlib.imports import *
+
+class ScalarApplication(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ cube = Cube()
+ cube.set_fill(YELLOW_E, opacity = 0.1)
+ cube.scale(2)
+ self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+ self.play(ShowCreation(cube),ShowCreation(axes))
+
+ dot = Sphere()
+ dot.scale(0.1)
+ dot.move_to(np.array([1,0.5,1]))
+ dot.set_fill(RED)
+
+ #dot = Dot(np.array([1,0.5,1]), color = RED)
+ temp_func = TextMobject("T(x,y,z)")
+ temp_func.next_to(dot,RIGHT)
+ temp_func.set_color(RED)
+ temp_func_trans = TextMobject("T(1,0.5,1)")
+ temp_func_trans.next_to(dot,RIGHT)
+ temp_func_trans.set_color(RED)
+ temp = TextMobject(r"$36 ^\circ$")
+ temp.next_to(dot,RIGHT)
+ temp.set_color(RED_E)
+
+
+ self.play(ShowCreation(dot))
+ self.play(ShowCreation(temp_func))
+ self.play(Transform(temp_func, temp_func_trans))
+ self.wait(1)
+ self.play(Transform(temp_func, temp))
+
+
+
+
+ dot1 = Sphere()
+ dot1.scale(0.1)
+ dot1.move_to(np.array([-1,-0.8,-1.5]))
+ dot1.set_fill(BLUE_E)
+ #dot1 = Dot(np.array([-1,-0.8,-1.5]), color = BLUE)
+ temp_func1 = TextMobject("T(x,y,z)")
+ temp_func1.next_to(dot1,LEFT)
+ temp_func1.set_color(BLUE)
+ temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
+ temp_func_trans1.next_to(dot1,LEFT)
+ temp_func_trans1.set_color(BLUE)
+ temp1 = TextMobject(r"$24 ^\circ$")
+ temp1.next_to(dot1,LEFT)
+ temp1.set_color(BLUE)
+
+ self.play(ShowCreation(dot1))
+ self.play(ShowCreation(temp_func1))
+ self.play(Transform(temp_func1, temp_func_trans1))
+ self.wait(1)
+ self.play(Transform(temp_func1, temp1))
+
+ self.play(FadeOut(temp_func))
+ self.play(FadeOut(temp_func1))
+
+
+ self.move_camera(phi=80* DEGREES,theta=45*DEGREES,run_time=3)
+
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.wait(4)
+ self.stop_ambient_camera_rotation()
+ self.wait(2)
+
+
+
+
+class AddTempScale(Scene):
+ def construct(self):
+ temp_scale = ImageMobject("tempscale.png")
+ temp_scale.scale(4)
+ temp_scale.move_to(2*RIGHT)
+ self.play(ShowCreation(temp_scale))
+
+
+ temp_func = TextMobject("T(x,y,z)")
+ temp_func.move_to(3*UP +2*LEFT)
+ temp_func.set_color(RED)
+ temp_func_trans = TextMobject("T(1,0.5,1)")
+ temp_func_trans.move_to(3*UP +2*LEFT)
+ temp_func_trans.set_color(RED)
+ temp = TextMobject(r"$36 ^\circ$")
+ temp.set_color(RED)
+ temp.move_to(3*UP +2*LEFT)
+ temp.scale(0.7)
+
+ self.play(ShowCreation(temp_func))
+ self.play(Transform(temp_func, temp_func_trans))
+ self.wait(1)
+ self.play(Transform(temp_func, temp))
+ self.play(ApplyMethod(temp_func.move_to, 1.8*UP +1.8*RIGHT))
+
+
+ temp_func1 = TextMobject("T(x,y,z)")
+ temp_func1.move_to(2*UP +2*LEFT)
+ temp_func1.set_color(BLUE)
+ temp_func_trans1 = TextMobject("T(-1,-0.8,-1.5)")
+ temp_func_trans1.move_to(2*UP +2*LEFT)
+ temp_func_trans1.set_color(BLUE)
+ temp1 = TextMobject(r"$24 ^\circ$")
+ temp1.set_color(BLUE)
+ temp1.move_to(2*UP +2*LEFT)
+ temp1.scale(0.7)
+
+ self.play(ShowCreation(temp_func1))
+ self.play(Transform(temp_func1, temp_func_trans1))
+ self.wait(1)
+ self.play(Transform(temp_func1, temp1))
+ self.play(ApplyMethod(temp_func1.move_to, 0.6*UP +1.8*RIGHT))
+
+
+
+ transtext = TextMobject("Scalar Function Transform:")
+ transtext.set_color(GREEN)
+ transtext1 = TextMobject(r"$\mathbb{R}^3 \rightarrow \mathbb{R}$")
+ transtext1.set_color(YELLOW_E)
+ transtext.move_to(3*UP +3*LEFT)
+ transtext1.next_to(transtext,DOWN)
+ self.play(Write(transtext))
+ self.play(Write(transtext1))
+ self.wait(2)
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
new file mode 100644
index 0000000..74dc063
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
@@ -0,0 +1,35 @@
+from manimlib.imports import *
+
+class Parabola(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ paraboloid = ParametricSurface(
+ lambda u, v: np.array([
+ 2*np.cosh(u)*np.cos(v),
+ 2*np.cosh(u)*np.sin(v),
+ 2*np.sinh(u)
+ ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],
+ resolution=(15, 32))
+
+ text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", "z = f(x,y)")
+ self.add_fixed_in_frame_mobjects(text3d)
+ text3d[0].move_to(4*LEFT+2*DOWN)
+ text3d[1].next_to(text3d[0], DOWN)
+ text3d[0].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ text3d[1].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE)
+
+ #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+ self.move_camera(phi=110* DEGREES,theta=45*DEGREES)
+ self.add(axes)
+ self.play(ShowCreation(paraboloid))
+ self.play(Write(text3d[0]))
+ self.play(Write(text3d[1]))
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.wait(3)
+ self.move_camera(phi=0 * DEGREES,theta=180*DEGREES,run_time=3)
+ self.wait(3)
+ self.move_camera(phi=110* DEGREES,theta=90*DEGREES,run_time=3)
+ self.wait(3)
+
+
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py
new file mode 100644
index 0000000..eb6bf45
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py
@@ -0,0 +1,177 @@
+from manimlib.imports import *
+
+class SigmoidFunc(GraphScene):
+ CONFIG = {
+ "x_min": -4,
+ "x_max": 4,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN + 0.8*DOWN,
+ "x_labeled_nums": list(range(-4, 5)),
+ "y_labeled_nums": list(range(-1, 2)),
+ "y_axis_height": 4.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)
+
+ topic = TextMobject("Sigmoid Function")
+ topic.move_to(3.2*UP)
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.setup_axes(animate = True)
+ sigmoid_func = self.get_graph(lambda x : (1/(1 + np.exp(-x))), x_min = -4, x_max = 4)
+ sigmoid_lab = self.get_graph_label(sigmoid_func, label = r"\frac{1}{1 + e^{-z}}")
+
+
+
+
+ self.play(ShowCreation(sigmoid_func),Write(sigmoid_lab))
+ self.play(Write(topic))
+ self.wait(2)
+ self.play(FadeOut(sigmoid_func), FadeOut(sigmoid_lab))
+ self.wait(1)
+
+
+
+class NeuralNet(GraphScene):
+ def construct(self):
+
+ sigmoid_exp = TextMobject(r"g(z) = g($\theta^T$ X) = $\frac{1}{1 + e^{-z}}$")
+ sigmoid_exp.move_to(3*UP + 4*LEFT)
+ sigmoid_exp.scale(0.8)
+ sigmoid_exp.set_color(BLUE)
+ sigmoid_exp1 = TextMobject(r"Predict: 'y = 1'",r"When g(z) $\geq$ 0.5, z $\geq$ 0, $\theta^T$ X $\geq$ 0")
+ sigmoid_exp2 = TextMobject(r"Predict: 'y = 0'", r"When g(z) $\leq$ 0.5, z $\leq$ 0, $\theta^T$ X $\leq$ 0")
+ sigmoid_exp1.scale(0.5)
+ sigmoid_exp2.scale(0.5)
+ sigmoid_exp1.set_color(PURPLE)
+ sigmoid_exp2.set_color(PURPLE)
+
+ sigmoid_exp1[0].next_to(sigmoid_exp, 1.5*DOWN)
+ sigmoid_exp1[1].next_to(sigmoid_exp1[0], DOWN)
+ sigmoid_exp2[0].next_to(sigmoid_exp1[1], 1.5*DOWN)
+ sigmoid_exp2[1].next_to(sigmoid_exp2[0], DOWN)
+
+
+ self.play(Write(sigmoid_exp))
+ self.play(Write(sigmoid_exp1[0]), Write(sigmoid_exp1[1]))
+ self.play(Write(sigmoid_exp2[0]), Write(sigmoid_exp2[1]))
+ self.wait(2)
+
+
+ neuron1 = Circle()
+ neuron1.set_fill(YELLOW_A, opacity = 0.5)
+
+ neuron2 = Circle()
+ neuron2.set_fill(ORANGE, opacity = 0.5)
+
+ neuron3 = Circle()
+ neuron3.set_fill(GREEN_E, opacity = 0.5)
+
+ neuron1.move_to(2*UP+RIGHT)
+ neuron2.move_to(2*DOWN+RIGHT)
+ neuron3.move_to(4*RIGHT)
+
+ arrow1 = Arrow(neuron1.get_right(),neuron3.get_left(),buff=0.1)
+ arrow1.set_color(RED)
+ arrow2 = Arrow(neuron2.get_right(),neuron3.get_left(),buff=0.1)
+ arrow2.set_color(RED)
+
+ arrow3 = Arrow(neuron3.get_right(),7*RIGHT,buff=0.1)
+ arrow3.set_color(RED)
+
+
+ sign1 = TextMobject("+1")
+ sign1.move_to(2*UP+RIGHT)
+ sign1.scale(2)
+ sign2 = TextMobject(r"$x_1$")
+ sign2.move_to(2*DOWN+RIGHT)
+ sign2.scale(2)
+ sign3 = TextMobject(r"$h_{\theta}(x)$")
+ sign3.move_to(6*RIGHT+0.4*DOWN)
+ sign3.scale(0.7)
+ sign4 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign4.next_to(sign3,DOWN)
+ sign4.scale(0.5)
+ sign5 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign5.next_to(sign3,DOWN)
+ sign5.scale(0.5)
+ sign6 = TextMobject(r"$= g(10 - 20x_1)$")
+ sign6.next_to(sign3,DOWN)
+ sign6.scale(0.5)
+
+
+ weight1 = TextMobject("10")
+ weight1.next_to(arrow1,UP)
+ weight2 = TextMobject("-20")
+ weight2.next_to(arrow2,DOWN)
+
+ gate = TextMobject("NOT GATE")
+ gate.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ gate.scale(1.5)
+ gate.move_to(3*RIGHT+3.5*UP)
+
+
+
+ truth_table = TextMobject(r"\begin{displaymath}\begin{array}{|c|c|} x & y\\ \hline 1 & 0 \\0 & 1 \\\end{array}\end{displaymath}")
+ truth_table.next_to(sigmoid_exp2[1], 3*DOWN)
+
+ values = TextMobject("1", "0")
+ values.scale(2)
+
+ sign4_trans1 = TextMobject(r"$= g(10 - 20(1))$")
+ sign4_trans2 = TextMobject(r"$= g(10 - 20(0))$")
+ sign4_trans1.next_to(sign3,DOWN)
+ sign4_trans2.next_to(sign3,DOWN)
+ sign4_trans1.scale(0.5)
+ sign4_trans2.scale(0.5)
+
+
+
+ output1 = TextMobject("y = 0")
+ output2 = TextMobject("y = 1")
+ output1.next_to(sign4,DOWN)
+ output2.next_to(sign4,DOWN)
+ output1.scale(1.5)
+ output2.scale(1.5)
+
+
+
+ self.play(ShowCreation(neuron1),ShowCreation(neuron2))
+ self.play(ShowCreation(neuron3))
+ self.play(ShowCreation(sign1),ShowCreation(sign2))
+ self.wait(1)
+
+ self.play(GrowArrow(arrow1))
+ self.play(GrowArrow(arrow2))
+ self.play(ShowCreation(weight1),ShowCreation(weight2))
+
+
+
+ self.play(GrowArrow(arrow3))
+ self.play(Write(sign3),Write(sign4))
+
+ self.play(Write(gate))
+ self.play(ShowCreation(truth_table))
+
+ self.play(ApplyMethod(values[0].move_to, 2*DOWN+RIGHT))
+ self.play(FadeOut(values[0]))
+ self.play(Transform(sign4,sign4_trans1))
+ self.play(Write(output1))
+ self.wait(1)
+ self.play(FadeOut(output1))
+ self.play(Transform(sign4, sign5))
+
+
+ self.play(ApplyMethod(values[1].move_to, 2*DOWN+RIGHT))
+ self.play(FadeOut(values[1]))
+ self.play(Transform(sign4,sign4_trans2))
+ self.play(Write(output2))
+ self.wait(1)
+ self.play(FadeOut(output2))
+ self.play(Transform(sign4, sign6))
+
+ self.wait(2)
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif
new file mode 100644
index 0000000..d0351e5
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif
new file mode 100644
index 0000000..831ec8e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif
new file mode 100644
index 0000000..3fdecf4
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif
new file mode 100644
index 0000000..9d24688
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif differ
--
cgit
From 7557884e36f721156f4a6f0eb8dd9997d9c25805 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:35:30 +0530
Subject: Uploaded multivariable-functions Folder
---
.../Multivariable_Functions_Quiz.pdf | Bin 0 -> 109631 bytes
.../file1_multivariable_func_respresentation.py | 80 +++++++
.../file2_multivariable_func_examples.py | 69 ++++++
.../multivariable-functions/file3_plot_sphere.py | 42 ++++
.../multivariable-functions/file4_vectorvf_sine.py | 91 ++++++++
.../file5_derivative_vectorvf.py | 247 +++++++++++++++++++++
.../file1_multivariable_func_respresentation.gif | Bin 0 -> 73055 bytes
.../gifs/file2_multivariable_func_examples.gif | Bin 0 -> 57945 bytes
.../gifs/file3_plot_sphere.gif | Bin 0 -> 198324 bytes
.../gifs/file4_vectorvf_sine.gif | Bin 0 -> 29814 bytes
.../gifs/file5_derivative_vectorvf.gif | Bin 0 -> 117597 bytes
11 files changed, 529 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivariable_func_respresentation.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_examples.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_plot_sphere.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_derivative_vectorvf.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivariable_func_respresentation.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_examples.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_plot_sphere.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_derivative_vectorvf.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf
new file mode 100644
index 0000000..7895843
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivariable_func_respresentation.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivariable_func_respresentation.py
new file mode 100644
index 0000000..4bfcf21
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivariable_func_respresentation.py
@@ -0,0 +1,80 @@
+from manimlib.imports import *
+
+class MultivariableFunc(Scene):
+ def construct(self):
+
+ topic = TextMobject("Multivariable Functions")
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ topic.scale(2)
+
+ self.play(Write(topic))
+ self.wait(1)
+ self.play(FadeOut(topic))
+
+
+ circle = Circle()
+ circle.scale(3)
+
+ eqn1 = TextMobject(r"f(x,y) = $x^2y$")
+ eqn1.set_color(YELLOW)
+
+
+
+ number1 = TextMobject("(2,1)")
+ number1.move_to(3*UP+ 3*LEFT)
+ number1.scale(1.2)
+ number1.set_color(GREEN)
+
+ output1 = TextMobject("4")
+ output1.scale(1.5)
+ output1.set_color(BLUE)
+
+ eqn1_1 = TextMobject(r"f(2,1) = $2^2(1)$")
+ eqn1_1.set_color(YELLOW)
+
+
+ self.play(ShowCreation(circle),Write(eqn1))
+ self.wait(1)
+ self.play(ApplyMethod(number1.move_to, 0.6*LEFT))
+ self.play(FadeOut(number1))
+ self.play(Transform(eqn1, eqn1_1))
+ self.wait(1)
+ self.play(ApplyMethod(output1.move_to, 3*DOWN+4*RIGHT))
+ self.wait(1)
+ self.play(FadeOut(output1))
+
+
+ eqn2 = TextMobject(r"f(x,y,z) = $x^2y+2yz$")
+ eqn2.set_color(YELLOW)
+
+ number2 = TextMobject("(2,1,3)")
+ number2.move_to(3*UP+ 3*LEFT)
+ number2.scale(1.2)
+ number2.set_color(GREEN)
+
+ output2 = TextMobject("8")
+ output2.scale(1.5)
+ output2.set_color(BLUE)
+
+ eqn2_1 = TextMobject(r"f(2,1,3) = $2^2(1) + 2(1)(3)$")
+ eqn2_1.set_color(YELLOW)
+
+ eqn2_2 = TextMobject(r"f(2,1,3) = $2 + 6$")
+ eqn2_2.set_color(YELLOW)
+
+
+
+ self.play(FadeOut(eqn1))
+ self.play(Write(eqn2))
+
+ self.wait(1)
+ self.play(ApplyMethod(number2.move_to, 1.2*LEFT))
+ self.play(FadeOut(number2))
+ self.play(Transform(eqn2, eqn2_1))
+ self.wait(1)
+ self.play(Transform(eqn2, eqn2_2))
+ self.wait(1)
+ self.play(ApplyMethod(output2.move_to, 3*DOWN+4*RIGHT))
+ self.wait(1)
+ self.play(FadeOut(output2),FadeOut(eqn2),FadeOut(circle))
+ self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_examples.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_examples.py
new file mode 100644
index 0000000..7322e47
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_examples.py
@@ -0,0 +1,69 @@
+from manimlib.imports import *
+
+class Examples(GraphScene):
+ def construct(self):
+
+ rectangle = Rectangle(height = 3, width = 4, color = GREEN)
+ square = Square(side_length = 5, color = PURPLE)
+ circle = Circle(radius = 2, color = PINK)
+ radius = Line(ORIGIN,2*RIGHT)
+
+ radius.set_color(RED)
+
+ rectangle_area_func = TextMobject(r"$Area = f(Length, Breadth)$")
+ rectangle_area_func.scale(0.6)
+ square_area_func = TextMobject(r"$Area = f(Length)$")
+ circle_area_func = TextMobject(r"$Area = f(r)$")
+
+
+ rectangle_area = TextMobject(r"$Area = Length \times Breadth$")
+ rectangle_area.scale(0.6)
+ square_area = TextMobject(r"$Area = Length^2$")
+ circle_area = TextMobject(r"$Area = \pi r^2$")
+
+ braces_rect1 = Brace(rectangle, LEFT)
+ eq_text1 = braces_rect1.get_text("Length")
+ braces_rect2 = Brace(rectangle, UP)
+ eq_text2 = braces_rect2.get_text("Breadth")
+
+ braces_square = Brace(square, LEFT)
+ braces_square_text = braces_square.get_text("Length")
+
+ radius_text = TextMobject("r")
+ radius_text.next_to(radius,UP)
+
+
+
+ self.play(ShowCreation(rectangle))
+ self.wait(1)
+ self.play(GrowFromCenter(braces_rect1),Write(eq_text1),GrowFromCenter(braces_rect2),Write(eq_text2))
+ self.wait(1)
+ self.play(Write(rectangle_area_func))
+ self.wait(1)
+ self.play(Transform(rectangle_area_func, rectangle_area))
+ self.wait(1)
+ self.play(FadeOut(braces_rect1),FadeOut(eq_text1),FadeOut(braces_rect2),FadeOut(eq_text2),FadeOut(rectangle_area_func))
+
+
+ self.play(Transform(rectangle, square))
+ self.wait(1)
+ self.play(GrowFromCenter(braces_square),Write(braces_square_text))
+ self.wait(1)
+ self.play(Write(square_area_func))
+ self.wait(1)
+ self.play(Transform(square_area_func, square_area))
+ self.wait(1)
+ self.play(FadeOut(braces_square),FadeOut(braces_square_text),FadeOut(square_area_func))
+
+
+ self.play(Transform(rectangle, circle))
+ self.wait(1)
+ self.play(ShowCreation(radius),Write(radius_text))
+ self.wait(1)
+ self.play(FadeOut(radius_text),FadeOut(radius))
+ self.wait(1)
+ self.play(Write(circle_area_func))
+ self.wait(1)
+ self.play(Transform(circle_area_func, circle_area))
+ self.wait(1)
+ self.play(FadeOut(circle_area_func))
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_plot_sphere.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_plot_sphere.py
new file mode 100644
index 0000000..baf08b1
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_plot_sphere.py
@@ -0,0 +1,42 @@
+from manimlib.imports import *
+
+class Sphere(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+ sphere = ParametricSurface(
+ lambda u, v: np.array([
+ np.sin(u)*np.cos(v),
+ np.sin(u)*np.sin(v),
+ np.cos(u)
+ ]),u_min=0,u_max=PI,v_min=0,v_max=2*PI,checkerboard_colors=[RED_D, RED_E],
+ resolution=(15, 32)).scale(2)
+
+
+
+ #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
+
+ text3d = TextMobject(r"$f(x,y) \rightarrow Point(x,y,z)$")
+ text3d1 = TextMobject(r"$f(x,y) \rightarrow Point(x,y, 1 - x^2 - y^2)$")
+ self.add_fixed_in_frame_mobjects(text3d)
+ text3d.scale(0.7)
+ text3d1.scale(0.7)
+ text3d.to_corner(UL)
+ text3d1.to_corner(UL)
+ text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ text3d1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(text3d))
+ self.wait(1)
+
+ self.play(Transform(text3d,text3d1))
+ self.add_fixed_in_frame_mobjects(text3d1)
+ self.play(FadeOut(text3d))
+
+
+ self.set_camera_orientation(phi=75 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+
+ self.add(axes)
+ self.play(Write(sphere))
+ self.wait(5)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py
new file mode 100644
index 0000000..06e225e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class SineVectors(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 10,
+ "y_min": -1,
+ "y_max": 1,
+ "graph_origin": ORIGIN+4*LEFT,
+ #"x_labeled_nums": list(range(-5, 6)),
+ #"y_labeled_nums": list(range(0, 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(animate = True)
+
+
+ sine1 = self.get_graph(lambda x : np.sin(x), x_min = 0, x_max = 1.575, color = GREEN)
+
+ point1 = Dot().shift(self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT)
+ point1_lab = TextMobject(r"$t = (\frac{\pi}{2})$")
+ point1_lab.scale(0.7)
+ point1_lab.next_to(point1, UP)
+
+ vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT, buff=0.1, color = RED)
+ vector1_lab = TextMobject(r"$r(\frac{\pi}{2})$", color = RED)
+ vector1_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.5*YTD*UP)
+
+ self.play(GrowArrow(vector1),Write(vector1_lab))
+ self.play(ShowCreation(point1), Write(point1_lab))
+ self.play(ShowCreation(sine1))
+ self.wait(1)
+
+
+ sine2 = self.get_graph(lambda x : np.sin(x), x_min = 1.575, x_max = 3.15, color = GREEN)
+
+ point2 = Dot().shift(self.graph_origin+3.15*XTD*RIGHT)
+ point2_lab = TextMobject(r"$t = (\pi)$")
+ point2_lab.scale(0.7)
+ point2_lab.next_to(point2, UP+RIGHT)
+
+ vector2 = Arrow(self.graph_origin, self.graph_origin+3.15*XTD*RIGHT, buff=0.1, color = BLUE)
+ vector2_lab = TextMobject(r"$r(\pi)$", color = BLUE)
+ vector2_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.15*YTD*UP)
+
+ self.play(GrowArrow(vector2),Write(vector2_lab))
+ self.play(ShowCreation(point2), Write(point2_lab))
+ self.play(ShowCreation(sine2))
+ self.wait(1)
+
+
+ sine3 = self.get_graph(lambda x : np.sin(x), x_min = 3.15, x_max = 4.725, color = GREEN)
+
+ point3 = Dot().shift(self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT)
+ point3_lab = TextMobject(r"$t = (\frac{3\pi}{2})$")
+ point3_lab.scale(0.7)
+ point3_lab.next_to(point3, DOWN)
+
+ vector3 = Arrow(self.graph_origin, self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT, buff=0.1, color = YELLOW_C)
+ vector3_lab = TextMobject(r"$r(\frac{3\pi}{2})$", color = YELLOW_C)
+ vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 0.7*YTD*DOWN)
+
+ self.play(GrowArrow(vector3),Write(vector3_lab))
+ self.play(ShowCreation(point3), Write(point3_lab))
+ self.play(ShowCreation(sine3))
+ self.wait(1)
+
+
+ sine4 = self.get_graph(lambda x : np.sin(x), x_min = 4.725, x_max = 6.3, color = GREEN)
+
+ point4 = Dot().shift(self.graph_origin+6.3*XTD*RIGHT)
+ point4_lab = TextMobject(r"$t = (2\pi)$")
+ point4_lab.scale(0.7)
+ point4_lab.next_to(point4, UP+RIGHT)
+
+ vector4 = Arrow(self.graph_origin, self.graph_origin+6.3*XTD*RIGHT, buff=0.1, color = PURPLE)
+ vector4_lab = TextMobject(r"$r(2\pi)$", color = PURPLE)
+ vector4_lab.move_to(self.graph_origin+4.5*XTD*RIGHT+ 0.15*YTD*DOWN)
+
+ self.play(GrowArrow(vector4),Write(vector4_lab))
+ self.play(ShowCreation(point4), Write(point4_lab))
+ self.play(ShowCreation(sine4))
+ self.wait(3)
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_derivative_vectorvf.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_derivative_vectorvf.py
new file mode 100644
index 0000000..466e389
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_derivative_vectorvf.py
@@ -0,0 +1,247 @@
+from manimlib.imports import *
+
+class Derivative(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 3,
+ "y_min": 0,
+ "y_max": 5,
+ "graph_origin": ORIGIN+6*LEFT+3*DOWN,
+ "x_axis_width": 6,
+ "x_labeled_nums": list(range(0, 4)),
+ "y_labeled_nums": list(range(0, 6)),
+ }
+ 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(animate = True)
+
+ graph = self.get_graph(lambda x : x*x, x_min = 0.5, x_max = 2, color = GREEN)
+
+ point1 = Dot().shift(self.graph_origin+0.25*YTD*UP + 0.5*XTD*RIGHT)
+ point1_lab = TextMobject(r"$t = a$")
+ point1_lab.scale(0.7)
+ point1_lab.next_to(point1, RIGHT)
+
+ point2 = Dot().shift(self.graph_origin+2*XTD*RIGHT+4*YTD*UP)
+ point2_lab = TextMobject(r"$t = b$")
+ point2_lab.scale(0.7)
+ point2_lab.next_to(point2, RIGHT)
+
+
+ vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, buff=0.02, color = RED)
+ vector1_lab = TextMobject(r"$\vec r(t)$", color = RED)
+ vector1_lab.move_to(self.graph_origin+1.2*XTD*RIGHT+ 0.75*YTD*UP)
+ vector1_lab.scale(0.8)
+
+ vector2 = Arrow(self.graph_origin, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = YELLOW_C)
+ vector2_lab = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
+ vector2_lab.move_to(self.graph_origin+0.5*XTD*RIGHT+ 2*YTD*UP)
+ vector2_lab.scale(0.8)
+
+ vector3 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PINK)
+ vector3_lab = TextMobject(r"$\vec r(t + h) - \vec r(t)$", color = PINK)
+ vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 1.5*YTD*UP)
+ vector3_lab.scale(0.8)
+
+
+ self.play(ShowCreation(graph))
+ self.play(ShowCreation(point1), Write(point1_lab))
+ self.play(ShowCreation(point2), Write(point2_lab))
+
+ self.play(GrowArrow(vector1),Write(vector1_lab))
+ self.play(GrowArrow(vector2),Write(vector2_lab))
+ self.play(GrowArrow(vector3),Write(vector3_lab))
+ self.wait(1)
+
+ self.display_text()
+
+ self.play(ApplyMethod(vector3_lab.move_to,(self.graph_origin+2.3*XTD*RIGHT+ 2.2*YTD*UP)))
+
+ vector4 = Arrow(self.graph_origin+1*YTD*UP + 1*XTD*RIGHT, self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = PURPLE)
+ vector4_lab = TextMobject(r"$dx$", color = PURPLE)
+ vector4_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 0.8*YTD*UP)
+ vector4_lab.scale(0.7)
+
+ vector5 = Arrow(self.graph_origin+1*YTD*UP + 1.5*XTD*RIGHT, self.graph_origin+2.25*YTD*UP + 1.5*XTD*RIGHT, buff=0.02, color = ORANGE)
+ vector5_lab = TextMobject(r"$dy$", color = ORANGE)
+ vector5_lab.move_to(self.graph_origin+1.7*XTD*RIGHT+ 1.4*YTD*UP)
+ vector5_lab.scale(0.7)
+
+ self.play(GrowArrow(vector4),Write(vector4_lab))
+ self.play(GrowArrow(vector5),Write(vector5_lab))
+ self.wait(2)
+
+
+
+ def display_text(self):
+ text1 = TextMobject(r"$\vec r(t)$",r"+", r"$\vec r(t + h) - \vec r(t)$")
+ text1[0].set_color(RED)
+ text1[2].set_color(PINK)
+ text1.scale(0.7)
+
+ text2 = TextMobject(r"$\vec r(t + h)$", color = YELLOW_C)
+ text2.scale(0.7)
+
+ text3 = TextMobject(r"$ \vec r(t + h) - \vec r(t)$", color = PINK)
+ text3.scale(0.7)
+
+ text4 = TextMobject(r"[", r"$x(t+h)$", r"$\vec i$", r"+", r"$y(t+h)$", r"$\vec j$", r"$] - [$", r"$x(t)$", r"$\vec i$", r"+", r"y(t)", r"$\vec j$", r"]")
+ text4.set_color_by_tex(r"\vec i", BLUE)
+ text4.set_color_by_tex(r"\vec j", GREEN)
+ text4[1].set_color(YELLOW_C)
+ text4[4].set_color(YELLOW_C)
+ text4[-6].set_color(RED)
+ text4[-3].set_color(RED)
+ text4.scale(0.7)
+
+ text5 = TextMobject(r"$[x(t+h) - x(t)]$", r"$\vec i$", r"+", r"$[y(t+h) + y(t)]$", r"$\vec j$")
+ text5.set_color_by_tex(r"\vec i", BLUE)
+ text5.set_color_by_tex(r"\vec j", GREEN)
+ text5[0].set_color(PURPLE)
+ text5[3].set_color(ORANGE)
+ text5.scale(0.7)
+
+ text6 = TextMobject(r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
+ text6.set_color_by_tex(r"\vec i", BLUE)
+ text6.set_color_by_tex(r"\vec j", GREEN)
+ text6[0].set_color(PINK)
+ text6[2].set_color(PURPLE)
+ text6[-2].set_color(ORANGE)
+ text6.scale(0.8)
+
+ text7 = TextMobject(r"$\lim_{h \rightarrow 0}$", r"$\frac{[\vec r(t + h) - \vec r(t)]}{h}$", r"=", r"$\lim_{h \rightarrow 0}$", r"$\frac{[x(t+h) - x(t)]}{h}$", r"$\vec i$", r"+", r"$\lim_{h \rightarrow 0}$", r"$\frac{[y(t+h) + y(t)]}{h}$", r"$\vec j$")
+ text7.set_color_by_tex(r"\vec i", BLUE)
+ text7.set_color_by_tex(r"\vec j", GREEN)
+ text7[1].set_color(PINK)
+ text7[4].set_color(PURPLE)
+ text7[-2].set_color(ORANGE)
+ text7.scale(0.6)
+
+ text8 = TextMobject(r"$\vec r'(t)$", r"=",r"$\vec x'(t)$", r"$\vec i$", r"+", r"$\vec y'(t)$", r"$\vec j$")
+ text8.set_color_by_tex(r"\vec i", BLUE)
+ text8.set_color_by_tex(r"\vec j", GREEN)
+ text8[0].set_color(PINK)
+ text8[2].set_color(PURPLE)
+ text8[5].set_color(ORANGE)
+ text8.scale(0.7)
+
+ text9 = TextMobject(r"$\frac{d \vec r}{dt}$", r"=", r"$\frac{d \vec x}{dt}$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}$", r"$\vec j$")
+ text9.set_color_by_tex(r"\vec i", BLUE)
+ text9.set_color_by_tex(r"\vec j", GREEN)
+ text9[0].set_color(PINK)
+ text9[2].set_color(PURPLE)
+ text9[5].set_color(ORANGE)
+ text9.scale(0.7)
+
+
+ text10 = TextMobject(r"$d \vec r$", r"=", r"$\frac{d \vec x}{dt}dt$", r"$\vec i$", r"+", r"$\frac{d \vec y}{dt}dt$", r"$\vec j$")
+ text10.set_color_by_tex(r"\vec i", BLUE)
+ text10.set_color_by_tex(r"\vec j", GREEN)
+ text10[0].set_color(PINK)
+ text10[2].set_color(PURPLE)
+ text10[5].set_color(ORANGE)
+ text10.scale(0.7)
+
+ text11 = TextMobject(r"$d \vec r$", r"=", r"$x'(t)dt$", r"$\vec i$", r"+", r"$y'(t)dt$", r"$\vec j$")
+ text11.set_color_by_tex(r"\vec i", BLUE)
+ text11.set_color_by_tex(r"\vec j", GREEN)
+ text11[0].set_color(PINK)
+ text11[2].set_color(PURPLE)
+ text11[5].set_color(ORANGE)
+ text11.scale(0.7)
+
+ text12 = TextMobject(r"$d \vec r$", r"=", r"$dx$", r"$\vec i$", r"+", r"$dy$", r"$\vec j$")
+ text12.set_color_by_tex(r"\vec i", BLUE)
+ text12.set_color_by_tex(r"\vec j", GREEN)
+ text12[0].set_color(PINK)
+ text12[2].set_color(PURPLE)
+ text12[5].set_color(ORANGE)
+ text12.scale(0.7)
+
+
+ text1.move_to(1*UP+2.7*RIGHT)
+ text2.move_to(1*UP+2.7*RIGHT)
+ text3.move_to(1*UP+2.7*RIGHT)
+ text4.move_to(1*UP+2.7*RIGHT)
+ text5.move_to(1*UP+2.7*RIGHT)
+ text6.move_to(1*UP+2.7*RIGHT)
+ text7.move_to(1*UP+2.5*RIGHT)
+ text8.move_to(1*UP+2.7*RIGHT)
+ text9.move_to(1*UP+2.7*RIGHT)
+ text10.move_to(1*UP+2.7*RIGHT)
+ text11.move_to(1*UP+2.7*RIGHT)
+ text12.move_to(1*UP+2.7*RIGHT)
+
+ brace1 = Brace(text7[0:2], DOWN, buff = SMALL_BUFF)
+ brace2 = Brace(text7[3:6], UP, buff = SMALL_BUFF)
+ brace3 = Brace(text7[7:], DOWN, buff = SMALL_BUFF)
+ t1 = brace1.get_text(r"$\vec r'(t)$")
+ t1.set_color(PINK)
+
+ t2 = brace2.get_text(r"$\vec x'(t)$")
+ t2.set_color(PURPLE)
+
+ t3 = brace3.get_text(r"$\vec y'(t)$")
+ t3.set_color(ORANGE)
+
+
+ self.play(Write(text1))
+ self.play(Transform(text1, text2))
+ self.wait(1)
+
+ self.play(Transform(text1, text3))
+ self.wait(1)
+
+ self.play(Transform(text1, text4))
+ self.wait(1)
+
+ self.play(Transform(text1, text5))
+ self.wait(1)
+
+ self.play(Transform(text1, text6))
+ self.wait(1)
+
+ self.play(Transform(text1, text7))
+ self.wait(1)
+
+ self.play(
+ GrowFromCenter(brace1),
+ FadeIn(t1),
+ )
+ self.wait()
+ self.play(
+ ReplacementTransform(brace1.copy(),brace2),
+ ReplacementTransform(t1.copy(),t2)
+ )
+ self.wait()
+ self.play(
+ ReplacementTransform(brace2.copy(),brace3),
+ ReplacementTransform(t2.copy(),t3)
+ )
+ self.wait()
+
+ self.play(FadeOut(brace1), FadeOut(t1), FadeOut(brace2), FadeOut(t2), FadeOut(brace3), FadeOut(t3),)
+ self.wait()
+
+ self.play(Transform(text1, text8))
+ self.wait(1)
+
+ self.play(Transform(text1, text9))
+ self.wait(1)
+
+ self.play(Transform(text1, text10))
+ self.wait(1)
+
+ self.play(Transform(text1, text11))
+ self.wait(1)
+
+ self.play(Transform(text1, text12))
+ self.wait(1)
+
+
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivariable_func_respresentation.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivariable_func_respresentation.gif
new file mode 100644
index 0000000..a173bda
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivariable_func_respresentation.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_examples.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_examples.gif
new file mode 100644
index 0000000..11f66f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_examples.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_plot_sphere.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_plot_sphere.gif
new file mode 100644
index 0000000..ad7582c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_plot_sphere.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif
new file mode 100644
index 0000000..4f6b931
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_derivative_vectorvf.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_derivative_vectorvf.gif
new file mode 100644
index 0000000..a94de90
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_derivative_vectorvf.gif differ
--
cgit
From 8cf9bc5da64361ce7d5a24a6b3a55443a447a06f Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:37:33 +0530
Subject: Uploaded limits-and-continuity-of-multivariable-functions Folder
---
.../file1_limit_approach_point.py | 66 +++++++++++++++++++++
.../gifs/file1_limit_approach_point.gif | Bin 0 -> 47411 bytes
2 files changed, 66 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
new file mode 100644
index 0000000..57d1d45
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
@@ -0,0 +1,66 @@
+from manimlib.imports import *
+
+class Limit(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "graph_origin": ORIGIN + 3* DOWN+4*LEFT,
+ "x_labeled_nums": list(range(0, 4)),
+ "y_labeled_nums": list(range(0, 5)),
+ }
+ def construct(self):
+ topic = TextMobject("Different paths of approach to limit point")
+ topic.scale(1.5)
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(topic))
+ self.wait(1)
+ self.play(FadeOut(topic))
+
+
+
+ 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(animate = True)
+
+ y_x = self.get_graph(lambda x : x, x_min = -1, x_max = 4)
+ y_x_lab = self.get_graph_label(y_x, label = r"y = x")
+
+ y_xsquare = self.get_graph(lambda x : x*x, x_min = -1, x_max = 4)
+ y_xsquare_lab = self.get_graph_label(y_xsquare, label = r"y = x^2")
+
+ y_1 = self.get_graph(lambda x : 1, x_min = -1, x_max = 4)
+ y_1_lab = self.get_graph_label(y_1, label = r"y = 1")
+
+ y_2minusx = self.get_graph(lambda x : 2 - x, x_min = -1, x_max = 4, color = RED)
+ y_2minusx_lab = self.get_graph_label(y_2minusx, label = r"y = 2 - x")
+
+ limit_point = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
+ limit_point_lab = TextMobject(r"(1,1)")
+ limit_point_lab.next_to(limit_point, DOWN)
+
+ self.play(ShowCreation(limit_point))
+ self.play(Write(limit_point_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_x))
+ self.play(Write(y_x_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_xsquare))
+ self.play(Write(y_xsquare_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_1))
+ self.play(Write(y_1_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_2minusx))
+ self.play(Write(y_2minusx_lab))
+ self.wait(1)
+
+
+
+
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif
new file mode 100644
index 0000000..830b6f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif differ
--
cgit
From aa9bcd8cde74b592dd16051809b9f4ce70f63586 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:38:58 +0530
Subject: Update README.md
---
.../multivariable-functions-and-paritial-derivatives/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
index b50200d..6e4d2a8 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
@@ -4,6 +4,6 @@ Github Account : nishanpoojary
## Sub-Topics Covered:
+ Scalar Functions
+ Multivariable Functions
-+ Limits and continuity of Multivariable Function
++ Limits and Continuity of Multivariable Function
+ Partial Derivatives
+ Directonal Derivatives
--
cgit
From 7cb7a025c6b74c1998739fdae5a84945ff708307 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Tue, 26 May 2020 12:39:13 +0530
Subject: Update README.md
---
.../multivariable-functions-and-paritial-derivatives/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
index 6e4d2a8..7ff6b61 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/README.md
@@ -4,6 +4,6 @@ Github Account : nishanpoojary
## Sub-Topics Covered:
+ Scalar Functions
+ Multivariable Functions
-+ Limits and Continuity of Multivariable Function
++ Limits and Continuity of Multivariable Functions
+ Partial Derivatives
+ Directonal Derivatives
--
cgit
From c37336428531e016f5b1d9efb81a2d72348a21a7 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Tue, 26 May 2020 12:51:09 +0530
Subject: Updating Folder Name
---
...1_Understand_Linear_Transformations_visually.py | 193 ---------------------
.../file2_Uniform_Scaling.py | 91 ----------
.../file3_Horizontal_Shear.py | 53 ------
.../file3_Horizontal_Shear_gif.gif | Bin 1566999 -> 0 bytes
.../file4_Vertical_Shear.py | 52 ------
.../file4_Vertical_Shear_gif.gif | Bin 1347079 -> 0 bytes
...1_Understand_Linear_Transformations_visually.py | 193 +++++++++++++++++++++
.../file2_Uniform_Scaling.py | 91 ++++++++++
.../file3_Horizontal_Shear.py | 53 ++++++
.../file3_Horizontal_Shear_gif.gif | Bin 0 -> 1566999 bytes
.../file4_Vertical_Shear.py | 52 ++++++
.../file4_Vertical_Shear_gif.gif | Bin 0 -> 1347079 bytes
12 files changed, 389 insertions(+), 389 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
deleted file mode 100644
index 577032d..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file1_Understand_Linear_Transformations_visually.py
+++ /dev/null
@@ -1,193 +0,0 @@
-from manimlib.imports import *
-
-class Rotation(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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)
-
- introText = TextMobject("Understanding Linear Transformations")
- self.play(Write(introText))
- self.wait(1)
-
- introText1 = TextMobject("Visually ... ")
- introText1.move_to(DOWN)
- self.play(Write(introText1))
- self.wait(1)
- self.play(FadeOut(introText), FadeOut(introText1))
-
- Text1 = TextMobject("Let $\overrightarrow{v}$ be $2\hat{i}+3\hat{j}$")
- Text2 = TextMobject("$\overrightarrow{v} = 2\hat{i}+3\hat{j}$")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
- self.play(Write(Text1))
- self.wait()
- self.play(Transform(Text1,Text2))
-
- self.setup_axes(animate=True)
- arrow_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*LEFT + 0.25*DOWN, end = self.graph_origin+2*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.25*UP)
- self.play(ShowCreation(arrow_v))
-
- Text_i = TextMobject("$\hat{i}$")
- Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
- Text_i.scale(0.75)
- Text_j = TextMobject("$\hat{j}$")
- Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
- Text_j.scale(0.75)
-
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
- self.play(ShowCreation(arrow_i), ShowCreation(arrow_j), Write(Text_i), Write(Text_j))
-
- Text_2i = TextMobject("$2\hat{i}$")
- Text_2i.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
- Text_3j = TextMobject("$3\hat{j}$")
- Text_3j.move_to(self.graph_origin+1*XTD*LEFT+1.5*YTD*UP)
-
- arrow_2i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+2*XTD*RIGHT+ 0.25*RIGHT)
- arrow_2i.set_color(YELLOW)
- arrow_3j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+3*YTD*UP+0.25*UP)
- arrow_3j.set_color(RED)
- self.wait(0.5)
- self.play(Transform(arrow_i,arrow_2i), Transform(arrow_j,arrow_3j), Transform(Text_i,Text_2i), Transform(Text_j,Text_3j))
- self.play(ApplyMethod(arrow_j.move_to,self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP) , ApplyMethod(Text_j.move_to,self.graph_origin+2.5*XTD*RIGHT+1.5*YTD*UP+ 0.15*RIGHT + 0.25*UP))
-
- new_Text_v = TextMobject("$\overrightarrow{v}$")
- new_Text_v.move_to(self.graph_origin+0.5*XTD*RIGHT+1.5*YTD*UP)
- self.play(Write(new_Text_v))
-
- new_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- new_arrow_i.set_color(YELLOW)
- new_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
- new_arrow_j.set_color(RED)
-
- new_Text_i = TextMobject("$\hat{i}$")
- new_Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
- new_Text_i.scale(0.75)
- new_Text_j = TextMobject("$\hat{j}$")
- new_Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
- new_Text_j.scale(0.75)
-
- self.wait(1)
-
- self.play(FadeOut(Text_i),
- FadeOut(Text_j),
- FadeOut(arrow_i),
- FadeOut(arrow_j),
- ShowCreation(new_arrow_i),
- ShowCreation(new_arrow_j),
- Write(new_Text_i),
- Write(new_Text_j))
-
- self.play(ApplyMethod(Text1.move_to,4*RIGHT))
- Text3 = TextMobject("Let the be a linear transformation function")
- Text3.scale(0.5)
- Text4 = TextMobject("$T$ which rotates the vectors by angle of $90^{\circ}$")
- Text4.scale(0.5)
- Text3.move_to(4*RIGHT+3*UP)
- Text4.move_to(4*RIGHT+2.5*UP)
- self.play(Write(Text3), Write(Text4))
- self.wait(2)
-
- Text6 = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- Text6.scale(0.75)
- Text6.set_color(YELLOW)
- Text6.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
- Text7 = TextMobject(r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
- Text7.scale(0.75)
- Text7.set_color(RED)
- Text7.move_to(self.graph_origin+1*XTD*LEFT+1*YTD*UP)
-
- self.play(Transform(new_Text_i,Text6))
- self.play(Transform(new_Text_j,Text7))
-
- Text5 = TextMobject(r"$\overrightarrow{v} = 2 $", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
- Text5[1].set_color(YELLOW)
- Text5[3].set_color(RED)
- Text5.move_to(4*RIGHT)
-
- self.play(Transform(Text1, Text5))
- self.wait()
-
- arrow_modified_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*UP, end = self.graph_origin-(1*YTD*UP+0.25*UP))
- arrow_modified_i.set_color(YELLOW)
- arrow_modified_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_modified_j.set_color(RED)
-
- yellow_i = TextMobject(r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$")
- yellow_i.set_color(YELLOW).scale(0.75)
- yellow_i.move_to(self.graph_origin + 1*XTD*DOWN + 1*YTD*LEFT)
-
- red_j = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- red_j.set_color(RED).scale(0.75)
- red_j.move_to(self.graph_origin + 1*XTD*UP + 1*YTD*RIGHT)
-
- Text8 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- Text8[1].set_color(YELLOW)
- Text8[3].set_color(RED)
- Text8.move_to(4*RIGHT+1.5*DOWN)
- Text8.scale(0.75)
-
- new_Text__v = TextMobject("$\overrightarrow{v}_{transformed}$")
- new_Text__v.scale(0.75)
- arrow_modified_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT + 0.15*UP, end = self.graph_origin+2*XTD*DOWN+3*YTD*RIGHT+ 0.15*DOWN + 0.25*RIGHT)
- self.play(Transform(arrow_v, arrow_modified_v),
- Transform(new_arrow_i, arrow_modified_i),
- Transform(new_arrow_j, arrow_modified_j),
- Transform(new_Text_i,yellow_i),
- Transform(new_Text_j,red_j),
- FadeOut(new_Text_v),
- ApplyMethod(new_Text__v.move_to,self.graph_origin+3*XTD*RIGHT+0.5*YTD*DOWN),
- Write(Text8))
-
- self.play(FadeOut(Text1), FadeOut(Text3), FadeOut(Text4), ApplyMethod(Text8.move_to,4*RIGHT+3*UP))
-
- Text9 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\hat{i}_{transformed}$", r"+3", r"$\hat{j}_{transformed}$")
- Text9[1].set_color(YELLOW)
- Text9[3].set_color(RED)
- Text9.move_to(4*RIGHT+2*UP)
- Text9.scale(0.5)
-
- self.play(Write(Text9))
-
- v_transformed = TextMobject(r"$\overrightarrow{v}_{transformed} \equiv T(\overrightarrow{v})$")
- v_transformed.scale(0.75).move_to(4*RIGHT+UP)
- i_transformed = TextMobject(r"$\hat{i}_{transformed} \equiv T(\hat{i})$")
- i_transformed.set_color(YELLOW).scale(0.75).move_to(4*RIGHT)
- j_transformed = TextMobject(r"$\hat{v}_{transformed} \equiv T(\hat{j})$")
- j_transformed.set_color(RED).scale(0.75).move_to(4*RIGHT+DOWN)
-
- self.play(Write(v_transformed), Write(i_transformed), Write(j_transformed))
- self.wait(3)
-
- Text10 = TextMobject(r"$T(\overrightarrow{v}) = $", r"$\begin{pmatrix} 3 \\ -2 \end{pmatrix}$")
- Text10[1].set_color(BLUE_E)
- Text10.move_to(4*RIGHT+1*UP)
- Text10.scale(0.75)
-
- self.play(Write(Text10), ApplyMethod(v_transformed.move_to,4*RIGHT+2*UP), FadeOut(i_transformed), FadeOut(j_transformed), FadeOut(Text9))
- self.wait(1)
-
- self.play(FadeOut(self.axes),
- FadeOut(arrow_v),
- FadeOut(new_arrow_i),
- FadeOut(new_arrow_j),
- FadeOut(new_Text_i),
- FadeOut(new_Text_i),
- FadeOut(new_Text_j),
- FadeOut(new_Text__v),
- FadeOut(Text10),
- FadeOut(v_transformed),
- FadeOut(Text8))
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
deleted file mode 100644
index a7856a5..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file2_Uniform_Scaling.py
+++ /dev/null
@@ -1,91 +0,0 @@
-from manimlib.imports import *
-
-class Scaling(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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)
-
- introText = TextMobject("Scaling")
- self.play(Write(introText))
- self.wait(1)
- self.play(FadeOut(introText))
-
- introText = TextMobject("Uniform Scaling")
- self.play(Write(introText))
- self.wait(1)
- self.play(FadeOut(introText))
-
- Text1 = TextMobject("Let $\overrightarrow{v}$ be $3\hat{i}+3\hat{j}$")
- Text2 = TextMobject("$\overrightarrow{v} = 3\hat{i}+3\hat{j}$")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
- self.play(Write(Text1))
- self.wait()
- self.play(Transform(Text1,Text2))
-
- self.setup_axes(animate=True)
- arrow_v = Arrow(stroke_width = 4, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+3*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.15*UP)
- vector_v = TextMobject(r"$\vec{v}$")
- vector_v.move_to(self.graph_origin + 1*XTD*RIGHT + 2*YTD*UP )
- self.play(ShowCreation(arrow_v),Write(vector_v))
- scaling_factor = TextMobject(r"Scaling Factor = $\frac{4}{3}$")
- scaling_factor.scale(0.75)
- scaled_vector = TextMobject(r"$T(\vec{v}) = \frac{4}{3} \left[ \begin{array} {c} 3 \\ 3 \end{array} \right] = \left[ \begin{array} {c} 4 \\ 4 \end{array} \right]$")
- scaled_vector.set_color(DARK_BLUE)
- scaled_vector.scale(0.75)
- scaling_factor.move_to(4*RIGHT)
- scaled_vector.move_to(4*RIGHT+DOWN)
- self.play(Write(scaling_factor))
- self.wait()
- self.play(Write(scaled_vector))
-
- transformed_arrow_v = Arrow(stroke_width = 2, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+4*XTD*RIGHT+4*YTD*UP+ 0.15*RIGHT + 0.15*UP)
- transformed_arrow_v.set_color(DARK_BLUE)
- transformed_vector_v = TextMobject(r"$T(\vec{v})$")
- transformed_vector_v.move_to(self.graph_origin + 4.5*XTD*RIGHT + 4.5*YTD*UP )
- transformed_vector_v.set_color(DARK_BLUE)
- self.play(ShowCreation(transformed_arrow_v), Write(transformed_vector_v))
-
- self.wait()
-
- represent_text1 = TextMobject("Representation of scaling")
- represent_text2 = TextMobject("of vectors in point form")
- represent_text1.move_to(4*RIGHT+3*UP)
- represent_text2.move_to(4*RIGHT+2*UP)
- self.play(Write(represent_text1), Write(represent_text2))
-
- dot_init = Dot(self.graph_origin+3*XTD*RIGHT+3*YTD*UP)
- dot_trans = Dot(self.graph_origin+4*XTD*RIGHT+4*YTD*UP)
-
- self.play(ApplyMethod(vector_v.move_to,self.graph_origin+2.5*XTD*RIGHT+2.5*YTD*UP),
- ApplyMethod(transformed_vector_v.move_to,self.graph_origin+4.5*XTD*RIGHT+4.5*YTD*UP),
- ShowCreation(dot_init),
- Transform(arrow_v,dot_init),
- Transform(transformed_arrow_v,dot_trans))
-
- self.wait(2)
-
- self.play(FadeOut(dot_init),
- FadeOut(arrow_v),
- FadeOut(transformed_arrow_v),
- FadeOut(represent_text1),
- FadeOut(represent_text2),
- FadeOut(self.axes),
- FadeOut(scaling_factor),
- FadeOut(scaled_vector),
- FadeOut(transformed_vector_v),
- FadeOut(vector_v),
- FadeOut(Text1))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
deleted file mode 100644
index 91f098e..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from manimlib.imports import *
-
-class Hori_Shear(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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("Before"," Horizontal")
- Text1[0].set_color(YELLOW)
- Text2 = TextMobject("Shear Transformation")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
-
- self.setup_axes(animate=False)
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
- arrow_i.set_color(YELLOW)
- arrow_j.set_color(YELLOW)
-
- square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
- self.wait(1)
-
- Text3 = TextMobject("After"," Horizontal")
- Text3[0].set_color(RED)
- Text4 = TextMobject("Shear Transformation")
-
- Text3.move_to(4*RIGHT+2*UP)
- Text4.move_to(4*RIGHT+1*UP)
-
- trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
- trans_arrow_i.set_color(RED)
- trans_arrow_j.set_color(RED)
-
- rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+4*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), Transform(square,rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
- self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif
deleted file mode 100644
index 9bef1b6..0000000
Binary files a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file3_Horizontal_Shear_gif.gif and /dev/null differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
deleted file mode 100644
index 718e4e0..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear.py
+++ /dev/null
@@ -1,52 +0,0 @@
-from manimlib.imports import *
-
-class Ver_Shear(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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("Before"," Vertical")
- Text1[0].set_color(YELLOW)
- Text2 = TextMobject("Shear Transformation")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
-
- self.setup_axes(animate=False)
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
- arrow_i.set_color(YELLOW)
- arrow_j.set_color(YELLOW)
-
- square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
- self.wait(1)
-
- Text3 = TextMobject("After"," Vertical")
- Text3[0].set_color(RED)
- Text4 = TextMobject("Shear Transformation")
-
- Text3.move_to(4*RIGHT+2*UP)
- Text4.move_to(4*RIGHT+1*UP)
-
- trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
- trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+ 0.25*UP)
- trans_arrow_i.set_color(RED)
- trans_arrow_j.set_color(RED)
-
- rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*UP, self.graph_origin+2*XTD*RIGHT+4*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
- self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), FadeOut(square), ShowCreation(rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
- self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif
deleted file mode 100644
index 7ca323f..0000000
Binary files a/FSF-2020/linear-algebra/linear-transformations/Linear Transformations (Linear Maps)/file4_Vertical_Shear_gif.gif and /dev/null differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
new file mode 100644
index 0000000..577032d
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
@@ -0,0 +1,193 @@
+from manimlib.imports import *
+
+class Rotation(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Understanding Linear Transformations")
+ self.play(Write(introText))
+ self.wait(1)
+
+ introText1 = TextMobject("Visually ... ")
+ introText1.move_to(DOWN)
+ self.play(Write(introText1))
+ self.wait(1)
+ self.play(FadeOut(introText), FadeOut(introText1))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $2\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 2\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*LEFT + 0.25*DOWN, end = self.graph_origin+2*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.25*UP)
+ self.play(ShowCreation(arrow_v))
+
+ Text_i = TextMobject("$\hat{i}$")
+ Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ Text_i.scale(0.75)
+ Text_j = TextMobject("$\hat{j}$")
+ Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ Text_j.scale(0.75)
+
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ self.play(ShowCreation(arrow_i), ShowCreation(arrow_j), Write(Text_i), Write(Text_j))
+
+ Text_2i = TextMobject("$2\hat{i}$")
+ Text_2i.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text_3j = TextMobject("$3\hat{j}$")
+ Text_3j.move_to(self.graph_origin+1*XTD*LEFT+1.5*YTD*UP)
+
+ arrow_2i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+2*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_2i.set_color(YELLOW)
+ arrow_3j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+3*YTD*UP+0.25*UP)
+ arrow_3j.set_color(RED)
+ self.wait(0.5)
+ self.play(Transform(arrow_i,arrow_2i), Transform(arrow_j,arrow_3j), Transform(Text_i,Text_2i), Transform(Text_j,Text_3j))
+ self.play(ApplyMethod(arrow_j.move_to,self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP) , ApplyMethod(Text_j.move_to,self.graph_origin+2.5*XTD*RIGHT+1.5*YTD*UP+ 0.15*RIGHT + 0.25*UP))
+
+ new_Text_v = TextMobject("$\overrightarrow{v}$")
+ new_Text_v.move_to(self.graph_origin+0.5*XTD*RIGHT+1.5*YTD*UP)
+ self.play(Write(new_Text_v))
+
+ new_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ new_arrow_i.set_color(YELLOW)
+ new_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ new_arrow_j.set_color(RED)
+
+ new_Text_i = TextMobject("$\hat{i}$")
+ new_Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ new_Text_i.scale(0.75)
+ new_Text_j = TextMobject("$\hat{j}$")
+ new_Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ new_Text_j.scale(0.75)
+
+ self.wait(1)
+
+ self.play(FadeOut(Text_i),
+ FadeOut(Text_j),
+ FadeOut(arrow_i),
+ FadeOut(arrow_j),
+ ShowCreation(new_arrow_i),
+ ShowCreation(new_arrow_j),
+ Write(new_Text_i),
+ Write(new_Text_j))
+
+ self.play(ApplyMethod(Text1.move_to,4*RIGHT))
+ Text3 = TextMobject("Let the be a linear transformation function")
+ Text3.scale(0.5)
+ Text4 = TextMobject("$T$ which rotates the vectors by angle of $90^{\circ}$")
+ Text4.scale(0.5)
+ Text3.move_to(4*RIGHT+3*UP)
+ Text4.move_to(4*RIGHT+2.5*UP)
+ self.play(Write(Text3), Write(Text4))
+ self.wait(2)
+
+ Text6 = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text6.scale(0.75)
+ Text6.set_color(YELLOW)
+ Text6.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text7 = TextMobject(r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text7.scale(0.75)
+ Text7.set_color(RED)
+ Text7.move_to(self.graph_origin+1*XTD*LEFT+1*YTD*UP)
+
+ self.play(Transform(new_Text_i,Text6))
+ self.play(Transform(new_Text_j,Text7))
+
+ Text5 = TextMobject(r"$\overrightarrow{v} = 2 $", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text5[1].set_color(YELLOW)
+ Text5[3].set_color(RED)
+ Text5.move_to(4*RIGHT)
+
+ self.play(Transform(Text1, Text5))
+ self.wait()
+
+ arrow_modified_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*UP, end = self.graph_origin-(1*YTD*UP+0.25*UP))
+ arrow_modified_i.set_color(YELLOW)
+ arrow_modified_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_modified_j.set_color(RED)
+
+ yellow_i = TextMobject(r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$")
+ yellow_i.set_color(YELLOW).scale(0.75)
+ yellow_i.move_to(self.graph_origin + 1*XTD*DOWN + 1*YTD*LEFT)
+
+ red_j = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ red_j.set_color(RED).scale(0.75)
+ red_j.move_to(self.graph_origin + 1*XTD*UP + 1*YTD*RIGHT)
+
+ Text8 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text8[1].set_color(YELLOW)
+ Text8[3].set_color(RED)
+ Text8.move_to(4*RIGHT+1.5*DOWN)
+ Text8.scale(0.75)
+
+ new_Text__v = TextMobject("$\overrightarrow{v}_{transformed}$")
+ new_Text__v.scale(0.75)
+ arrow_modified_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT + 0.15*UP, end = self.graph_origin+2*XTD*DOWN+3*YTD*RIGHT+ 0.15*DOWN + 0.25*RIGHT)
+ self.play(Transform(arrow_v, arrow_modified_v),
+ Transform(new_arrow_i, arrow_modified_i),
+ Transform(new_arrow_j, arrow_modified_j),
+ Transform(new_Text_i,yellow_i),
+ Transform(new_Text_j,red_j),
+ FadeOut(new_Text_v),
+ ApplyMethod(new_Text__v.move_to,self.graph_origin+3*XTD*RIGHT+0.5*YTD*DOWN),
+ Write(Text8))
+
+ self.play(FadeOut(Text1), FadeOut(Text3), FadeOut(Text4), ApplyMethod(Text8.move_to,4*RIGHT+3*UP))
+
+ Text9 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\hat{i}_{transformed}$", r"+3", r"$\hat{j}_{transformed}$")
+ Text9[1].set_color(YELLOW)
+ Text9[3].set_color(RED)
+ Text9.move_to(4*RIGHT+2*UP)
+ Text9.scale(0.5)
+
+ self.play(Write(Text9))
+
+ v_transformed = TextMobject(r"$\overrightarrow{v}_{transformed} \equiv T(\overrightarrow{v})$")
+ v_transformed.scale(0.75).move_to(4*RIGHT+UP)
+ i_transformed = TextMobject(r"$\hat{i}_{transformed} \equiv T(\hat{i})$")
+ i_transformed.set_color(YELLOW).scale(0.75).move_to(4*RIGHT)
+ j_transformed = TextMobject(r"$\hat{v}_{transformed} \equiv T(\hat{j})$")
+ j_transformed.set_color(RED).scale(0.75).move_to(4*RIGHT+DOWN)
+
+ self.play(Write(v_transformed), Write(i_transformed), Write(j_transformed))
+ self.wait(3)
+
+ Text10 = TextMobject(r"$T(\overrightarrow{v}) = $", r"$\begin{pmatrix} 3 \\ -2 \end{pmatrix}$")
+ Text10[1].set_color(BLUE_E)
+ Text10.move_to(4*RIGHT+1*UP)
+ Text10.scale(0.75)
+
+ self.play(Write(Text10), ApplyMethod(v_transformed.move_to,4*RIGHT+2*UP), FadeOut(i_transformed), FadeOut(j_transformed), FadeOut(Text9))
+ self.wait(1)
+
+ self.play(FadeOut(self.axes),
+ FadeOut(arrow_v),
+ FadeOut(new_arrow_i),
+ FadeOut(new_arrow_j),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_j),
+ FadeOut(new_Text__v),
+ FadeOut(Text10),
+ FadeOut(v_transformed),
+ FadeOut(Text8))
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
new file mode 100644
index 0000000..a7856a5
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class Scaling(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ introText = TextMobject("Uniform Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $3\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 3\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 4, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+3*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ vector_v = TextMobject(r"$\vec{v}$")
+ vector_v.move_to(self.graph_origin + 1*XTD*RIGHT + 2*YTD*UP )
+ self.play(ShowCreation(arrow_v),Write(vector_v))
+ scaling_factor = TextMobject(r"Scaling Factor = $\frac{4}{3}$")
+ scaling_factor.scale(0.75)
+ scaled_vector = TextMobject(r"$T(\vec{v}) = \frac{4}{3} \left[ \begin{array} {c} 3 \\ 3 \end{array} \right] = \left[ \begin{array} {c} 4 \\ 4 \end{array} \right]$")
+ scaled_vector.set_color(DARK_BLUE)
+ scaled_vector.scale(0.75)
+ scaling_factor.move_to(4*RIGHT)
+ scaled_vector.move_to(4*RIGHT+DOWN)
+ self.play(Write(scaling_factor))
+ self.wait()
+ self.play(Write(scaled_vector))
+
+ transformed_arrow_v = Arrow(stroke_width = 2, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+4*XTD*RIGHT+4*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ transformed_arrow_v.set_color(DARK_BLUE)
+ transformed_vector_v = TextMobject(r"$T(\vec{v})$")
+ transformed_vector_v.move_to(self.graph_origin + 4.5*XTD*RIGHT + 4.5*YTD*UP )
+ transformed_vector_v.set_color(DARK_BLUE)
+ self.play(ShowCreation(transformed_arrow_v), Write(transformed_vector_v))
+
+ self.wait()
+
+ represent_text1 = TextMobject("Representation of scaling")
+ represent_text2 = TextMobject("of vectors in point form")
+ represent_text1.move_to(4*RIGHT+3*UP)
+ represent_text2.move_to(4*RIGHT+2*UP)
+ self.play(Write(represent_text1), Write(represent_text2))
+
+ dot_init = Dot(self.graph_origin+3*XTD*RIGHT+3*YTD*UP)
+ dot_trans = Dot(self.graph_origin+4*XTD*RIGHT+4*YTD*UP)
+
+ self.play(ApplyMethod(vector_v.move_to,self.graph_origin+2.5*XTD*RIGHT+2.5*YTD*UP),
+ ApplyMethod(transformed_vector_v.move_to,self.graph_origin+4.5*XTD*RIGHT+4.5*YTD*UP),
+ ShowCreation(dot_init),
+ Transform(arrow_v,dot_init),
+ Transform(transformed_arrow_v,dot_trans))
+
+ self.wait(2)
+
+ self.play(FadeOut(dot_init),
+ FadeOut(arrow_v),
+ FadeOut(transformed_arrow_v),
+ FadeOut(represent_text1),
+ FadeOut(represent_text2),
+ FadeOut(self.axes),
+ FadeOut(scaling_factor),
+ FadeOut(scaled_vector),
+ FadeOut(transformed_vector_v),
+ FadeOut(vector_v),
+ FadeOut(Text1))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
new file mode 100644
index 0000000..91f098e
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
@@ -0,0 +1,53 @@
+from manimlib.imports import *
+
+class Hori_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Horizontal")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Horizontal")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+4*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), Transform(square,rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif
new file mode 100644
index 0000000..9bef1b6
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
new file mode 100644
index 0000000..718e4e0
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
@@ -0,0 +1,52 @@
+from manimlib.imports import *
+
+class Ver_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Vertical")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Vertical")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+ 0.25*UP)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*UP, self.graph_origin+2*XTD*RIGHT+4*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), FadeOut(square), ShowCreation(rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif
new file mode 100644
index 0000000..7ca323f
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif differ
--
cgit
From 1e686327480f17e623f1aa51885ba44a7486ae99 Mon Sep 17 00:00:00 2001
From: stayaryan
Date: Tue, 26 May 2020 13:34:16 +0530
Subject: Update README.md
---
FSF-2020/calculus/intro-to-calculus/README.md | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/intro-to-calculus/README.md b/FSF-2020/calculus/intro-to-calculus/README.md
index e69de29..a417361 100644
--- a/FSF-2020/calculus/intro-to-calculus/README.md
+++ b/FSF-2020/calculus/intro-to-calculus/README.md
@@ -0,0 +1,8 @@
+Contributor: Aryan Singh
+Subtopics covered
+ - When do limits exist?
+ - How Fast am I going?-An intro to derivatives
+ - Infinte sums in a nutshell(Riemann integrals)
+ - Fundamental Theorem of calculus
+ - Volume and surface area of Gabriel's Horn
+ - Infinite sequences and series
--
cgit
From 3cbdadc15fd43741da0593dc28c793f5bc4f4605 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:37:12 +0530
Subject: Create README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/README.md b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -0,0 +1 @@
+
--
cgit
From d6ca601016946a89ac1075e6053a34238a7e7747 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:38:49 +0530
Subject: Add files via upload
---
.../Power Series/gifs/file2_convergence_Intuition.gif | Bin 0 -> 98910 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/gifs/file2_convergence_Intuition.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file2_convergence_Intuition.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file2_convergence_Intuition.gif
new file mode 100644
index 0000000..9463ac2
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file2_convergence_Intuition.gif differ
--
cgit
From 2f42a032081080b48b621f5e5dd2d8501ff742f4 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:40:14 +0530
Subject: Update README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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 8b13789..ff82d8a 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1 +1 @@
-
+![GIF1](\gifs\file2_convergence_Intuition.gif)
--
cgit
From 428291edcb643526c6b3b23d27004457c9cb074a Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:40:40 +0530
Subject: Update README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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 ff82d8a..17fd0a8 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1 +1 @@
-![GIF1](\gifs\file2_convergence_Intuition.gif)
+![GIF1](gifs\file2_convergence_Intuition.gif)
--
cgit
From d9996901cc7d1039f45c4163792d77066223811c Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:40:57 +0530
Subject: Update README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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 17fd0a8..daf65fe 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1 +1 @@
-![GIF1](gifs\file2_convergence_Intuition.gif)
+![GIF1](file2_convergence_Intuition.gif)
--
cgit
From 37506a553accfe614fc6d84b6f37c1ed4d2193b6 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:43:09 +0530
Subject: Update README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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 daf65fe..d06a3a5 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1 +1 @@
-![GIF1](file2_convergence_Intuition.gif)
+![GIF1](gifs/file2_convergence_Intuition.gif)
--
cgit
From ed2614068a6f37ea7913d48e38356ef84ed22729 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:56:54 +0530
Subject: Add files via upload
---
.../gifs/file3_convergence_of_a_function.gif | Bin 0 -> 415313 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/gifs/file3_convergence_of_a_function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file3_convergence_of_a_function.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file3_convergence_of_a_function.gif
new file mode 100644
index 0000000..836e044
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file3_convergence_of_a_function.gif differ
--
cgit
From ef8ccf090a9a02a82ea1551dcd633dc4900358a1 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 13:57:38 +0530
Subject: Update README.md
---
FSF-2020/calculus/series-and-transformations/Power Series/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
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 d06a3a5..acf07b7 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1 +1,3 @@
![GIF1](gifs/file2_convergence_Intuition.gif)
+
+![GIF2](gifs/file3_convergence_of_a_function.gif)
--
cgit
From f1aae8412472c2039dd3323427ea416f7092db7b Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:32:23 +0530
Subject: Add files via upload
---
.../Power Series/PowerSeriesQuestions.pdf | Bin 112622 -> 118730 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf b/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf
index 04ed6d5..9fc409b 100644
Binary files a/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf and b/FSF-2020/calculus/series-and-transformations/Power Series/PowerSeriesQuestions.pdf differ
--
cgit
From 5a2423fa9b3b66f109336f003b087bbcc57e9598 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:33:06 +0530
Subject: Delete script1.py
---
.../Power Series/script1.py | 128 ---------------------
1 file changed, 128 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script1.py b/FSF-2020/calculus/series-and-transformations/Power Series/script1.py
deleted file mode 100644
index 28eb07c..0000000
--- a/FSF-2020/calculus/series-and-transformations/Power Series/script1.py
+++ /dev/null
@@ -1,128 +0,0 @@
-from manimlib.imports import *
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- expansion.scale(0.7)
- return expansion
-
-class pieChart(Scene):
- def construct(self):
- circle1=Circle(radius=3,color=BLUE)
- powerText=TextMobject("Power Series")
- powerText.scale(0.8)
- self.play(FadeIn(powerText))
- self.play(ShowCreation(circle1))
- self.wait(1)
-
- powerGroup=VGroup(circle1,powerText)
-
- self.play(ApplyMethod(powerGroup.scale,0.5))
- self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
- self.wait(0.5)
- expansion_power_coeff=[]
- variables_power=[]
- expansion_power=formFormula(expansion_power_coeff,variables_power)
- self.play(ReplacementTransform(powerText,expansion_power))
- self.wait(1)
-
- circle2=Circle(radius=1.5)
- circle2.shift(2.2*UP)
- expansion_geo_coeff=[0]*3
- variables_geo=[0]*3
- arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
- expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_geo_coeff[i].set_color(GOLD_A)
- variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
- if i!=2:
- expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_geo[2])
- expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
- expansion_geo.scale(0.7)
-
- self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
- self.add(arrow1_2)
- self.wait(1)
-
- ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
- for i in range(0,3):
- ones[i].set_color(GOLD_A)
- ones[0].shift(0.3*DOWN,5*LEFT)
- ones[1].next_to(ones[0],buff=0.5)
- ones[2].next_to(ones[1],buff=0.7)
- self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
- self.wait(1)
- expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
-
- expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
- expansion_geo_final.scale(0.8)
- expansion_geo_final.shift(0.3*DOWN+4*LEFT)
- self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
- self.wait(1)
-
- circle3=Circle(radius=1.5,color=GREEN)
- circle3.shift(2.2*UP)
- expansion_taylor_coeff=[0]*3
- variables_taylor=[0]*3
- arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
- expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- for i in range(0,3):
- expansion_taylor_coeff[i].set_color(GOLD_A)
- variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
- if i!=2:
- expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variables_taylor[2])
- expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
- expansion_taylor.scale(0.7)
-
- self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
- self.add(arrow1_3)
- self.wait(1)
-
- differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
- for i in range(0,3):
- differentials[i].set_color(GOLD_A)
- differentials[0].shift(1.8*DOWN+1.15*LEFT)
- differentials[1].shift(1.8*DOWN+0.45*LEFT)
- differentials[2].shift(1.8*DOWN+0.45*RIGHT)
- differentials[0].scale(0.35)
- differentials[1].scale(0.35)
- differentials[2].scale(0.35)
- self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
- self.wait(2)
- expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
-
- self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
- geoText=TextMobject("Geometric Series")
- geoText.scale(0.7)
- geoText.shift(4*LEFT+0.3*DOWN)
- taylorText=TextMobject("Taylor Series")
- taylorText.scale(0.7)
- taylorText.shift(1.8*DOWN)
- self.play(FadeIn(geoText),FadeIn(taylorText))
- self.wait(1)
-
- soOntext=TextMobject("So on..!")
- soOntext.shift(4*RIGHT)
- soOntext.scale(0.8)
- self.play(FadeIn(soOntext))
- self.wait(2)
--
cgit
From 3a3da8845f29e8bf3b1f6ea9d2938eadd80cb1f6 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:33:14 +0530
Subject: Delete script2.py
---
.../Power Series/script2.py | 94 ----------------------
1 file changed, 94 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script2.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script2.py b/FSF-2020/calculus/series-and-transformations/Power Series/script2.py
deleted file mode 100644
index 72356c6..0000000
--- a/FSF-2020/calculus/series-and-transformations/Power Series/script2.py
+++ /dev/null
@@ -1,94 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-
-class convergence(Scene):
- def construct(self):
- originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
- originalFormula.set_color(RED)
- self.play(Write(originalFormula))
- self.wait(1)
- self.play(ApplyMethod(originalFormula.shift,2.7*UP))
- self.wait(1)
-
- terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
- termsTogetherString="+".join(terms)
- termsTogether=TextMobject(termsTogetherString+"...")
- termsTogether.scale(0.8)
- termsTogether.shift(2.7*UP)
- self.play(ReplacementTransform(originalFormula,termsTogether))
- self.wait(1)
-
- termMobjectRect=[0]*12
- termMobject=TextMobject(terms[0])
- termMobject.shift(2.7*UP+6.2*LEFT)
- for i in range(1,13):
- termMobjectOld=termMobject
- termMobjectOld.scale(0.8)
- if(i<12):
- termMobject=TextMobject(terms[i])
- termMobject.next_to(termMobjectOld)
- if(i==1):
- rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
- rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
- rectDefine.scale(0.7)
- rectDefine.shift(3.2*DOWN)
- self.play(Write(rectDefine))
- self.wait(1)
- if(i==2):
- ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
- ratio.set_color(RED)
- ratio.scale(0.7)
- ratio.move_to(3.2*DOWN)
- inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
- inequality.set_color(RED)
- inequality.scale(0.7)
- inequality.move_to(3.2*DOWN)
- self.play(FadeOut(rectDefine))
- self.play(Write(ratio))
- self.wait(1)
- self.play(ReplacementTransform(ratio,inequality))
- self.wait(1)
- #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
- termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
- termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
- #rectangles[p] = termMobjectRect
- #p+=1
- self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
-
- uparrow=TextMobject("$\\uparrow$")
- uparrow.set_color(GREEN)
- uparrow.scale(6)
- uparrow.shift(4*RIGHT+0.5*DOWN)
- self.play(ShowCreation(uparrow))
- self.wait(1)
-
- converges=TextMobject("Converges!")
- converges.set_color(RED)
- converges.scale(0.6)
- converges.next_to(uparrow)
- self.play(FadeIn(converges))
- self.wait(2)
-
- self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
- self.wait(0.5)
- rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
- self.play(ApplyMethod(rect.scale,0.2))
- for i in range(0,12):
- self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
- func=TextMobject("$\\approx$","$f(x)$")
- func.set_color_by_tex_to_color_map({"$f(x)$":RED})
- func.scale(0.8)
- func.shift(DOWN+4.5*RIGHT+0.1*UP)
- self.play(FadeIn(func))
-
- rightarrow=TextMobject("$\\rightarrow$")
- rightarrow.set_color(GREEN)
- rightarrow.scale(4)
- rightarrow.shift(2*DOWN)
- converges=TextMobject("Hence even the","sum converges!")
- converges.set_color_by_tex_to_color_map({"sum converges!":RED})
- converges.move_to(3*DOWN)
- converges.scale(0.7)
- self.play(Write(rightarrow),FadeIn(converges))
- self.wait(2)
--
cgit
From 6e570da33384e47c5c6533f50f06342be29e4e4d Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:33:30 +0530
Subject: Add files via upload
---
.../Power Series/video1_pieChart.py | 128 +++++++++++++++++++++
.../Power Series/video2_convergence_Intuition.py | 94 +++++++++++++++
2 files changed, 222 insertions(+)
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/video1_pieChart.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_Intuition.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video1_pieChart.py b/FSF-2020/calculus/series-and-transformations/Power Series/video1_pieChart.py
new file mode 100644
index 0000000..28eb07c
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video1_pieChart.py
@@ -0,0 +1,128 @@
+from manimlib.imports import *
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ expansion.scale(0.7)
+ return expansion
+
+class pieChart(Scene):
+ def construct(self):
+ circle1=Circle(radius=3,color=BLUE)
+ powerText=TextMobject("Power Series")
+ powerText.scale(0.8)
+ self.play(FadeIn(powerText))
+ self.play(ShowCreation(circle1))
+ self.wait(1)
+
+ powerGroup=VGroup(circle1,powerText)
+
+ self.play(ApplyMethod(powerGroup.scale,0.5))
+ self.play(ApplyMethod(powerGroup.move_to,2.2*UP))
+ self.wait(0.5)
+ expansion_power_coeff=[]
+ variables_power=[]
+ expansion_power=formFormula(expansion_power_coeff,variables_power)
+ self.play(ReplacementTransform(powerText,expansion_power))
+ self.wait(1)
+
+ circle2=Circle(radius=1.5)
+ circle2.shift(2.2*UP)
+ expansion_geo_coeff=[0]*3
+ variables_geo=[0]*3
+ arrow1_2=Line(start=0.7*UP,end=2.5*LEFT)
+ expansion_geo_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_geo_coeff[i].set_color(GOLD_A)
+ variables_geo=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_geo_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_geo[i].next_to(expansion_geo_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_geo_coeff[i+1].next_to(variables_geo[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_geo[2])
+ expansion_geo=VGroup(expansion_geo_coeff[0],expansion_geo_coeff[1],expansion_geo_coeff[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+ expansion_geo.scale(0.7)
+
+ self.play(ApplyMethod(circle2.shift,4*LEFT+2.5*DOWN),ApplyMethod(expansion_geo.shift,4*LEFT+2.5*DOWN))
+ self.add(arrow1_2)
+ self.wait(1)
+
+ ones=[TextMobject("1"),TextMobject("1"),TextMobject("1")]
+ for i in range(0,3):
+ ones[i].set_color(GOLD_A)
+ ones[0].shift(0.3*DOWN,5*LEFT)
+ ones[1].next_to(ones[0],buff=0.5)
+ ones[2].next_to(ones[1],buff=0.7)
+ self.play(ReplacementTransform(expansion_geo_coeff[0],ones[0]),ReplacementTransform(expansion_geo_coeff[1],ones[1]),ReplacementTransform(expansion_geo_coeff[2],ones[2]))
+ self.wait(1)
+ expansion_geo=VGroup(ones[0],ones[1],ones[2],variables_geo[0],variables_geo[1],variables_geo[2],dots)
+
+ expansion_geo_final=TextMobject("$1+x+{ x }^{ 2 }..$")
+ expansion_geo_final.scale(0.8)
+ expansion_geo_final.shift(0.3*DOWN+4*LEFT)
+ self.play(ReplacementTransform(expansion_geo,expansion_geo_final))
+ self.wait(1)
+
+ circle3=Circle(radius=1.5,color=GREEN)
+ circle3.shift(2.2*UP)
+ expansion_taylor_coeff=[0]*3
+ variables_taylor=[0]*3
+ arrow1_3=Line(start=0.7*UP,end=DOWN*0.3)
+ expansion_taylor_coeff=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ for i in range(0,3):
+ expansion_taylor_coeff[i].set_color(GOLD_A)
+ variables_taylor=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ expansion_taylor_coeff[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ variables_taylor[i].next_to(expansion_taylor_coeff[i],buff=0.1)
+ if i!=2:
+ expansion_taylor_coeff[i+1].next_to(variables_taylor[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variables_taylor[2])
+ expansion_taylor=VGroup(expansion_taylor_coeff[0],expansion_taylor_coeff[1],expansion_taylor_coeff[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+ expansion_taylor.scale(0.7)
+
+ self.play(ApplyMethod(circle3.shift,4*DOWN),ApplyMethod(expansion_taylor.shift,4*DOWN))
+ self.add(arrow1_3)
+ self.wait(1)
+
+ differentials=[TextMobject("$f(0)$"),TextMobject("${ f'\left( 0 \\right) }$"),TextMobject("$\\frac { f''\left( 0 \\right) }{ 2! }$")]
+ for i in range(0,3):
+ differentials[i].set_color(GOLD_A)
+ differentials[0].shift(1.8*DOWN+1.15*LEFT)
+ differentials[1].shift(1.8*DOWN+0.45*LEFT)
+ differentials[2].shift(1.8*DOWN+0.45*RIGHT)
+ differentials[0].scale(0.35)
+ differentials[1].scale(0.35)
+ differentials[2].scale(0.35)
+ self.play(ReplacementTransform(expansion_taylor_coeff[0],differentials[0]),ReplacementTransform(expansion_taylor_coeff[1],differentials[1]),ReplacementTransform(expansion_taylor_coeff[2],differentials[2]))
+ self.wait(2)
+ expansion_taylor_final=VGroup(differentials[0],differentials[1],differentials[2],variables_taylor[0],variables_taylor[1],variables_taylor[2],dots)
+
+ self.play(FadeOut(expansion_geo_final),FadeOut(expansion_taylor_final))
+ geoText=TextMobject("Geometric Series")
+ geoText.scale(0.7)
+ geoText.shift(4*LEFT+0.3*DOWN)
+ taylorText=TextMobject("Taylor Series")
+ taylorText.scale(0.7)
+ taylorText.shift(1.8*DOWN)
+ self.play(FadeIn(geoText),FadeIn(taylorText))
+ self.wait(1)
+
+ soOntext=TextMobject("So on..!")
+ soOntext.shift(4*RIGHT)
+ soOntext.scale(0.8)
+ self.play(FadeIn(soOntext))
+ self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_Intuition.py b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_Intuition.py
new file mode 100644
index 0000000..72356c6
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video2_convergence_Intuition.py
@@ -0,0 +1,94 @@
+from manimlib.imports import *
+import numpy as np
+
+
+class convergence(Scene):
+ def construct(self):
+ originalFormula=TextMobject("$\sum _{ n=0 }^{ \infty }{ { a }_{ n }{ x }^{ n } }$")
+ originalFormula.set_color(RED)
+ self.play(Write(originalFormula))
+ self.wait(1)
+ self.play(ApplyMethod(originalFormula.shift,2.7*UP))
+ self.wait(1)
+
+ terms=["$a_{ 0 }$","$a_{ 1 }x$","$a_{ 2 }x^{ 2 }$","$a_{ 3 }x^{ 3 }$","$a_{ 4 }x^{ 4 }$","$a_{ 5 }x^{ 5 }$","$a_{ 6 }x^{ 6 }$","$a_{ 7 }x^{ 7 }$","$a_{ 8 }x^{ 8 }$","$a_{ 9 }x^{ 9 }$","$a_{ 10 }x^{ 10 }$","$a_{ 11 }x^{ 11 }$"]
+ termsTogetherString="+".join(terms)
+ termsTogether=TextMobject(termsTogetherString+"...")
+ termsTogether.scale(0.8)
+ termsTogether.shift(2.7*UP)
+ self.play(ReplacementTransform(originalFormula,termsTogether))
+ self.wait(1)
+
+ termMobjectRect=[0]*12
+ termMobject=TextMobject(terms[0])
+ termMobject.shift(2.7*UP+6.2*LEFT)
+ for i in range(1,13):
+ termMobjectOld=termMobject
+ termMobjectOld.scale(0.8)
+ if(i<12):
+ termMobject=TextMobject(terms[i])
+ termMobject.next_to(termMobjectOld)
+ if(i==1):
+ rectDefine=TextMobject("Here","each rectangle","represents the","value of the term")
+ rectDefine.set_color_by_tex_to_color_map({"each rectangle":BLUE,"value of the term":YELLOW})
+ rectDefine.scale(0.7)
+ rectDefine.shift(3.2*DOWN)
+ self.play(Write(rectDefine))
+ self.wait(1)
+ if(i==2):
+ ratio=TextMobject("If $\\frac { a_{ n+1 } }{ { a }_{ n } } < 1$")
+ ratio.set_color(RED)
+ ratio.scale(0.7)
+ ratio.move_to(3.2*DOWN)
+ inequality=TextMobject("$a_{ n+1 } < a_{ n }$")
+ inequality.set_color(RED)
+ inequality.scale(0.7)
+ inequality.move_to(3.2*DOWN)
+ self.play(FadeOut(rectDefine))
+ self.play(Write(ratio))
+ self.wait(1)
+ self.play(ReplacementTransform(ratio,inequality))
+ self.wait(1)
+ #self.play(ApplyMethod(termMobjectOld.move_to,(2-0.3*i)*DOWN+RIGHT*0.2*i))
+ termMobjectRect[i-1]=Rectangle(height=0.1,width=(5-0.4*i))
+ termMobjectRect[i-1].move_to((2-0.2*i)*DOWN+RIGHT*0.2*i)
+ #rectangles[p] = termMobjectRect
+ #p+=1
+ self.play(ReplacementTransform(termMobjectOld,termMobjectRect[i-1]))
+
+ uparrow=TextMobject("$\\uparrow$")
+ uparrow.set_color(GREEN)
+ uparrow.scale(6)
+ uparrow.shift(4*RIGHT+0.5*DOWN)
+ self.play(ShowCreation(uparrow))
+ self.wait(1)
+
+ converges=TextMobject("Converges!")
+ converges.set_color(RED)
+ converges.scale(0.6)
+ converges.next_to(uparrow)
+ self.play(FadeIn(converges))
+ self.wait(2)
+
+ self.play(FadeOut(converges),FadeOut(uparrow),FadeOut(inequality))
+ self.wait(0.5)
+ rect=VGroup(termMobjectRect[0],termMobjectRect[1],termMobjectRect[2],termMobjectRect[3],termMobjectRect[4],termMobjectRect[5],termMobjectRect[6],termMobjectRect[7],termMobjectRect[8],termMobjectRect[9],termMobjectRect[10],termMobjectRect[11])
+ self.play(ApplyMethod(rect.scale,0.2))
+ for i in range(0,12):
+ self.play(ApplyMethod(termMobjectRect[i].shift,i*0.04*DOWN+(11-(3-0.11*i)*i)*LEFT*0.3))
+ func=TextMobject("$\\approx$","$f(x)$")
+ func.set_color_by_tex_to_color_map({"$f(x)$":RED})
+ func.scale(0.8)
+ func.shift(DOWN+4.5*RIGHT+0.1*UP)
+ self.play(FadeIn(func))
+
+ rightarrow=TextMobject("$\\rightarrow$")
+ rightarrow.set_color(GREEN)
+ rightarrow.scale(4)
+ rightarrow.shift(2*DOWN)
+ converges=TextMobject("Hence even the","sum converges!")
+ converges.set_color_by_tex_to_color_map({"sum converges!":RED})
+ converges.move_to(3*DOWN)
+ converges.scale(0.7)
+ self.play(Write(rightarrow),FadeIn(converges))
+ self.wait(2)
--
cgit
From 0f6097a427663085ac4d373d77e9c7c9aca4c5a7 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:34:22 +0530
Subject: Rename script3.py to video3_convergence_of_a_function.py
---
.../Power Series/script3.py | 156 ---------------------
.../video3_convergence_of_a_function.py | 156 +++++++++++++++++++++
2 files changed, 156 insertions(+), 156 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script3.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/video3_convergence_of_a_function.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script3.py b/FSF-2020/calculus/series-and-transformations/Power Series/script3.py
deleted file mode 100644
index f710f42..0000000
--- a/FSF-2020/calculus/series-and-transformations/Power Series/script3.py
+++ /dev/null
@@ -1,156 +0,0 @@
-from manimlib.imports import*
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Let's analyse")
- introText2=TextMobject("for")
- function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
- function_main.set_color(GREEN)
- introText1.scale(1.2)
- introText1.shift(2*UP)
- introText2.scale(0.7)
- introText2.shift(UP)
- function_main.scale(2)
- function_main.shift(DOWN)
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(1.2)
- function_expan.shift(2*UP)
-
- self.play(Write(introText1))
- self.play(FadeIn(introText2))
- self.wait(0.5)
- self.play(Write(function_main))
- self.wait(1)
-
- self.play(FadeOut(introText1),FadeOut(introText2))
- self.play(ApplyMethod(function_main.shift,3*UP))
- self.wait(0.5)
- self.play(ReplacementTransform(function_main,function_expan))
- self.wait(1)
- self.play(ApplyMethod(function_expan.scale,0.5))
- function_expan.to_edge(UP+RIGHT)
- self.play(ReplacementTransform(function_expan,function_expan))
- self.wait(1)
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1)
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.set_color(RED)
- function_expan.scale(0.6)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes(animate=True)
-
- eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
- for i in range(0,len(eqText)):
- 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)
- equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
- equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
- equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
- equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
- equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
- equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
- equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
-
- textBtwAnim1=TextMobject("Here the graph just","oscilates")
- textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
- textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
- textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
- textBtwAnim3=TextMobject("$x=1$")
- textBtwAnim1.scale(0.4)
- textBtwAnim2.scale(0.4)
- textBtwAnim3.scale(1.2)
- textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
- textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
- textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
-
- self.play(ShowCreation(equation1),run_time=0.8)
- self.add(eqText[0])
- self.wait(1)
- self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
- self.wait(0.4)
- self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
- self.wait(0.3)
- self.play(FadeOut(eqText[3]))
- self.play(FadeIn(eqTextTerm))
- self.play(Write(textBtwAnim1),Write(textBtwAnim2))
- self.play(FadeIn(textBtwAnim3))
- self.play(ReplacementTransform(equation4,equation5))
- self.wait(0.2)
- self.play(ReplacementTransform(equation5,equation6))
- self.wait(0.2)
- self.play(ReplacementTransform(equation6,equation7))
- self.wait(0.2)
- self.play(ReplacementTransform(equation7,equation8))
- self.wait(0.2)
- self.play(ReplacementTransform(equation8,equation9))
- self.wait(0.2)
- self.play(ReplacementTransform(equation9,equation10))
- self.wait(1)
-
- self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
- self.wait(1)
-
- convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
- divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
- divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
- circle1=Circle(radius=0.01,color=PURPLE_E)
- circle2=Circle(radius=0.01,color=PURPLE_E)
- circle1.shift(ORIGIN+LEFT*x_each_unit)
- circle2.shift(ORIGIN+RIGHT*x_each_unit)
- convergeText=TextMobject("Converges")
- divergeText1=TextMobject("Diverges")
- divergeText2=TextMobject("Diverges")
- convergeText.set_color(GREEN)
- divergeText1.set_color(RED)
- divergeText2.set_color(RED)
- convergeText.scale(0.5)
- divergeText1.scale(0.5)
- divergeText2.scale(0.5)
- convergeText.shift(1.6*UP)
- divergeText1.shift(0.3*UP+1.5*LEFT)
- divergeText2.shift(0.3*UP+1.5*RIGHT)
- self.play(Write(divergeLineLeft),Write(divergeLineRight))
- self.play(FadeIn(convergeLine))
- self.wait(0.5)
- self.play(FadeOut(self.axes))
- self.play(Write(circle1),Write(circle2))
- self.wait(0.5)
- self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
- self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
- self.wait(2)
-
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video3_convergence_of_a_function.py b/FSF-2020/calculus/series-and-transformations/Power Series/video3_convergence_of_a_function.py
new file mode 100644
index 0000000..f710f42
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video3_convergence_of_a_function.py
@@ -0,0 +1,156 @@
+from manimlib.imports import*
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Let's analyse")
+ introText2=TextMobject("for")
+ function_main=TextMobject("$\sum { { (-1) }^{ n }{ x }^{ 2n } }$")
+ function_main.set_color(GREEN)
+ introText1.scale(1.2)
+ introText1.shift(2*UP)
+ introText2.scale(0.7)
+ introText2.shift(UP)
+ function_main.scale(2)
+ function_main.shift(DOWN)
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(1.2)
+ function_expan.shift(2*UP)
+
+ self.play(Write(introText1))
+ self.play(FadeIn(introText2))
+ self.wait(0.5)
+ self.play(Write(function_main))
+ self.wait(1)
+
+ self.play(FadeOut(introText1),FadeOut(introText2))
+ self.play(ApplyMethod(function_main.shift,3*UP))
+ self.wait(0.5)
+ self.play(ReplacementTransform(function_main,function_expan))
+ self.wait(1)
+ self.play(ApplyMethod(function_expan.scale,0.5))
+ function_expan.to_edge(UP+RIGHT)
+ self.play(ReplacementTransform(function_expan,function_expan))
+ self.wait(1)
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1)
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.set_color(RED)
+ function_expan.scale(0.6)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes(animate=True)
+
+ eqText=[TextMobject("$1$"),TextMobject("$1-{ x }^{ 2 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }$"),TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }$")]
+ for i in range(0,len(eqText)):
+ 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)
+ equation4 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6),color = RED,x_min = -1.45,x_max=1.45)
+ equation5 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8),color = RED,x_min = -1.35,x_max=1.35)
+ equation6 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10),color = RED,x_min = -1.3,x_max=1.3)
+ equation7 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12),color = RED,x_min = -1.25,x_max=1.25)
+ equation8 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14),color = RED,x_min = -1.2,x_max=1.2)
+ equation9 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16),color = RED,x_min = -1.15,x_max=1.15)
+ equation10 = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.15,x_max=1.15)
+
+ textBtwAnim1=TextMobject("Here the graph just","oscilates")
+ textBtwAnim1.set_color_by_tex_to_color_map({"oscilates":BLUE})
+ textBtwAnim2=TextMobject("after","the","point","(as we add higher order terms)")
+ textBtwAnim2.set_color_by_tex_to_color_map({"after":BLUE,"point":YELLOW})
+ textBtwAnim3=TextMobject("$x=1$")
+ textBtwAnim1.scale(0.4)
+ textBtwAnim2.scale(0.4)
+ textBtwAnim3.scale(1.2)
+ textBtwAnim1.shift(2.1*DOWN+4.3*RIGHT)
+ textBtwAnim2.shift(2.4*DOWN+4.1*RIGHT)
+ textBtwAnim3.shift(2.9*DOWN+4.3*RIGHT)
+
+ self.play(ShowCreation(equation1),run_time=0.8)
+ self.add(eqText[0])
+ self.wait(1)
+ self.play(ReplacementTransform(equation1,equation2),ReplacementTransform(eqText[0],eqText[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equation2,equation3),ReplacementTransform(eqText[1],eqText[2]))
+ self.wait(0.4)
+ self.play(ReplacementTransform(equation3,equation4),ReplacementTransform(eqText[2],eqText[3]))
+ self.wait(0.3)
+ self.play(FadeOut(eqText[3]))
+ self.play(FadeIn(eqTextTerm))
+ self.play(Write(textBtwAnim1),Write(textBtwAnim2))
+ self.play(FadeIn(textBtwAnim3))
+ self.play(ReplacementTransform(equation4,equation5))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation5,equation6))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation6,equation7))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation7,equation8))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation8,equation9))
+ self.wait(0.2)
+ self.play(ReplacementTransform(equation9,equation10))
+ self.wait(1)
+
+ self.play(FadeOut(textBtwAnim1),FadeOut(textBtwAnim2),FadeOut(textBtwAnim3),FadeOut(equation10),FadeOut(eqTextTerm))
+ self.wait(1)
+
+ convergeLine=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*RIGHT,color=WHITE)
+ divergeLineLeft=Line(start=ORIGIN+x_each_unit*LEFT,end=ORIGIN+x_each_unit*LEFT*8,color=RED)
+ divergeLineRight=Line(start=ORIGIN+x_each_unit*RIGHT,end=ORIGIN+x_each_unit*8*RIGHT,color=RED)
+ circle1=Circle(radius=0.01,color=PURPLE_E)
+ circle2=Circle(radius=0.01,color=PURPLE_E)
+ circle1.shift(ORIGIN+LEFT*x_each_unit)
+ circle2.shift(ORIGIN+RIGHT*x_each_unit)
+ convergeText=TextMobject("Converges")
+ divergeText1=TextMobject("Diverges")
+ divergeText2=TextMobject("Diverges")
+ convergeText.set_color(GREEN)
+ divergeText1.set_color(RED)
+ divergeText2.set_color(RED)
+ convergeText.scale(0.5)
+ divergeText1.scale(0.5)
+ divergeText2.scale(0.5)
+ convergeText.shift(1.6*UP)
+ divergeText1.shift(0.3*UP+1.5*LEFT)
+ divergeText2.shift(0.3*UP+1.5*RIGHT)
+ self.play(Write(divergeLineLeft),Write(divergeLineRight))
+ self.play(FadeIn(convergeLine))
+ self.wait(0.5)
+ self.play(FadeOut(self.axes))
+ self.play(Write(circle1),Write(circle2))
+ self.wait(0.5)
+ self.play(ApplyMethod(convergeLine.shift,1.3*UP),ApplyMethod(function_expan.shift,5*LEFT+DOWN))
+ self.play(FadeIn(convergeText),FadeIn(divergeText1),FadeIn(divergeText2))
+ self.wait(2)
+
--
cgit
From 121c40ed2c33708e6c633ce69654526671af0147 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:34:49 +0530
Subject: Rename script4.py to video4_radius_and_intervalOfConvergence.py
---
.../Power Series/script4.py | 108 ---------------------
.../video4_radius_and_intervalOfConvergence.py | 108 +++++++++++++++++++++
2 files changed, 108 insertions(+), 108 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script4.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/video4_radius_and_intervalOfConvergence.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script4.py b/FSF-2020/calculus/series-and-transformations/Power Series/script4.py
deleted file mode 100644
index 412d20c..0000000
--- a/FSF-2020/calculus/series-and-transformations/Power Series/script4.py
+++ /dev/null
@@ -1,108 +0,0 @@
-from manimlib.imports import *
-import math
-
-class intro(Scene):
- def construct(self):
- introText1=TextMobject("Consider the","above","example..")
- introText1.scale(0.8)
- introText1.set_color_by_tex_to_color_map({"above":YELLOW})
- self.play(Write(introText1))
- self.wait(1)
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -5,
- "x_max": 5,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-1, 2, 1),
- "y_labeled_nums": range(0,2,1),
- "y_axis_height":7,
- "x_axis_width":7
- }
-
- 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)
-
- function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
- function_expan.scale(0.6)
- function_expan.set_color(RED)
- function_expan.to_edge(UP+RIGHT)
- self.add(function_expan)
-
- self.setup_axes()
-
- equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
- self.play(ShowCreation(equation))
- self.wait(1)
-
- dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
- dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
- dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
- radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
- rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
- circle=Circle(radius=x_each_unit)
- movingPoint=Circle(radius=0.025)
- movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
- circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
- circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
-
- self.play(Write(dashLineLeft),Write(dashLineRight))
- self.wait(1)
-
- equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
- self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
- self.wait(0.5)
- self.play(Write(radiusLine))
- self.play(MoveAlongPath(movingPoint,circleEq1))
- self.play(MoveAlongPath(movingPoint,circleEq2))
- self.play(FadeIn(circle))
- self.wait(1)
-
- radiusText=TextMobject("Radius of convergence")
- radiusText.scale(0.14)
- radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
-
- self.play(Write(radiusText))
- self.wait(0.6)
-
- 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.3)
-
- self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
- extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
- self.play(Write(extendLine))
- doubleArrow=TextMobject("$\longleftrightarrow$")
- doubleArrow.scale(1.6)
- doubleArrow.set_color(BLUE)
- doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
- self.play(FadeIn(doubleArrow))
- self.wait(1)
- rangeText=TextMobject("Interval of convergence")
- rangeText.scale(0.15)
- rangeText.shift(ORIGIN+y_each_unit*DOWN)
- self.play(Write(rangeText))
- self.wait(0.6)
-
- 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_radius_and_intervalOfConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video4_radius_and_intervalOfConvergence.py
new file mode 100644
index 0000000..412d20c
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video4_radius_and_intervalOfConvergence.py
@@ -0,0 +1,108 @@
+from manimlib.imports import *
+import math
+
+class intro(Scene):
+ def construct(self):
+ introText1=TextMobject("Consider the","above","example..")
+ introText1.scale(0.8)
+ introText1.set_color_by_tex_to_color_map({"above":YELLOW})
+ self.play(Write(introText1))
+ self.wait(1)
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-1, 2, 1),
+ "y_labeled_nums": range(0,2,1),
+ "y_axis_height":7,
+ "x_axis_width":7
+ }
+
+ 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)
+
+ function_expan=TextMobject("$1-{ x }^{ 2 }+{ x }^{ 4 }-{ x }^{ 6 }+{ x }^{ 8 }+..$")
+ function_expan.scale(0.6)
+ function_expan.set_color(RED)
+ function_expan.to_edge(UP+RIGHT)
+ self.add(function_expan)
+
+ self.setup_axes()
+
+ equation = self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = RED,x_min = -1.1,x_max=1.1)
+ self.play(ShowCreation(equation))
+ self.wait(1)
+
+ dashLineLeft=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineRight=DashedLine(start=ORIGIN+y_each_unit*5*UP,end=ORIGIN+y_each_unit*5*DOWN)
+ dashLineLeft.shift(ORIGIN+LEFT*x_each_unit)
+ dashLineRight.shift(ORIGIN+RIGHT*x_each_unit)
+ radiusLine=Line(start=ORIGIN,end=ORIGIN+RIGHT*x_each_unit)
+ rangeLine=Line(start=ORIGIN+LEFT*x_each_unit,end=ORIGIN+RIGHT*x_each_unit)
+ circle=Circle(radius=x_each_unit)
+ movingPoint=Circle(radius=0.025)
+ movingPoint.shift(ORIGIN+RIGHT*x_each_unit)
+ circleEq1=self.get_graph(lambda x:math.sqrt(1-x**2),color=BLUE,x_max=-1,x_min=1)
+ circleEq2=self.get_graph(lambda x:-math.sqrt(1-x**2),color=BLUE,x_max=1,x_min=-1)
+
+ self.play(Write(dashLineLeft),Write(dashLineRight))
+ self.wait(1)
+
+ equation_updated=self.get_graph(lambda x : 1-math.pow(x,2)+math.pow(x,4)-math.pow(x,6)+math.pow(x,8)-math.pow(x,10)+math.pow(x,12)-math.pow(x,14)+math.pow(x,16)-math.pow(x,18),color = GREEN,x_min = -1,x_max=1)
+ self.play(FadeOut(self.axes),ReplacementTransform(equation,equation_updated))
+ self.wait(0.5)
+ self.play(Write(radiusLine))
+ self.play(MoveAlongPath(movingPoint,circleEq1))
+ self.play(MoveAlongPath(movingPoint,circleEq2))
+ self.play(FadeIn(circle))
+ self.wait(1)
+
+ radiusText=TextMobject("Radius of convergence")
+ radiusText.scale(0.14)
+ radiusText.shift(ORIGIN+RIGHT*x_each_unit*0.45+DOWN*y_each_unit*0.2)
+
+ self.play(Write(radiusText))
+ self.wait(0.6)
+
+ 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.3)
+
+ self.play(FadeOut(radiusText),FadeOut(circle),FadeOut(movingPoint))
+ extendLine=Line(start=ORIGIN,end=ORIGIN+x_each_unit*LEFT)
+ self.play(Write(extendLine))
+ doubleArrow=TextMobject("$\longleftrightarrow$")
+ doubleArrow.scale(1.6)
+ doubleArrow.set_color(BLUE)
+ doubleArrow.shift(ORIGIN+DOWN*y_each_unit*0.5)
+ self.play(FadeIn(doubleArrow))
+ self.wait(1)
+ rangeText=TextMobject("Interval of convergence")
+ rangeText.scale(0.15)
+ rangeText.shift(ORIGIN+y_each_unit*DOWN)
+ self.play(Write(rangeText))
+ self.wait(0.6)
+
+ 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)
--
cgit
From b7d0db731712d3603f5c18cffbf19cc1e81f9a42 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:35:15 +0530
Subject: Rename script5.py to video5_UniformConvergence.py
---
.../Power Series/script5.py | 136 ---------------------
.../Power Series/video5_UniformConvergence.py | 136 +++++++++++++++++++++
2 files changed, 136 insertions(+), 136 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/script5.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/video5_UniformConvergence.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/script5.py b/FSF-2020/calculus/series-and-transformations/Power Series/script5.py
deleted file mode 100644
index e9681aa..0000000
--- a/FSF-2020/calculus/series-and-transformations/Power Series/script5.py
+++ /dev/null
@@ -1,136 +0,0 @@
-from manimlib.imports import *
-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)
-
-
-def gety(x,n):
- ans=0
- for i in range(0,n+1):
- if(i%2==0):
- ans+=(math.pow(x,2*i))
- else:
- ans-=(math.pow(x,2*i))
- return ans
-
-def makeSeries(x,points,x_each_unit,y_each_unit):
- p=0
- for point in points:
- y=gety(x,p)
- point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
- p+=1
-
-def makeLines(x,numPoints,x_each_unit,y_each_unit):
- lines=[0]*numPoints
- for i in range(0,numPoints-1):
- y=gety(x,i)
- y_next=gety(x,i+1)
- lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
- return lines
-
-class graphScene(GraphScene,MovingCameraScene):
- CONFIG = {
- "x_min": -6,
- "x_max": 6,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$k$",
- "y_axis_label": "$f(\\frac{1}{2})_k$",
- "exclude_zero_label": True,
- "x_axis_width":7,
- "y_axis_height":7
- }
-
- 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)
- sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
- sequence.set_color(RED)
- sequence.scale(0.35)
- sequence.to_edge(UP+RIGHT)
- formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
- formula.set_color(PURPLE_C)
- formula.scale(0.4)
- formula.shift(5.3*RIGHT+3*UP)
- fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
- fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
- fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
- fLineText.set_color(RED)
- fLineText.scale(0.3)
- fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
- points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
- makeSeries(0.5,points,x_each_unit,y_each_unit)
- lines=makeLines(0.5,6,x_each_unit,y_each_unit)
-
-
- self.add(sequence)
- self.add(formula)
- self.setup_axes(animate=True)
- self.play(Write(fLine))
- self.add(fLineText)
- for p in points:
- self.add(p)
- 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)
-
- explanation1=TextMobject("Since the series","converges","to")
- explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
- explanation2=TextMobject("$\\frac {4}{5}$")
- explanation2.set_color(BLUE)
- explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
- explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
- explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
- explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
- explanation1.scale(0.5)
- explanation3.scale(0.5)
- explanation1.shift(1.8*DOWN+3.5*RIGHT)
- explanation2.shift(2.4*DOWN+3.5*RIGHT)
- explanation3.shift(1.8*DOWN+3.5*RIGHT)
- explanation4.shift(2.4*DOWN+3.5*RIGHT)
-
- self.play(Write(explanation1))
- self.play(FadeIn(explanation2))
- self.wait(1)
- self.play(FadeOut(explanation1),FadeOut(explanation2))
- self.play(Write(explanation3))
- self.play(Write(explanation4))
- self.wait(2)
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/video5_UniformConvergence.py b/FSF-2020/calculus/series-and-transformations/Power Series/video5_UniformConvergence.py
new file mode 100644
index 0000000..e9681aa
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/video5_UniformConvergence.py
@@ -0,0 +1,136 @@
+from manimlib.imports import *
+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)
+
+
+def gety(x,n):
+ ans=0
+ for i in range(0,n+1):
+ if(i%2==0):
+ ans+=(math.pow(x,2*i))
+ else:
+ ans-=(math.pow(x,2*i))
+ return ans
+
+def makeSeries(x,points,x_each_unit,y_each_unit):
+ p=0
+ for point in points:
+ y=gety(x,p)
+ point.shift(ORIGIN+RIGHT*x_each_unit*p+UP*y_each_unit*y)
+ p+=1
+
+def makeLines(x,numPoints,x_each_unit,y_each_unit):
+ lines=[0]*numPoints
+ for i in range(0,numPoints-1):
+ y=gety(x,i)
+ y_next=gety(x,i+1)
+ lines[i]=Line(start=ORIGIN+RIGHT*x_each_unit*i+UP*y_each_unit*y,end=ORIGIN+RIGHT*x_each_unit*(i+1)+UP*y_each_unit*y_next,color=RED)
+ return lines
+
+class graphScene(GraphScene,MovingCameraScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$k$",
+ "y_axis_label": "$f(\\frac{1}{2})_k$",
+ "exclude_zero_label": True,
+ "x_axis_width":7,
+ "y_axis_height":7
+ }
+
+ 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)
+ sequence=TextMobject("$1$ , $1-(0.5)^2$ , $1-(0.5)^2+(0.5)^4..$")
+ sequence.set_color(RED)
+ sequence.scale(0.35)
+ sequence.to_edge(UP+RIGHT)
+ formula=TextMobject("$f(x)_{ k }=\sum _{ i=0 }^{ k }{ (-1)^{ i }(x)^{ 2i } } $")
+ formula.set_color(PURPLE_C)
+ formula.scale(0.4)
+ formula.shift(5.3*RIGHT+3*UP)
+ fLine=Line(start=ORIGIN+x_each_unit*6*LEFT,end=ORIGIN+x_each_unit*6*RIGHT)
+ fLine.shift(ORIGIN+(4/5)*y_each_unit*UP)
+ fLineText=TextMobject("$g(0.5)=\\frac { 4 }{ 5 } $")
+ fLineText.set_color(RED)
+ fLineText.scale(0.3)
+ fLineText.shift(UP*1.2*y_each_unit+RIGHT*x_each_unit+4*LEFT)
+ points=[Dot(radius=0.03,color=BLUE) for i in range(0,6)]
+ makeSeries(0.5,points,x_each_unit,y_each_unit)
+ lines=makeLines(0.5,6,x_each_unit,y_each_unit)
+
+
+ self.add(sequence)
+ self.add(formula)
+ self.setup_axes(animate=True)
+ self.play(Write(fLine))
+ self.add(fLineText)
+ for p in points:
+ self.add(p)
+ 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)
+
+ explanation1=TextMobject("Since the series","converges","to")
+ explanation1.set_color_by_tex_to_color_map({"converges":YELLOW})
+ explanation2=TextMobject("$\\frac {4}{5}$")
+ explanation2.set_color(BLUE)
+ explanation3=TextMobject("Hence","$\\forall \epsilon>0$,","$\exists k$","such that,")
+ explanation3.set_color_by_tex_to_color_map({"$\\forall \epsilon>0$":BLUE,"$\exists k$":YELLOW})
+ explanation4=TextMobject("$\left| { f\left( \\frac { 1 }{ 2 } \\right) }_{ k }-\\frac { 4 }{ 5 } \\right| <$","$\epsilon$")
+ explanation4.set_color_by_tex_to_color_map({"$\epsilon$":RED})
+ explanation1.scale(0.5)
+ explanation3.scale(0.5)
+ explanation1.shift(1.8*DOWN+3.5*RIGHT)
+ explanation2.shift(2.4*DOWN+3.5*RIGHT)
+ explanation3.shift(1.8*DOWN+3.5*RIGHT)
+ explanation4.shift(2.4*DOWN+3.5*RIGHT)
+
+ self.play(Write(explanation1))
+ self.play(FadeIn(explanation2))
+ self.wait(1)
+ self.play(FadeOut(explanation1),FadeOut(explanation2))
+ self.play(Write(explanation3))
+ self.play(Write(explanation4))
+ self.wait(2)
--
cgit
From 90171632dcfdeadb90c680c94d1a9cb803837d91 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:35:48 +0530
Subject: Add files via upload
---
.../Power Series/gifs/file1_pieChart.gif | Bin 0 -> 347111 bytes
.../gifs/file4_radius_and_intervalOfConvergence.gif | Bin 0 -> 213252 bytes
.../Power Series/gifs/file5_UniformConvergence.gif | Bin 0 -> 276475 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/gifs/file1_pieChart.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4_radius_and_intervalOfConvergence.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Power Series/gifs/file5_UniformConvergence.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file1_pieChart.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file1_pieChart.gif
new file mode 100644
index 0000000..f102f6d
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file1_pieChart.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4_radius_and_intervalOfConvergence.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4_radius_and_intervalOfConvergence.gif
new file mode 100644
index 0000000..e8dbff4
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file4_radius_and_intervalOfConvergence.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file5_UniformConvergence.gif b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file5_UniformConvergence.gif
new file mode 100644
index 0000000..44cd78b
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Power Series/gifs/file5_UniformConvergence.gif differ
--
cgit
From a92ab419ce219a9bab4bbe03ea0f8be004e640ea Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 26 May 2020 14:38:07 +0530
Subject: renamed files
---
.../double-integrals/area_Under_func.gif | Bin 1277788 -> 0 bytes
.../double-integrals/area_under_func.py | 73 ------
.../double-integrals/elementary_area.gif | Bin 547368 -> 0 bytes
.../double-integrals/elementary_area.py | 144 -----------
.../double-integrals/file1_surface.gif | Bin 0 -> 3365528 bytes
.../double-integrals/file1_surface.py | 236 +++++++++++++++++
.../double-integrals/file2_area_under_func.gif | Bin 0 -> 1277788 bytes
.../double-integrals/file2_area_under_func.py | 73 ++++++
.../file3_y_limit_dependent_on_x.gif | Bin 0 -> 1170435 bytes
.../file3_y_limit_dependent_on_x.py | 113 ++++++++
.../double-integrals/file4_non_rect_region.gif | Bin 0 -> 2529511 bytes
.../double-integrals/file4_non_rect_region.py | 154 +++++++++++
.../double-integrals/file5_elementary_area.gif | Bin 0 -> 547368 bytes
.../double-integrals/file5_elementary_area.py | 144 +++++++++++
.../double-integrals/non_rect_region.gif | Bin 2529511 -> 0 bytes
.../double-integrals/non_rect_region.py | 154 -----------
.../double-integrals/surface.gif | Bin 3365528 -> 0 bytes
.../double-integrals/surface.py | 236 -----------------
.../double-integrals/y_limit_dependent_on_x.gif | Bin 1170435 -> 0 bytes
.../double-integrals/y_limit_dependent_on_x.py | 113 --------
.../fubini's-theorem/file1_surface1.gif | Bin 0 -> 3752052 bytes
.../fubini's-theorem/file1_surface1.py | 232 +++++++++++++++++
.../fubini's-theorem/file2_surface2.gif | Bin 0 -> 2556585 bytes
.../fubini's-theorem/file2_surface2.py | 286 +++++++++++++++++++++
.../fubini's_theorem/surface1.gif | Bin 3752052 -> 0 bytes
.../fubini's_theorem/surface1.py | 232 -----------------
.../fubini's_theorem/surface2.gif | Bin 2556585 -> 0 bytes
.../fubini's_theorem/surface2.py | 286 ---------------------
28 files changed, 1238 insertions(+), 1238 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif
deleted file mode 100644
index 223218b..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_Under_func.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
deleted file mode 100644
index 773840c..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/area_under_func.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from manimlib.imports import *
-
-
-class AreaUnderIntegral(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 5,
- "y_min" : 0,
- "y_max" : 6,
- "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
-
- int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
- area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
-
- opening_text=VGroup(*[int_area_sym,area_mean_text])
- self.play(Write(opening_text),run_time=4)
- self.wait(2)
- self.play(FadeOut(opening_text))
-
- self.setup_axes(animate=True)
- func= self.get_graph(self.Func, x_min=0,x_max=5)
- self.curve=func
-
- func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
- min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
- tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
- max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
- tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
-
- # area = self.get_area(func,1,4)
-
- self.play(ShowCreation(func), ShowCreation(func_text))
-
- self.wait(2)
- self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
-
-
- approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
- self.play(Write(approx_text))
-
- rect_list = self.get_riemann_rectangles_list(
- self.curve, 5,
- max_dx = 0.25,
- x_min = 1,
- x_max = 4,
- )
- flat_graph = self.get_graph(lambda t : 0)
- rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
- for new_rects in rect_list:
- new_rects.set_fill(opacity = 0.8)
- rects.align_submobjects(new_rects)
- for alt_rect in rects[::2]:
- alt_rect.set_fill(opacity = 0)
- self.play(Transform(
- rects, new_rects,
- run_time = 1.5,
- lag_ratio = 0.5
- ))
- conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
- self.play(Transform(approx_text,conclude_text))
- self.wait(3)
- int_area_sym.next_to(self.curve,IN)
- self.play(Transform(conclude_text,int_area_sym))
-
- # self.play(ShowCreation(area))
- self.wait(3)
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif
deleted file mode 100644
index 5c9ac03..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
deleted file mode 100644
index 362b6f8..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/elementary_area.py
+++ /dev/null
@@ -1,144 +0,0 @@
-from manimlib.imports import *
-
-class ElementaryArea(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 2,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- # "x_labeled_nums": list(np.arange(0,3)),
- # "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
- }
-
- def construct(self):
- X = self.x_axis_width/(self.x_max- self.x_min)
- Y = self.y_axis_height/(self.y_max- self.y_min)
- self.X=X ;self.Y=Y
- self.setup_axes(animate=False)
-
- caption=TextMobject("The elementary area in ").to_edge(UP)
- rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
- polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
-
- self.add(caption)
- self.play(Write(rect_text))
- self.get_rect_element()
- # self.play(Write(polar_text))
- self.play(ReplacementTransform(rect_text,polar_text),
- FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
- self.get_polar_element()
-
-
-
- def get_rect_element(self):
- rect=Rectangle(
- height=2, width=3,fill_color=BLUE_D,
- fill_opacity=1, color=BLUE_D
- ).scale(.75).move_to(
- self.graph_origin+(RIGHT*self.X+UP*self.Y)
- )
- dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
- dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_gr=VGroup(dx_brace,dx_label)
-
- dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
- dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_gr=VGroup(dy_brace,dy_label)
-
- brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
-
- dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
-
- self.play(FadeIn(rect))
- self.play(GrowFromCenter(brace_gr))
- self.play(GrowFromCenter(dydx))
-
- self.rect=rect
- self.rect_brace_gr=brace_gr
- self.dydx=dydx
- self.wait(2)
-
-
- def get_polar_element(self):
- X=self.X ;Y=self.Y
- theta1=25*DEGREES
- dtheta=TAU/12
- r_in=1.3*X ; r_out=1.9*X
-
- arc=AnnularSector(
- arc_center=self.graph_origin,
- inner_radius=r_in,
- outer_radius=r_out ,
- angle= dtheta,
- start_angle= theta1,
- fill_opacity= 1,
- stroke_width= 0,
- color= BLUE_D,
- )
-
-
- # # #getting braces
- r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
- dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
- dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
- ).rotate(theta1, about_point=r_in_theta1
- )
- dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
- dr_brace_gr=VGroup(dr_brace,dr_label)
-
- theta2=theta1+dtheta
- r_out_theta2=self.graph_origin+r_out*(
- np.cos(theta2)*RIGHT+np.sin(theta2)*UP
- )
- rdt_line=Line(r_out_theta2,r_out_theta2
- +DOWN*(r_out*dtheta)
- )
- rdt_brace=Brace(rdt_line, RIGHT,
- buff = MED_SMALL_BUFF).rotate(
- theta2-(dtheta/2), about_point=r_out_theta2
- )
- rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
- rdt_brace_gr=VGroup(rdt_brace,rdt_label)
-
- #getting label r and dtheta
- r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
- r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
- r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
- r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
- r_brace_gr=VGroup(r_brace,r_label)
-
- dtheta_arc=Arc(
- arc_center=self.graph_origin,
- radius=.5*X,
- angle= dtheta,
- start_angle= theta1,
- )
- dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
- dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
-
-
- rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
- self.play(ReplacementTransform(self.rect,arc))
- self.wait()
- self.play(ShowCreation(r1),
- ShowCreation(r2)
- )
- self.play(ShowCreation(r_brace_gr),
- Write(dtheta_label)
- )
- self.wait()
- self.play(GrowFromCenter(rdt_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(dr_brace_gr))
- self.wait(.5)
- self.play(GrowFromCenter(rdrdt))
-
- self.wait(2)
-
-
- #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif
new file mode 100644
index 0000000..ae23a7b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
new file mode 100644
index 0000000..a794f46
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
@@ -0,0 +1,236 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":1 ,"b": 6, "c":2 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.8,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.07)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(3)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif
new file mode 100644
index 0000000..223218b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
new file mode 100644
index 0000000..773840c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
@@ -0,0 +1,73 @@
+from manimlib.imports import *
+
+
+class AreaUnderIntegral(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 5,
+ "y_min" : 0,
+ "y_max" : 6,
+ "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
+
+ int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
+ area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
+
+ opening_text=VGroup(*[int_area_sym,area_mean_text])
+ self.play(Write(opening_text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(opening_text))
+
+ self.setup_axes(animate=True)
+ func= self.get_graph(self.Func, x_min=0,x_max=5)
+ self.curve=func
+
+ func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
+ min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
+ tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
+ max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
+ tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
+
+ # area = self.get_area(func,1,4)
+
+ self.play(ShowCreation(func), ShowCreation(func_text))
+
+ self.wait(2)
+ self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
+
+
+ approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
+ self.play(Write(approx_text))
+
+ rect_list = self.get_riemann_rectangles_list(
+ self.curve, 5,
+ max_dx = 0.25,
+ x_min = 1,
+ x_max = 4,
+ )
+ flat_graph = self.get_graph(lambda t : 0)
+ rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
+ for new_rects in rect_list:
+ new_rects.set_fill(opacity = 0.8)
+ rects.align_submobjects(new_rects)
+ for alt_rect in rects[::2]:
+ alt_rect.set_fill(opacity = 0)
+ self.play(Transform(
+ rects, new_rects,
+ run_time = 1.5,
+ lag_ratio = 0.5
+ ))
+ conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
+ self.play(Transform(approx_text,conclude_text))
+ self.wait(3)
+ int_area_sym.next_to(self.curve,IN)
+ self.play(Transform(conclude_text,int_area_sym))
+
+ # self.play(ShowCreation(area))
+ self.wait(3)
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
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/file3_y_limit_dependent_on_x.gif
new file mode 100644
index 0000000..a2bfd9d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
new file mode 100644
index 0000000..4894ebf
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
@@ -0,0 +1,113 @@
+from manimlib.imports import *
+
+class YlimitXdependent(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 3.5,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
+ }
+
+ 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.setup_axes(animate=False)
+
+ line= self.get_graph(
+ lambda x : 2-2*x ,
+ x_min = 0,
+ x_max = 1,
+ color = RED)
+ line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
+ self.line=line
+
+ caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
+ self.play(ShowCreation(line),Write(line_eqn))
+ # self.show_area()
+ self.show_rects()
+ self.play(Write(caption))
+ self.show_y_values_at_different_x()
+
+ self.wait(.5)
+
+ ###################
+ def show_area(self):
+ area = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.0001,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def show_rects(self):
+ rects = self.get_riemann_rectangles(
+ self.line,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity =1,
+ stroke_width = 0,
+ )
+ # self.play(ShowCreation(rects))
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+
+ def show_y_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[3*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff = 0)
+ y = TexMobject("y=2-2x")#.rotate(PI/2)
+ y.next_to(brace, LEFT, SMALL_BUFF)
+ anims = [
+ rect.set_fill, BLUE_E, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, BLUE, .75,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y, y),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y = y
+
+ y = last_y
+ y_brace = last_brace
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
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/file4_non_rect_region.gif
new file mode 100644
index 0000000..c8e7c8c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.py
new file mode 100644
index 0000000..793a000
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file4_non_rect_region.py
@@ -0,0 +1,154 @@
+from manimlib.imports import *
+
+class AreaUnderCurve(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 8,
+ "y_min" : -1,
+ "y_max" : 5,
+ "y_axis_label": "$y$",
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(-1, 9)),
+ "y_labeled_nums": list(np.arange(-1, 6)),
+ "y_axis_height":5.5,
+ "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
+ }
+
+ 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)
+
+ sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
+ self.play(Write(sofar_text))
+ self.play(sofar_text.to_edge,UP)
+
+ self.setup_axes(animate=False)
+
+ rect= self.get_graph(
+ lambda x : 3,
+ x_min = 0,
+ x_max = 5,
+ color = GREEN)
+
+ rect_region = self.get_riemann_rectangles(
+ rect,
+ x_min = 0,
+ x_max = 5,
+ dx =.01,
+ start_color = GREEN,
+ end_color = GREEN,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+
+ self.play(ShowCreation(rect_region))
+ self.wait(.5)
+
+ rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
+ rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
+ const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
+
+ self.play(ReplacementTransform(sofar_text,rect_int))
+ self.wait(1.5)
+ self.play(FadeIn(rect_lim))
+ self.wait(2)
+ self.play(Write(const_text))
+ self.wait(2)
+ self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
+
+
+ non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
+ non_rect_text.to_edge(UP)
+ self.play(Write(non_rect_text))
+ self.wait(1.5)
+ self.play(FadeOut(rect_region))
+
+ c1= self.get_graph(
+ lambda x : x**2/4,
+ x_min = 0,
+ x_max = 4,
+ color = RED)
+
+ c1_region = self.get_riemann_rectangles(
+ c1,
+ x_min = 0,
+ x_max = 4,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = 0.75,
+ stroke_width = 0,
+ )
+ self.add(c1,c1_region)
+ # self.wait(2)
+
+ c2= self.get_graph(
+ lambda x :12-2*x,
+ x_min = 4,
+ x_max = 6,
+ color = RED)
+
+ c2_region = self.get_riemann_rectangles(
+ c2,
+ x_min = 4,
+ x_max = 6,
+ dx =.01,
+ start_color = BLUE,
+ end_color = BLUE,
+ fill_opacity = .75,
+ stroke_width = 0,
+ )
+ self.add(c2_region,c2)
+ self.wait(1.5)
+ c=VGroup(*[c1,c2])
+
+ no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
+
+ self.play(ReplacementTransform(non_rect_text,no_func_text))
+ self.wait(1)
+ self.play(Indicate(c))
+ self.wait(2)
+
+ div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
+ self.play(ReplacementTransform(no_func_text,div_region_text))
+
+ c2.set_color(YELLOW)
+ self.play(c2_region.set_color,YELLOW)
+ c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
+ c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
+ c_text=VGroup(*[c1_text,c2_text])
+
+ self.play(FadeIn(c_text))
+ self.wait(.4)
+ self.play(Indicate(c1),Indicate(c1_text))
+ self.play(Indicate(c2),Indicate(c2_text))
+
+ easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
+ self.play(ReplacementTransform(div_region_text,easy_text))
+
+ c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
+ c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
+
+ self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
+ self.wait(2)
+
+ total_int=TextMobject(r"The total integraton= ").to_edge(UP)
+ plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
+ self.play(ReplacementTransform(easy_text,total_int))
+ self.play(c2_region.set_color,BLUE)
+ self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
+
+ region=VGroup(*[c1_region,c2_region])
+ region.set_color(GREEN)
+ self.play(ShowCreation(region))
+ self.wait(3)
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
+
+
+
+
+
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/file5_elementary_area.gif
new file mode 100644
index 0000000..5c9ac03
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.py
new file mode 100644
index 0000000..362b6f8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file5_elementary_area.py
@@ -0,0 +1,144 @@
+from manimlib.imports import *
+
+class ElementaryArea(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 2,
+ "y_min" : 0,
+ "y_max" : 2,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ # "x_labeled_nums": list(np.arange(0,3)),
+ # "y_labeled_nums": list(np.arange(0 ,3)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+3.5*LEFT+3.5*DOWN,
+ }
+
+ def construct(self):
+ X = self.x_axis_width/(self.x_max- self.x_min)
+ Y = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=X ;self.Y=Y
+ self.setup_axes(animate=False)
+
+ caption=TextMobject("The elementary area in ").to_edge(UP)
+ rect_text=TextMobject("Cartesian Coordinates").next_to(caption,DOWN,)
+ polar_text=TextMobject("Polar Coordinates").next_to(caption,DOWN,)
+
+ self.add(caption)
+ self.play(Write(rect_text))
+ self.get_rect_element()
+ # self.play(Write(polar_text))
+ self.play(ReplacementTransform(rect_text,polar_text),
+ FadeOut(VGroup(self.dydx,self.rect_brace_gr)))
+ self.get_polar_element()
+
+
+
+ def get_rect_element(self):
+ rect=Rectangle(
+ height=2, width=3,fill_color=BLUE_D,
+ fill_opacity=1, color=BLUE_D
+ ).scale(.75).move_to(
+ self.graph_origin+(RIGHT*self.X+UP*self.Y)
+ )
+ dx_brace=Brace(rect, DOWN, buff = SMALL_BUFF)
+ dx_label=dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_gr=VGroup(dx_brace,dx_label)
+
+ dy_brace=Brace(rect,RIGHT, buff = SMALL_BUFF)
+ dy_label=dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_gr=VGroup(dy_brace,dy_label)
+
+ brace_gr=VGroup(dx_brace_gr,dy_brace_gr)
+
+ dydx=TextMobject("$dxdy$",color=BLACK).next_to(rect,IN)
+
+ self.play(FadeIn(rect))
+ self.play(GrowFromCenter(brace_gr))
+ self.play(GrowFromCenter(dydx))
+
+ self.rect=rect
+ self.rect_brace_gr=brace_gr
+ self.dydx=dydx
+ self.wait(2)
+
+
+ def get_polar_element(self):
+ X=self.X ;Y=self.Y
+ theta1=25*DEGREES
+ dtheta=TAU/12
+ r_in=1.3*X ; r_out=1.9*X
+
+ arc=AnnularSector(
+ arc_center=self.graph_origin,
+ inner_radius=r_in,
+ outer_radius=r_out ,
+ angle= dtheta,
+ start_angle= theta1,
+ fill_opacity= 1,
+ stroke_width= 0,
+ color= BLUE_D,
+ )
+
+
+ # # #getting braces
+ r_in_theta1=self.graph_origin+r_in*(np.cos(theta1)*RIGHT+np.sin(theta1)*UP)
+ dr_line=Line(r_in_theta1,r_in_theta1+RIGHT*(r_out-r_in))
+ dr_brace=Brace(dr_line, DOWN, buff = SMALL_BUFF
+ ).rotate(theta1, about_point=r_in_theta1
+ )
+ dr_label=dr_brace.get_text("$dr$", buff = SMALL_BUFF)
+ dr_brace_gr=VGroup(dr_brace,dr_label)
+
+ theta2=theta1+dtheta
+ r_out_theta2=self.graph_origin+r_out*(
+ np.cos(theta2)*RIGHT+np.sin(theta2)*UP
+ )
+ rdt_line=Line(r_out_theta2,r_out_theta2
+ +DOWN*(r_out*dtheta)
+ )
+ rdt_brace=Brace(rdt_line, RIGHT,
+ buff = MED_SMALL_BUFF).rotate(
+ theta2-(dtheta/2), about_point=r_out_theta2
+ )
+ rdt_label=rdt_brace.get_text("$rd\\theta$",buff = SMALL_BUFF)
+ rdt_brace_gr=VGroup(rdt_brace,rdt_label)
+
+ #getting label r and dtheta
+ r1=DashedLine(self.graph_origin,r_in_theta1).set_color(RED)
+ r2=DashedLine(self.graph_origin,r_out_theta2).set_color(RED)
+ r_brace=Brace(r1, DOWN, buff = SMALL_BUFF).rotate(theta1, about_point=self.graph_origin)
+ r_label=r_brace.get_text("$r$", buff = SMALL_BUFF)
+ r_brace_gr=VGroup(r_brace,r_label)
+
+ dtheta_arc=Arc(
+ arc_center=self.graph_origin,
+ radius=.5*X,
+ angle= dtheta,
+ start_angle= theta1,
+ )
+ dtheta_arc_label=TextMobject("$d\\theta$").move_to(.99*dtheta_arc.get_corner(UR))
+ dtheta_label=VGroup(dtheta_arc,dtheta_arc_label)
+
+
+ rdrdt=TextMobject("$rdrd\\theta$",color=BLACK).next_to(arc,IN)
+ self.play(ReplacementTransform(self.rect,arc))
+ self.wait()
+ self.play(ShowCreation(r1),
+ ShowCreation(r2)
+ )
+ self.play(ShowCreation(r_brace_gr),
+ Write(dtheta_label)
+ )
+ self.wait()
+ self.play(GrowFromCenter(rdt_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(dr_brace_gr))
+ self.wait(.5)
+ self.play(GrowFromCenter(rdrdt))
+
+ self.wait(2)
+
+
+ #uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif
deleted file mode 100644
index c8e7c8c..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
deleted file mode 100644
index 793a000..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/non_rect_region.py
+++ /dev/null
@@ -1,154 +0,0 @@
-from manimlib.imports import *
-
-class AreaUnderCurve(GraphScene):
- CONFIG = {
- "x_min" : -1,
- "x_max" : 8,
- "y_min" : -1,
- "y_max" : 5,
- "y_axis_label": "$y$",
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(-1, 9)),
- "y_labeled_nums": list(np.arange(-1, 6)),
- "y_axis_height":5.5,
- "graph_origin": ORIGIN+4*LEFT+2.5*DOWN,
- }
-
- 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)
-
- sofar_text=TextMobject(r"So far we have integrated over \\ rectangular regions")
- self.play(Write(sofar_text))
- self.play(sofar_text.to_edge,UP)
-
- self.setup_axes(animate=False)
-
- rect= self.get_graph(
- lambda x : 3,
- x_min = 0,
- x_max = 5,
- color = GREEN)
-
- rect_region = self.get_riemann_rectangles(
- rect,
- x_min = 0,
- x_max = 5,
- dx =.01,
- start_color = GREEN,
- end_color = GREEN,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
-
- self.play(ShowCreation(rect_region))
- self.wait(.5)
-
- rect_int=TextMobject(r"Here the integration limits are set as").to_edge(UP)
- rect_lim=TextMobject(r"$$\int_{x=0}^{5}\int_{y=0}^{3}$$").next_to(rect_int,DOWN)
- const_text=TextMobject(r"$\longleftarrow $ \textsf the limits are\\ constant values").next_to(rect_lim,RIGHT)
-
- self.play(ReplacementTransform(sofar_text,rect_int))
- self.wait(1.5)
- self.play(FadeIn(rect_lim))
- self.wait(2)
- self.play(Write(const_text))
- self.wait(2)
- self.play(FadeOut(rect_int), FadeOut(rect_lim),FadeOut(const_text))
-
-
- non_rect_text=TextMobject(r"Now we see how to integrate over \\ non-rectangular regions")
- non_rect_text.to_edge(UP)
- self.play(Write(non_rect_text))
- self.wait(1.5)
- self.play(FadeOut(rect_region))
-
- c1= self.get_graph(
- lambda x : x**2/4,
- x_min = 0,
- x_max = 4,
- color = RED)
-
- c1_region = self.get_riemann_rectangles(
- c1,
- x_min = 0,
- x_max = 4,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 0.75,
- stroke_width = 0,
- )
- self.add(c1,c1_region)
- # self.wait(2)
-
- c2= self.get_graph(
- lambda x :12-2*x,
- x_min = 4,
- x_max = 6,
- color = RED)
-
- c2_region = self.get_riemann_rectangles(
- c2,
- x_min = 4,
- x_max = 6,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = .75,
- stroke_width = 0,
- )
- self.add(c2_region,c2)
- self.wait(1.5)
- c=VGroup(*[c1,c2])
-
- no_func_text=TextMobject(r"The whole region can't be expressed as\\ bounded by a single $f(x)$").next_to(c2,UP,buff=LARGE_BUFF)
-
- self.play(ReplacementTransform(non_rect_text,no_func_text))
- self.wait(1)
- self.play(Indicate(c))
- self.wait(2)
-
- div_region_text=TextMobject(r"So the region is divided into two").next_to(c2,UP,buff=MED_LARGE_BUFF)
- self.play(ReplacementTransform(no_func_text,div_region_text))
-
- c2.set_color(YELLOW)
- self.play(c2_region.set_color,YELLOW)
- c1_text=TextMobject("$\dfrac{x^2}{4}$").next_to(c1,IN)
- c2_text=TextMobject("$12-2x$").next_to(c2,IN+2*X)
- c_text=VGroup(*[c1_text,c2_text])
-
- self.play(FadeIn(c_text))
- self.wait(.4)
- self.play(Indicate(c1),Indicate(c1_text))
- self.play(Indicate(c2),Indicate(c2_text))
-
- easy_text=TextMobject(r"Now the limis can be set easily").next_to(c2,UP,buff=.5)
- self.play(ReplacementTransform(div_region_text,easy_text))
-
- c1_int=TextMobject(r"$$\int_{x=0}^{4}\int_{y=0}^{\dfrac{x^2}{4}}$$").next_to(c1,IN).shift(.5*(-X+1.3*Y))
- c2_int=TextMobject(r"$$\int_{x=4}^{6}\int_{y=0}^{12-2x}$$").next_to(c2,IN+X)
-
- self.play(ReplacementTransform(c1_text,c1_int),ReplacementTransform(c2_text,c2_int))
- self.wait(2)
-
- total_int=TextMobject(r"The total integraton= ").to_edge(UP)
- plus=TextMobject("$$+$$").move_to(self.graph_origin+4*X+4.8*Y)
- self.play(ReplacementTransform(easy_text,total_int))
- self.play(c2_region.set_color,BLUE)
- self.play(c1_int.next_to,c1,.1*UP, c2_int.next_to,plus,RIGHT, FadeIn(plus))
-
- region=VGroup(*[c1_region,c2_region])
- region.set_color(GREEN)
- self.play(ShowCreation(region))
- self.wait(3)
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
-
-
-
-
-
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif
deleted file mode 100644
index ae23a7b..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
deleted file mode 100644
index a794f46..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/surface.py
+++ /dev/null
@@ -1,236 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 8,
- "y_min": 0,
- "y_max": 8,
- "z_min": 0,
- "z_max": 6,
- "a":1 ,"b": 6, "c":2 , "d":6,
- "axes_shift":-3*OUT + 5*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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 2+y/4+np.sin(x)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(distance=35,
- phi=80 * DEGREES,
- theta=-80 * DEGREES,
- )
-
- fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- R=TextMobject("R").set_color(BLACK).scale(3)
- R.move_to(self.axes.input_plane,IN)
- self.add(R)
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=0.8,
- fill_color=PINK,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.07)
- self.play(Write(surface))
- # self.play(LaggedStart(ShowCreation(surface)))
-
- self.get_lines()
- # self.play(FadeIn(self.axes.input_plane))
- self.wait(3)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.a,
- "u_max": axes.b,
- "v_min": axes.c,
- "v_max": axes.d,
- "resolution": (
- (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (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
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"RED"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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, RIGHT,
- about_point=axes.c2p(0, 0, 0),
- )
- axes.y_axis.rotate(
- 90 * DEGREES, UP,
- about_point=axes.c2p(0, 0, 0),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.5,
- fill_color=TEAL,
- stroke_width=0,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- 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 = [
- ("a", axes.a),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c),
- ("d", 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)
- 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.5)
- 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(), RIGHT)
- axes.z_axis.label = z_label
- for axis in axes:
- axis.add(axis.label)
- return axes
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif
deleted file mode 100644
index a2bfd9d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
deleted file mode 100644
index 4894ebf..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/y_limit_dependent_on_x.py
+++ /dev/null
@@ -1,113 +0,0 @@
-from manimlib.imports import *
-
-class YlimitXdependent(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 2,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,3)),
- "x_axis_width": 3.5,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+2.5*LEFT+3*DOWN,
- }
-
- 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.setup_axes(animate=False)
-
- line= self.get_graph(
- lambda x : 2-2*x ,
- x_min = 0,
- x_max = 1,
- color = RED)
- line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
- self.line=line
-
- caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
- self.play(ShowCreation(line),Write(line_eqn))
- # self.show_area()
- self.show_rects()
- self.play(Write(caption))
- self.show_y_values_at_different_x()
-
- self.wait(.5)
-
- ###################
- def show_area(self):
- area = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.0001,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity = 1,
- stroke_width = 0,
- )
- self.play(ShowCreation(area))
- # self.transform_between_riemann_rects(self.rects,area)
- self.area = area
-
- def show_rects(self):
- rects = self.get_riemann_rectangles(
- self.line,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = BLUE,
- end_color = BLUE,
- fill_opacity =1,
- stroke_width = 0,
- )
- # self.play(ShowCreation(rects))
- # self.transform_between_riemann_rects(self.area,rects)
- self.rects=rects
-
- def show_y_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/10)
- rects_subset = self.rects[3*rp:5*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff = 0)
- y = TexMobject("y=2-2x")#.rotate(PI/2)
- y.next_to(brace, LEFT, SMALL_BUFF)
- anims = [
- rect.set_fill, BLUE_E, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, BLUE, .75,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y, y),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y = y
-
- y = last_y
- y_brace = last_brace
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
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/file1_surface1.gif
new file mode 100644
index 0000000..8c9fa0a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.py
new file mode 100644
index 0000000..a590a53
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file1_surface1.py
@@ -0,0 +1,232 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "z_min": -4,
+ "z_max": 4,
+ "a":0 ,"b": 4, "c":0 , "d":4,
+ "axes_shift":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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 5*(x**2-y**2)/((1e-4+x**2+y**2)**2)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(#distance=10,
+ phi=80 * DEGREES,
+ theta=35 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=\dfrac{x^2-y^2}{(x^2+y^2)^2}$").set_color(BLUE)
+ fn_text.to_corner(UR,buff=1)
+ self.add_fixed_in_frame_mobjects(fn_text)
+
+ R=TextMobject("R").set_color(BLACK).scale(2).rotate(180*DEGREES , OUT)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.6,
+ fill_color=BLUE_E,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.play(Write(surface))
+
+ self.get_lines()
+ self.wait(4)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.x_max,
+ "u_max": axes.x_min,
+ "v_min": axes.y_max,
+ "v_max": axes.y_min,
+ "resolution": (10,10),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"YELLOW"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=PINK,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a+.4),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c+.4),
+ ("d", 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, LEFT)
+ 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_Fubini's_Theorem
+
+
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/file2_surface2.gif
new file mode 100644
index 0000000..ac13f21
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
new file mode 100644
index 0000000..c998f3b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
@@ -0,0 +1,286 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "z_min": -2,
+ "z_max": 4,
+ "a":0 ,"b": 4, "c":0 , "d":4,
+ "axes_shift":IN+2*LEFT+2*DOWN,
+ "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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: x*y/4
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(
+ distance=30,
+ phi=75 * DEGREES,
+ theta=20 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=xy$").set_color(BLUE).scale(1.5)
+ fn_text.to_corner(UR,buff=2)
+ self.add_fixed_in_frame_mobjects(fn_text)
+
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=.5,
+ fill_color=BLUE_E,
+ stroke_width=0.2,
+ stroke_color=WHITE,
+ )
+ #get boundary curves
+ c1=self.get_curve(
+ self.axes, lambda x: x**2/4
+ )
+ c1_label=TextMobject("$y=x^2$").next_to(c1,IN+OUT).shift(DOWN+RIGHT)
+ c1_label.rotate(PI)
+ c1_group=VGroup(c1,c1_label).set_color(ORANGE)
+
+ c2=self.get_curve(
+ self.axes, lambda x: x
+ ).set_color(PINK)
+ c2_label=TextMobject("$y=x$").next_to(c2,IN+OUT)
+ c2_label.rotate(PI/2,about_point=(c2_label.get_corner(UL)))
+ c2_group=VGroup(c2,c2_label).set_color(YELLOW_E)
+
+
+
+ self.add(c1,c2,c1_label,c2_label)
+
+ self.begin_ambient_camera_rotation(rate=0.4)
+ self.get_region(self.axes,c1,c2)
+ self.play(Write(surface))
+ self.get_lines()
+ self.wait(1)
+ self.stop_ambient_camera_rotation()
+ self.move_camera(
+ distance=20,
+ phi=10 * DEGREES,
+ theta=80 * DEGREES,
+ run_time=2.5
+ )
+ self.wait(2)
+
+
+
+ def get_curve(self,axes, func, **kwargs):
+ config = {
+ "t_min": axes.x_min,
+ "t_max": axes.x_max,
+ }
+ config.update(kwargs)
+ return ParametricFunction(
+ lambda x : axes.c2p(
+ x, func(x),0
+ ),
+ **config
+ )
+
+ def get_region(self,axes,curve1,curve2,**kwargs):
+ x_vals=np.arange(axes.x_min,axes.x_max,.1)
+ c1_points=[curve1.get_point_from_function(x) for x in x_vals]
+ c2_points=[curve2.get_point_from_function(x) for x in x_vals]
+ c2_points.reverse()
+ points=c1_points+c2_points
+ region=Polygon(*points,
+ stroke_width=0,
+ fill_color=PINK,
+ fill_opacity=.5
+ )
+ R=TextMobject("R").set_color(PINK).scale(2).rotate(180*DEGREES , OUT)
+ R.move_to(region,IN+RIGHT)
+
+ self.play(Write(region))
+ self.add(R)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.x_max,
+ "u_max": axes.x_min,
+ "v_min": axes.y_max,
+ "v_max": axes.y_min,
+ "resolution": (10,10),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"YELLOW"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ 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)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=PINK,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ # axes.add(axes.input_plane)
+ 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, LEFT)
+ 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_Fubini's_Theorem
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif
deleted file mode 100644
index 8c9fa0a..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
deleted file mode 100644
index a590a53..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface1.py
+++ /dev/null
@@ -1,232 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 4,
- "y_min": 0,
- "y_max": 4,
- "z_min": -4,
- "z_max": 4,
- "a":0 ,"b": 4, "c":0 , "d":4,
- "axes_shift":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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 5*(x**2-y**2)/((1e-4+x**2+y**2)**2)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(#distance=10,
- phi=80 * DEGREES,
- theta=35 * DEGREES,
- )
-
- fn_text=TextMobject("$z=\dfrac{x^2-y^2}{(x^2+y^2)^2}$").set_color(BLUE)
- fn_text.to_corner(UR,buff=1)
- self.add_fixed_in_frame_mobjects(fn_text)
-
- R=TextMobject("R").set_color(BLACK).scale(2).rotate(180*DEGREES , OUT)
- R.move_to(self.axes.input_plane,IN)
- self.add(R)
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=0.6,
- fill_color=BLUE_E,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.2)
- self.play(Write(surface))
-
- self.get_lines()
- self.wait(4)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.x_max,
- "u_max": axes.x_min,
- "v_min": axes.y_max,
- "v_max": axes.y_min,
- "resolution": (10,10),
- }
-
- config.update(self.default_surface_config)
- config.update(kwargs)
- return ParametricSurface(
- lambda x,y : axes.c2p(
- x, y, func(x, y)
- ),
- **config
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"YELLOW"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.3,
- fill_color=PINK,
- stroke_width=.2,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- 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 = [
- ("a", axes.a+.4),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c+.4),
- ("d", 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, LEFT)
- 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_Fubini's_Theorem
-
-
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif
deleted file mode 100644
index ac13f21..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
deleted file mode 100644
index c998f3b..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's_theorem/surface2.py
+++ /dev/null
@@ -1,286 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 4,
- "y_min": 0,
- "y_max": 4,
- "z_min": -2,
- "z_max": 4,
- "a":0 ,"b": 4, "c":0 , "d":4,
- "axes_shift":IN+2*LEFT+2*DOWN,
- "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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: x*y/4
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(
- distance=30,
- phi=75 * DEGREES,
- theta=20 * DEGREES,
- )
-
- fn_text=TextMobject("$z=xy$").set_color(BLUE).scale(1.5)
- fn_text.to_corner(UR,buff=2)
- self.add_fixed_in_frame_mobjects(fn_text)
-
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=.5,
- fill_color=BLUE_E,
- stroke_width=0.2,
- stroke_color=WHITE,
- )
- #get boundary curves
- c1=self.get_curve(
- self.axes, lambda x: x**2/4
- )
- c1_label=TextMobject("$y=x^2$").next_to(c1,IN+OUT).shift(DOWN+RIGHT)
- c1_label.rotate(PI)
- c1_group=VGroup(c1,c1_label).set_color(ORANGE)
-
- c2=self.get_curve(
- self.axes, lambda x: x
- ).set_color(PINK)
- c2_label=TextMobject("$y=x$").next_to(c2,IN+OUT)
- c2_label.rotate(PI/2,about_point=(c2_label.get_corner(UL)))
- c2_group=VGroup(c2,c2_label).set_color(YELLOW_E)
-
-
-
- self.add(c1,c2,c1_label,c2_label)
-
- self.begin_ambient_camera_rotation(rate=0.4)
- self.get_region(self.axes,c1,c2)
- self.play(Write(surface))
- self.get_lines()
- self.wait(1)
- self.stop_ambient_camera_rotation()
- self.move_camera(
- distance=20,
- phi=10 * DEGREES,
- theta=80 * DEGREES,
- run_time=2.5
- )
- self.wait(2)
-
-
-
- def get_curve(self,axes, func, **kwargs):
- config = {
- "t_min": axes.x_min,
- "t_max": axes.x_max,
- }
- config.update(kwargs)
- return ParametricFunction(
- lambda x : axes.c2p(
- x, func(x),0
- ),
- **config
- )
-
- def get_region(self,axes,curve1,curve2,**kwargs):
- x_vals=np.arange(axes.x_min,axes.x_max,.1)
- c1_points=[curve1.get_point_from_function(x) for x in x_vals]
- c2_points=[curve2.get_point_from_function(x) for x in x_vals]
- c2_points.reverse()
- points=c1_points+c2_points
- region=Polygon(*points,
- stroke_width=0,
- fill_color=PINK,
- fill_opacity=.5
- )
- R=TextMobject("R").set_color(PINK).scale(2).rotate(180*DEGREES , OUT)
- R.move_to(region,IN+RIGHT)
-
- self.play(Write(region))
- self.add(R)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.x_max,
- "u_max": axes.x_min,
- "v_min": axes.y_max,
- "v_max": axes.y_min,
- "resolution": (10,10),
- }
-
- config.update(self.default_surface_config)
- config.update(kwargs)
- return ParametricSurface(
- lambda x,y : axes.c2p(
- x, y, func(x, y)
- ),
- **config
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"YELLOW"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- 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)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.3,
- fill_color=PINK,
- stroke_width=.2,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- # axes.add(axes.input_plane)
- 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, LEFT)
- 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_Fubini's_Theorem
-
-
--
cgit
From 7b27056aa7977bdb5cd1d1a20721c5536c59b5e7 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:40:50 +0530
Subject: added gifs
---
.../series-and-transformations/Power Series/README.md | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
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 acf07b7..85c6fc4 100644
--- a/FSF-2020/calculus/series-and-transformations/Power Series/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Power Series/README.md
@@ -1,3 +1,14 @@
-![GIF1](gifs/file2_convergence_Intuition.gif)
+#### PieChart
+![GIF1](gifs/file1_pieChart.gif)
-![GIF2](gifs/file3_convergence_of_a_function.gif)
+#### Convergence Intuition
+![GIF2](gifs/file2_convergence_Intuition.gif)
+
+#### Convergence of a function
+![GIF3](gifs/file3_convergence_of_a_function.gif)
+
+#### Radius and IntervalOfConvergence
+![GIF4](gifs/file4_radius_and_intervalOfConvergence.gif)
+
+#### Uniform Convergence
+![GIF5](gifs/file5_UniformConvergence.gif)
--
cgit
From cea91d6c736439885819a4d44f62221a591d77b7 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:42:48 +0530
Subject: updated question set
---
.../Taylor Series/TaylorSeriesQuestions.pdf | Bin 119804 -> 125254 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf b/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf
index 2096f52..46d46e1 100644
Binary files a/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf and b/FSF-2020/calculus/series-and-transformations/Taylor Series/TaylorSeriesQuestions.pdf differ
--
cgit
From 9b2de268f4be489a4a67c89be1b17d08ed76c25e Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:43:17 +0530
Subject: added gifs
---
.../gifs/file1_Example_TaylorExpansion.gif | Bin 0 -> 446111 bytes
.../gifs/file2_TaylorExpansionGeneralForm.gif | Bin 0 -> 308980 bytes
.../Taylor Series/gifs/file3_radiusOfConvergence.gif | Bin 0 -> 391510 bytes
.../Taylor Series/gifs/file4_DivergentRemainder.gif | Bin 0 -> 160149 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file1_Example_TaylorExpansion.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file3_radiusOfConvergence.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file4_DivergentRemainder.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file1_Example_TaylorExpansion.gif b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file1_Example_TaylorExpansion.gif
new file mode 100644
index 0000000..ecd3272
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file1_Example_TaylorExpansion.gif differ
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
new file mode 100644
index 0000000..e6d9171
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file2_TaylorExpansionGeneralForm.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file3_radiusOfConvergence.gif b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file3_radiusOfConvergence.gif
new file mode 100644
index 0000000..6b22d8d
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file3_radiusOfConvergence.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file4_DivergentRemainder.gif b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file4_DivergentRemainder.gif
new file mode 100644
index 0000000..2bb5185
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Taylor Series/gifs/file4_DivergentRemainder.gif differ
--
cgit
From b1bdfc21dfac1abf82fb10733eb21d098f9532b4 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:43:50 +0530
Subject: Rename script1.py to video1_Example_TaylorExpansion.py.py
---
.../Taylor Series/script1.py | 198 ---------------------
.../video1_Example_TaylorExpansion.py.py | 198 +++++++++++++++++++++
2 files changed, 198 insertions(+), 198 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
deleted file mode 100644
index e83eff8..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/script1.py
+++ /dev/null
@@ -1,198 +0,0 @@
-from manimlib.imports import*
-import math
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-class intro(Scene):
- def construct(self):
- equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
- equation.scale(2)
- equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
- text=TextMobject("let $a=0$")
- text.scale(0.7)
- text.shift(DOWN)
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text))
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- self.wait(1.4)
-
- coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
- coeff[0].shift(3.39*UP+4.88*RIGHT)
- coeff[0].scale(0.5)
- coeff[1].shift(3.39*UP+5.3*RIGHT)
- coeff[1].scale(0.275)
- coeff[2].shift(3.39*UP+5.98*RIGHT)
- coeff[2].scale(0.28)
-
- for obj in coeff:
- obj.set_color(GOLD_A)
-
- firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
- secondApprox=[self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:x+1,color=BLUE),
- self.get_graph(lambda x:-x+1,color=BLUE)]
- thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
-
- firstGraph=self.get_graph(lambda x:1,color=BLUE)
- secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
-
- bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence the","slopes","should","even match")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
-
- bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
- self.wait(1)
- self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
- self.wait(0.6)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
- finalFormula.scale(0.8)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
-
- 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/video1_Example_TaylorExpansion.py.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
new file mode 100644
index 0000000..e83eff8
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
@@ -0,0 +1,198 @@
+from manimlib.imports import*
+import math
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+class intro(Scene):
+ def construct(self):
+ equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
+ equation.scale(2)
+ equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
+ text=TextMobject("let $a=0$")
+ text.scale(0.7)
+ text.shift(DOWN)
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text))
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ self.wait(1.4)
+
+ coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
+ coeff[0].shift(3.39*UP+4.88*RIGHT)
+ coeff[0].scale(0.5)
+ coeff[1].shift(3.39*UP+5.3*RIGHT)
+ coeff[1].scale(0.275)
+ coeff[2].shift(3.39*UP+5.98*RIGHT)
+ coeff[2].scale(0.28)
+
+ for obj in coeff:
+ obj.set_color(GOLD_A)
+
+ firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
+ secondApprox=[self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:x+1,color=BLUE),
+ self.get_graph(lambda x:-x+1,color=BLUE)]
+ thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
+
+ firstGraph=self.get_graph(lambda x:1,color=BLUE)
+ secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
+
+ bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence the","slopes","should","even match")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
+
+ bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
+ self.wait(1)
+ self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
+ self.wait(0.6)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
+ finalFormula.scale(0.8)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
+
+ 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)
+
+
+
+
--
cgit
From 87e674818b1035402d3b5dd3a2f55f1df25eb9e4 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:44:22 +0530
Subject: Rename script2.py to video2_TaylorExpansionGeneralForm.py.py
---
.../Taylor Series/script2.py | 195 ---------------------
.../video2_TaylorExpansionGeneralForm.py.py | 195 +++++++++++++++++++++
2 files changed, 195 insertions(+), 195 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
deleted file mode 100644
index b5d0a53..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/script2.py
+++ /dev/null
@@ -1,195 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class intro(Scene):
- def construct(self):
- 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.scale(0.7)
- text.shift(DOWN)
-
- shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
- shiftText.scale(0.6)
- shiftText.shift(2.4*DOWN)
-
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(Write(shiftText))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- 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)
-
- 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)]
-
- 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)
-
- bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
-
- bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- 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)
- self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- 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)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- 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)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
-
- 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
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
new file mode 100644
index 0000000..f84cfe9
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
@@ -0,0 +1,195 @@
+from manimlib.imports import*
+import math
+
+
+class intro(Scene):
+ def construct(self):
+ 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.scale(0.7)
+ text.shift(DOWN)
+
+ shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
+ shiftText.scale(0.6)
+ shiftText.shift(2.4*DOWN)
+
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(Write(shiftText))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ 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)
+
+ 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)]
+
+ 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)
+
+ bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
+
+ bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ 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)
+ self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ 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)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ 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)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
+
+ 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)
--
cgit
From 1fb63bccdf7d35a6f5c277b836a2477289baa282 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:44:41 +0530
Subject: Rename video1_Example_TaylorExpansion.py.py to
video1_Example_TaylorExpansion.py
---
.../video1_Example_TaylorExpansion.py | 198 +++++++++++++++++++++
.../video1_Example_TaylorExpansion.py.py | 198 ---------------------
2 files changed, 198 insertions(+), 198 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..e83eff8
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py
@@ -0,0 +1,198 @@
+from manimlib.imports import*
+import math
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+class intro(Scene):
+ def construct(self):
+ equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
+ equation.scale(2)
+ equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
+ text=TextMobject("let $a=0$")
+ text.scale(0.7)
+ text.shift(DOWN)
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text))
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ self.wait(1.4)
+
+ coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
+ coeff[0].shift(3.39*UP+4.88*RIGHT)
+ coeff[0].scale(0.5)
+ coeff[1].shift(3.39*UP+5.3*RIGHT)
+ coeff[1].scale(0.275)
+ coeff[2].shift(3.39*UP+5.98*RIGHT)
+ coeff[2].scale(0.28)
+
+ for obj in coeff:
+ obj.set_color(GOLD_A)
+
+ firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
+ secondApprox=[self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:x+1,color=BLUE),
+ self.get_graph(lambda x:-x+1,color=BLUE)]
+ thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1,color=BLUE),
+ self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
+ self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
+
+ firstGraph=self.get_graph(lambda x:1,color=BLUE)
+ secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
+
+ bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence the","slopes","should","even match")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
+
+ bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
+ self.wait(0.5)
+ self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
+ self.wait(1)
+ self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
+ self.wait(0.6)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
+ finalFormula.scale(0.8)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
+
+ 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/video1_Example_TaylorExpansion.py.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
deleted file mode 100644
index e83eff8..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video1_Example_TaylorExpansion.py.py
+++ /dev/null
@@ -1,198 +0,0 @@
-from manimlib.imports import*
-import math
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ x }$+"),TextMobject("${ x }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-class intro(Scene):
- def construct(self):
- equation=TextMobject("$f(x)=$","${ e }^{ -x^{ 2 } }$")
- equation.scale(2)
- equation.set_color_by_tex_to_color_map({"${ e }^{ -x^{ 2 } }$":RED})
- text=TextMobject("let $a=0$")
- text.scale(0.7)
- text.shift(DOWN)
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text))
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- self.wait(1.4)
-
- coeff=[TextMobject("$1$"),TextMobject("$f'(x)$"),TextMobject("$\\frac { f''(x) }{ 2! } $")]
- coeff[0].shift(3.39*UP+4.88*RIGHT)
- coeff[0].scale(0.5)
- coeff[1].shift(3.39*UP+5.3*RIGHT)
- coeff[1].scale(0.275)
- coeff[2].shift(3.39*UP+5.98*RIGHT)
- coeff[2].scale(0.28)
-
- for obj in coeff:
- obj.set_color(GOLD_A)
-
- firstApprox=[self.get_graph(lambda x:1,color=BLUE)]
- secondApprox=[self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:x+1,color=BLUE),
- self.get_graph(lambda x:-x+1,color=BLUE)]
- thirdApprox=[self.get_graph(lambda x:1-2*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1-0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1,color=BLUE),
- self.get_graph(lambda x:1+0.1*math.pow(x,2),color=BLUE),
- self.get_graph(lambda x:1+math.pow(x,2),color=BLUE)]
-
- firstGraph=self.get_graph(lambda x:1,color=BLUE)
- secondGraph=self.get_graph(lambda x:1-math.pow(x,2),color=BLUE)
-
- bottomText1=TextMobject("The polynomial should","satisfy","the function at $x=0$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=1$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence the","slopes","should","even match")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=0$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence the","rate of change of these slopes","should also be","same!")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=-1$")
-
- bottomText1.set_color_by_tex_to_color_map({"satisfy":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=1$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"slopes":BLUE,"even match":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=0$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"rate of change of these slopes":BLUE,"same!":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=-1$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- self.play(ReplacementTransform(firstApprox[0],secondApprox[1]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[1],secondApprox[0]))
- self.wait(0.5)
- self.play(ReplacementTransform(secondApprox[0],secondApprox[2]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText3,bottomText4),FadeOut(secondApprox[2]))
- self.wait(1)
- self.play(Write(firstGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- self.play(ReplacementTransform(firstGraph,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[2],thirdApprox[3]))
- self.wait(0.6)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],secondGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- finalFormula=TextMobject("Hence","$T_{ n }(x)$","=","$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$")
- finalFormula.scale(0.8)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(0)+f'(0)x+\\frac { f''(0) }{ 2! }x^2+..+\\frac { { f }^{ n }(0) }{ n! } { x }^{ n }$":RED})
-
- 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)
-
-
-
-
--
cgit
From 70572f4639b5576090a1b6bf1494803b28611d59 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:45:03 +0530
Subject: Rename video2_TaylorExpansionGeneralForm.py.py to
video2_TaylorExpansionGeneralForm.py
---
.../video2_TaylorExpansionGeneralForm.py | 195 +++++++++++++++++++++
.../video2_TaylorExpansionGeneralForm.py.py | 195 ---------------------
2 files changed, 195 insertions(+), 195 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..f84cfe9
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py
@@ -0,0 +1,195 @@
+from manimlib.imports import*
+import math
+
+
+class intro(Scene):
+ def construct(self):
+ 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.scale(0.7)
+ text.shift(DOWN)
+
+ shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
+ shiftText.scale(0.6)
+ shiftText.shift(2.4*DOWN)
+
+
+ self.play(Write(equation))
+ self.wait(0.5)
+ self.play(FadeIn(text))
+ self.wait(0.7)
+ self.play(Write(shiftText))
+ self.wait(0.7)
+ self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
+
+
+def formFormula(coeff_list,variable_list):
+ coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
+ variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
+ coeff_list[0].shift(2.2*UP+1.6*LEFT)
+ for i in range(0,3):
+ coeff_list[i].set_color(GOLD_A)
+ variable_list[i].next_to(coeff_list[i],buff=0.1)
+ if i!=2:
+ coeff_list[i+1].next_to(variable_list[i],buff=0.1)
+ dots=TextMobject("...")
+ dots.next_to(variable_list[2])
+ expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
+ #expansion.scale(0.7)
+ return expansion,coeff_list
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ generalized_eq_coeff=[]
+ variables_eq=[]
+ eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
+ trText1=TextMobject("let $T_{ n }(x)$:=")
+ eq.next_to(trText1)
+ trTextGrup=VGroup(trText1,eq)
+ trTextGrup.scale(0.5)
+ trTextGrup.to_corner(UP+RIGHT)
+ self.play(Write(trTextGrup))
+ self.setup_axes(animate=True)
+
+ fx=TextMobject("${ e }^{ -x^{ 2 } }$")
+ fx.scale(0.5)
+ fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
+ mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
+ self.play(ShowCreation(mainfunction))
+ self.play(FadeIn(fx))
+ 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)
+
+ 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)]
+
+ 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)
+
+ bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
+ bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
+ bottomText3=TextMobject("Now it could be of","any slope!")
+ #show graphs of second approx
+ bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
+ #final graph
+ bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
+ bottomText6=TextMobject("Since the rate of change of this slope","could vary")
+ #show third approx graphs
+ bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
+ #final graph
+ bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
+
+ bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
+ bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
+ bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
+ bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
+ bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
+ bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
+ bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
+
+ bottomText1.scale(0.4)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.4)
+ bottomText4.scale(0.4)
+ bottomText5.scale(0.5)
+ bottomText6.scale(0.4)
+ bottomText7.scale(0.4)
+ 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)
+
+ self.play(Write(bottomText1))
+ self.wait(1)
+ self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
+ #change coeff in tn(x)
+ self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ 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)
+ self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
+ #change a1 coeff
+ self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText5,bottomText6))
+ 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)
+ self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText6,bottomText7))
+ self.wait(1.5)
+ self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
+ self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
+ self.wait(2)
+
+ textFinal=TextMobject("And so on..!")
+ textFinal.scale(0.7)
+ textFinal.shift(4.5*RIGHT+2.5*DOWN)
+ self.play(ReplacementTransform(bottomText8,textFinal))
+ self.wait(2.5)
+
+ 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)
+ finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
+
+ 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)
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
deleted file mode 100644
index f84cfe9..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/video2_TaylorExpansionGeneralForm.py.py
+++ /dev/null
@@ -1,195 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class intro(Scene):
- def construct(self):
- 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.scale(0.7)
- text.shift(DOWN)
-
- shiftText=TextMobject("(Here we shift the origin to the point $x=1$)")
- shiftText.scale(0.6)
- shiftText.shift(2.4*DOWN)
-
-
- self.play(Write(equation))
- self.wait(0.5)
- self.play(FadeIn(text))
- self.wait(0.7)
- self.play(Write(shiftText))
- self.wait(0.7)
- self.play(FadeOut(equation),FadeOut(text),FadeOut(shiftText))
-
-
-def formFormula(coeff_list,variable_list):
- coeff_list=[TextMobject("${ a }_{ 0 }$"),TextMobject("${ a }_{ 1 }$"),TextMobject("${ a }_{ 2 }$")]
- variable_list=[TextMobject("+"),TextMobject("${ (x-1) }$+"),TextMobject("${ (x-1) }^{ 2 }$")]
- coeff_list[0].shift(2.2*UP+1.6*LEFT)
- for i in range(0,3):
- coeff_list[i].set_color(GOLD_A)
- variable_list[i].next_to(coeff_list[i],buff=0.1)
- if i!=2:
- coeff_list[i+1].next_to(variable_list[i],buff=0.1)
- dots=TextMobject("...")
- dots.next_to(variable_list[2])
- expansion=VGroup(coeff_list[0],coeff_list[1],coeff_list[2],variable_list[0],variable_list[1],variable_list[2],dots)
- #expansion.scale(0.7)
- return expansion,coeff_list
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- generalized_eq_coeff=[]
- variables_eq=[]
- eq,generalized_eq_coeff=formFormula(generalized_eq_coeff,variables_eq)
- trText1=TextMobject("let $T_{ n }(x)$:=")
- eq.next_to(trText1)
- trTextGrup=VGroup(trText1,eq)
- trTextGrup.scale(0.5)
- trTextGrup.to_corner(UP+RIGHT)
- self.play(Write(trTextGrup))
- self.setup_axes(animate=True)
-
- fx=TextMobject("${ e }^{ -x^{ 2 } }$")
- fx.scale(0.5)
- fx.shift(ORIGIN+x_each_unit*7.5*RIGHT+y_each_unit*0.5*UP)
- mainfunction=self.get_graph(lambda x:math.exp(-1*pow(x,2)),color=RED,x_min=-8,x_max=8)
- self.play(ShowCreation(mainfunction))
- self.play(FadeIn(fx))
- 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)
-
- 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)]
-
- 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)
-
- bottomText1=TextMobject("Apply","$f(1)=T_{n}(1)$")
- bottomText2=TextMobject("This gives","$a_{ 0 }=e^{-1}$")
- bottomText3=TextMobject("Now it could be of","any slope!")
- #show graphs of second approx
- bottomText4=TextMobject("Hence","apply","$f'(1)=T_{n}'(1)$")
- #final graph
- bottomText5=TextMobject("This gives","$a_{ 1 }=-2e^{-1}$")
- bottomText6=TextMobject("Since the rate of change of this slope","could vary")
- #show third approx graphs
- bottomText7=TextMobject("Hence also","apply","$f''(1)=T_{ n }''(1)$")
- #final graph
- bottomText8=TextMobject("This gives","$a_{ 2 }=e^{-1}$")
-
- bottomText1.set_color_by_tex_to_color_map({"Apply":YELLOW})
- bottomText2.set_color_by_tex_to_color_map({"$a_{ 0 }=e^{-1}$":BLUE})
- bottomText3.set_color_by_tex_to_color_map({"any slope!":YELLOW})
- bottomText4.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText5.set_color_by_tex_to_color_map({"$a_{ 1 }=-2e^{-1}$":BLUE})
- bottomText6.set_color_by_tex_to_color_map({"could vary":YELLOW})
- bottomText7.set_color_by_tex_to_color_map({"apply":YELLOW})
- bottomText8.set_color_by_tex_to_color_map({"$a_{ 2 }=e^{-1}$":BLUE})
-
- bottomText1.scale(0.4)
- bottomText2.scale(0.5)
- bottomText3.scale(0.4)
- bottomText4.scale(0.4)
- bottomText5.scale(0.5)
- bottomText6.scale(0.4)
- bottomText7.scale(0.4)
- 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)
-
- self.play(Write(bottomText1))
- self.wait(1)
- self.play(ShowCreation(firstApprox[0]),ReplacementTransform(bottomText1,bottomText2))
- #change coeff in tn(x)
- self.play(ReplacementTransform(generalized_eq_coeff[0],coeff[0]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- 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)
- self.play(Write(secondGraph),ReplacementTransform(bottomText4,bottomText5))
- #change a1 coeff
- self.play(ReplacementTransform(generalized_eq_coeff[1],coeff[1]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText5,bottomText6))
- 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)
- self.play(ReplacementTransform(thirdApprox[3],thirdApprox[4]))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText6,bottomText7))
- self.wait(1.5)
- self.play(ReplacementTransform(bottomText7,bottomText8),ReplacementTransform(thirdApprox[4],thirdGraph))
- self.play(ReplacementTransform(generalized_eq_coeff[2],coeff[2]))
- self.wait(2)
-
- textFinal=TextMobject("And so on..!")
- textFinal.scale(0.7)
- textFinal.shift(4.5*RIGHT+2.5*DOWN)
- self.play(ReplacementTransform(bottomText8,textFinal))
- self.wait(2.5)
-
- 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)
- finalFormula.set_color_by_tex_to_color_map({"$T_{ n }(x)$":GREEN,"$f(1)+f'(1)(x-1)+\\frac { f''(1) }{ 2! }(x-1)^2+..+\\frac { { f }^{ n }(1) }{ n! } { (x-1) }^{ n }$":RED})
-
- 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)
--
cgit
From 6a04d04fcb710bf273be0e80471b692aa3f4d451 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:45:25 +0530
Subject: Rename script3.py to video3_radiusOfConvergence.py
---
.../Taylor Series/script3.py | 111 ---------------------
.../Taylor Series/video3_radiusOfConvergence.py | 111 +++++++++++++++++++++
2 files changed, 111 insertions(+), 111 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video3_radiusOfConvergence.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
deleted file mode 100644
index a2870d4..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/script3.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- self.setup_axes(animate=True)
-
- lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
-
- bottomText1=TextMobject("Apply $f(x)=T_{n}(x)$")
- bottomText2=TextMobject("Then apply $f'(x)=T_{n}'(x)$")
- bottomText3=TextMobject("Then apply $f''(x)=T_{n}''(x)$")
- bottomText4=TextMobject("and so on..")
-
- bottomText1.scale(0.5)
- bottomText2.scale(0.5)
- bottomText3.scale(0.5)
- bottomText4.scale(0.5)
-
- bottomText1.shift(3*RIGHT+2*DOWN)
- bottomText2.shift(3*RIGHT+2*DOWN)
- bottomText3.shift(3*RIGHT+2*DOWN)
- bottomText4.shift(3*RIGHT+2*DOWN)
-
- equations=[self.get_graph(lambda x:math.log2(2),color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160,color=BLUE),
- self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)]
-
- terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
- for obj in terms:
- obj.scale(0.5)
-
- terms[0].shift(3*UP+3*RIGHT)
- terms[1].next_to(terms[0],buff=0.1)
- terms[2].next_to(terms[1],buff=0.1)
- terms[3].next_to(terms[2],buff=0.1)
- terms[4].next_to(terms[3],buff=0.1)
-
- self.play(ShowCreation(lnx))
- self.wait(1)
- self.play(Write(bottomText1))
- self.wait(0.5)
- self.play(ShowCreation(equations[0]),Write(terms[0]),Write(terms[1]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText1,bottomText2))
- self.wait(0.5)
- self.play(ReplacementTransform(equations[0],equations[1]),Write(terms[2]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText2,bottomText3))
- self.wait(0.5)
- self.play(ReplacementTransform(equations[1],equations[2]),Write(terms[3]))
- self.wait(1)
- self.play(ReplacementTransform(bottomText3,bottomText4),Write(terms[4]))
- self.wait(1.5)
-
- self.play(FadeOut(terms[0]),FadeOut(terms[1]),FadeOut(terms[2]),FadeOut(terms[3]),FadeOut(terms[4]),FadeOut(bottomText4))
-
- dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
- dline.shift(ORIGIN+x_each_unit*4*RIGHT)
-
- bottomText5=TextMobject("Here","after $x=4$",", the graph","continuously diverges away","from $ln(x)$")
- bottomText5.scale(0.3)
- bottomText5.shift(4.5*RIGHT+2*DOWN)
- bottomText5.set_color_by_tex_to_color_map({"after $x=4$":YELLOW,"continuously diverges away":BLUE})
-
- self.play(Write(bottomText5),Write(dline))
- self.wait(1)
- self.play(ReplacementTransform(equations[2],equations[3]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[3],equations[4]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[4],equations[5]))
- self.wait(0.3)
- self.play(ReplacementTransform(equations[5],equations[6]),FadeOut(bottomText5))
- self.wait(1)
-
- circle=Circle(radius=ORIGIN+x_each_unit*2,color=PURPLE_E)
- circle.shift(ORIGIN+RIGHT*x_each_unit*2)
- radiusLine=Line(start=ORIGIN+x_each_unit*RIGHT*2,end=ORIGIN+x_each_unit*4*RIGHT,color=PURPLE_E)
- radius=TextMobject("$R$")
- radius.set_color(RED)
- radius.scale(0.5)
- radius.shift(ORIGIN+RIGHT*x_each_unit*2.45+DOWN*y_each_unit*0.6)
-
- self.play(FadeOut(equations[6]),Write(circle))
- self.wait(0.6)
- self.play(Write(radiusLine))
- self.play(FadeIn(radius))
- self.wait(2)
\ No newline at end of file
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/video3_radiusOfConvergence.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/video3_radiusOfConvergence.py
new file mode 100644
index 0000000..a68afb6
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video3_radiusOfConvergence.py
@@ -0,0 +1,111 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+
+ bottomText1=TextMobject("Apply $f(x)=T_{n}(x)$")
+ bottomText2=TextMobject("Then apply $f'(x)=T_{n}'(x)$")
+ bottomText3=TextMobject("Then apply $f''(x)=T_{n}''(x)$")
+ bottomText4=TextMobject("and so on..")
+
+ bottomText1.scale(0.5)
+ bottomText2.scale(0.5)
+ bottomText3.scale(0.5)
+ bottomText4.scale(0.5)
+
+ bottomText1.shift(3*RIGHT+2*DOWN)
+ bottomText2.shift(3*RIGHT+2*DOWN)
+ bottomText3.shift(3*RIGHT+2*DOWN)
+ bottomText4.shift(3*RIGHT+2*DOWN)
+
+ equations=[self.get_graph(lambda x:math.log2(2),color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160,color=BLUE),
+ self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)]
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(Write(bottomText1))
+ self.wait(0.5)
+ self.play(ShowCreation(equations[0]),Write(terms[0]),Write(terms[1]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText1,bottomText2))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[0],equations[1]),Write(terms[2]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText2,bottomText3))
+ self.wait(0.5)
+ self.play(ReplacementTransform(equations[1],equations[2]),Write(terms[3]))
+ self.wait(1)
+ self.play(ReplacementTransform(bottomText3,bottomText4),Write(terms[4]))
+ self.wait(1.5)
+
+ self.play(FadeOut(terms[0]),FadeOut(terms[1]),FadeOut(terms[2]),FadeOut(terms[3]),FadeOut(terms[4]),FadeOut(bottomText4))
+
+ dline=DashedLine(start=ORIGIN+8*y_each_unit*UP,end=ORIGIN+8*y_each_unit*DOWN)
+ dline.shift(ORIGIN+x_each_unit*4*RIGHT)
+
+ bottomText5=TextMobject("Here","after $x=4$",", the graph","continuously diverges away","from $ln(x)$")
+ bottomText5.scale(0.3)
+ bottomText5.shift(4.5*RIGHT+2*DOWN)
+ bottomText5.set_color_by_tex_to_color_map({"after $x=4$":YELLOW,"continuously diverges away":BLUE})
+
+ self.play(Write(bottomText5),Write(dline))
+ self.wait(1)
+ self.play(ReplacementTransform(equations[2],equations[3]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[3],equations[4]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[4],equations[5]))
+ self.wait(0.3)
+ self.play(ReplacementTransform(equations[5],equations[6]),FadeOut(bottomText5))
+ self.wait(1)
+
+ circle=Circle(radius=ORIGIN+x_each_unit*2,color=PURPLE_E)
+ circle.shift(ORIGIN+RIGHT*x_each_unit*2)
+ radiusLine=Line(start=ORIGIN+x_each_unit*RIGHT*2,end=ORIGIN+x_each_unit*4*RIGHT,color=PURPLE_E)
+ radius=TextMobject("$R$")
+ radius.set_color(RED)
+ radius.scale(0.5)
+ radius.shift(ORIGIN+RIGHT*x_each_unit*2.45+DOWN*y_each_unit*0.6)
+
+ self.play(FadeOut(equations[6]),Write(circle))
+ self.wait(0.6)
+ self.play(Write(radiusLine))
+ self.play(FadeIn(radius))
+ self.wait(2)
--
cgit
From 476d9b46e164221923e8685fb4a3d07453f5c8cc Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:45:50 +0530
Subject: Rename script4.py to video4_DivergentRemainder.py
---
.../Taylor Series/script4.py | 82 ----------------------
.../Taylor Series/video4_DivergentRemainder.py | 82 ++++++++++++++++++++++
2 files changed, 82 insertions(+), 82 deletions(-)
delete mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py b/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
deleted file mode 100644
index 1f41c97..0000000
--- a/FSF-2020/calculus/series-and-transformations/Taylor Series/script4.py
+++ /dev/null
@@ -1,82 +0,0 @@
-from manimlib.imports import*
-import math
-
-
-class graphScene(GraphScene):
- CONFIG = {
- "x_min": -8,
- "x_max": 8,
- "y_min": -8,
- "y_max": 8,
- "graph_origin": ORIGIN,
- "function_color": RED,
- "axes_color": GREEN,
- "x_axis_label": "$x$",
- "y_axis_label": "$y$",
- "exclude_zero_label": True,
- "x_labeled_nums": range(-8, 8, 1),
- }
- 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)
-
- self.setup_axes(animate=True)
- lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
- equation=self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)
-
- terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
- for obj in terms:
- obj.scale(0.5)
-
- terms[0].shift(3*UP+3*RIGHT)
- terms[1].next_to(terms[0],buff=0.1)
- terms[2].next_to(terms[1],buff=0.1)
- terms[3].next_to(terms[2],buff=0.1)
- terms[4].next_to(terms[3],buff=0.1)
-
- self.play(ShowCreation(lnx))
- self.wait(1)
- self.play(FadeIn(equation),FadeIn(terms[0]),FadeIn(terms[1]),FadeIn(terms[2]),FadeIn(terms[3]),FadeIn(terms[4]))
- self.wait(1)
-
- 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)
- increasingText=TextMobject("Increases!")
- increasingText.set_color(GREEN)
- followupText=TextMobject("as n increase!")
- followupText.scale(0.3)
- followupText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.1)
- increasingText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.6)
- 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)
-
- area1=self.get_riemann_rectangles(lnx,x_max=8,x_min=4,dx=0.01,start_color=BLUE,end_color=RED,stroke_width=0,fill_opacity=0.8)
- area2=self.get_riemann_rectangles(equation,x_max=5.2,x_min=4,dx=0.025,start_color=BLACK,end_color=BLACK,stroke_width=0,fill_opacity=1)
-
- 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
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
new file mode 100644
index 0000000..5389039
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/video4_DivergentRemainder.py
@@ -0,0 +1,82 @@
+from manimlib.imports import*
+import math
+
+
+class graphScene(GraphScene):
+ CONFIG = {
+ "x_min": -8,
+ "x_max": 8,
+ "y_min": -8,
+ "y_max": 8,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_axis_label": "$x$",
+ "y_axis_label": "$y$",
+ "exclude_zero_label": True,
+ "x_labeled_nums": range(-8, 8, 1),
+ }
+ 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)
+
+ self.setup_axes(animate=True)
+ lnx=self.get_graph(lambda x:math.log2(x),color=RED,x_min=0.01,x_max=8)
+ equation=self.get_graph(lambda x:math.log2(2)+(x-2)/2-((x-2)**2)/8+((x-2)**3)/24-((x-2)**4)/64+((x-2)**5)/160-((x-2)**6)/384,color=BLUE)
+
+ terms=[TextMobject("$T_{n}:=$"),TextMobject("$ln(2)$"),TextMobject("$+\\frac { x-2 }{ 2 } $"),TextMobject("$-\\frac { (x-2)^{2} }{ 8 }$"),TextMobject("+..")]
+ for obj in terms:
+ obj.scale(0.5)
+
+ terms[0].shift(3*UP+3*RIGHT)
+ terms[1].next_to(terms[0],buff=0.1)
+ terms[2].next_to(terms[1],buff=0.1)
+ terms[3].next_to(terms[2],buff=0.1)
+ terms[4].next_to(terms[3],buff=0.1)
+
+ self.play(ShowCreation(lnx))
+ self.wait(1)
+ self.play(FadeIn(equation),FadeIn(terms[0]),FadeIn(terms[1]),FadeIn(terms[2]),FadeIn(terms[3]),FadeIn(terms[4]))
+ self.wait(1)
+
+ 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)
+ increasingText=TextMobject("Increases!")
+ increasingText.set_color(GREEN)
+ followupText=TextMobject("as n increase!")
+ followupText.scale(0.3)
+ followupText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.1)
+ increasingText.shift(ORIGIN+x_each_unit*11*RIGHT+UP*y_each_unit*1.6)
+ 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)
+
+ area1=self.get_riemann_rectangles(lnx,x_max=8,x_min=4,dx=0.01,start_color=BLUE,end_color=RED,stroke_width=0,fill_opacity=0.8)
+ area2=self.get_riemann_rectangles(equation,x_max=5.2,x_min=4,dx=0.025,start_color=BLACK,end_color=BLACK,stroke_width=0,fill_opacity=1)
+
+ 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)
+
--
cgit
From a933eb11ef98b70dbfec23d49e7b2cb97389c5de Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Tue, 26 May 2020 14:49:37 +0530
Subject: Added gifs to readme.md
---
.../series-and-transformations/Taylor Series/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md b/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
new file mode 100644
index 0000000..ce3b088
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Taylor Series/README.md
@@ -0,0 +1,11 @@
+#### Example of Taylors expansion
+![GIF1](gifs/file1_Example_TaylorExpansion.gif)
+
+#### Taylor Series GeneralForm
+![GIF2](gifs/file2_TaylorExpansionGeneralForm.gif)
+
+#### Radius Of Convergence
+![GIF3](gifs/file3_radiusOfConvergence.gif)
+
+#### Divergence of a Remainder
+![GIF4](gifs/file4_DivergentRemainder.gif)
--
cgit
From 58a5802578af41558b26ac1c09b2983552698b58 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Wed, 27 May 2020 03:20:12 +0530
Subject: new animation
---
.../fubini's-theorem/file3_iteration_methods.gif | Bin 0 -> 1762897 bytes
.../fubini's-theorem/file3_iteration_methods.py | 428 +++++++++++++++++++++
.../fubini's-theorem/iteration_methods_check.py | 226 +++++++++++
3 files changed, 654 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
(limited to 'FSF-2020')
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/file3_iteration_methods.gif
new file mode 100644
index 0000000..e73dd8e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
new file mode 100644
index 0000000..662242a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
@@ -0,0 +1,428 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_limit=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_limit,DOWN,buff=.5
+ ).align_to(
+ caption_limit,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+
+ self.play(Write(caption_limit))
+ self.get_rects()
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+
+ self.integral_setup(int_lim,first_y=True)
+
+
+ self.another_method_scene()
+ self.remove(self.area)
+ self.wait()
+
+ c1_eqn_y=self.get_graph_label(
+ curve1,
+ label="x=\sqrt y",
+ x_val=.6,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+ c2_eqn_y=self.get_graph_label(
+ curve2,
+ label="x=y",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.play(
+ ReplacementTransform(c1_eqn,c1_eqn_y),
+ ReplacementTransform(c2_eqn,c2_eqn_y)
+ )
+ self.get_rects(base_y=True)
+ self.show_integral_values_at_different_y()
+ self.wait(1)
+
+ int_lim_y=int_lim.copy()
+ int_lim_y.next_to(int_lim,DOWN)
+ equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
+ self.add(equal,int_lim_y)
+
+ self.integral_setup(int_lim_y,first_y=False)
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+ def another_method_scene(self):
+ text=TextMobject(r"The other method\\ of iteration")
+ text.next_to(self.curve1,UP,buff=-1)
+ self.play(GrowFromCenter(text))
+ self.wait(2)
+ self.play(LaggedStart(FadeOut(text),lag_ratio=2))
+
+ def integral_setup(self,ref_object,first_y=True):
+ if first_y:
+ area=self.get_area()
+ self.area=area
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+ else:
+ area=self.get_area(base_y=True)
+ self.area=area
+ self.play(
+ FadeOut(self.y_brace_group),
+ Rotate(self.x_int,PI/2)
+ )
+ self.play(ApplyMethod(
+ self.x_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+ self.play(ApplyMethod(
+ self.dy_label.next_to,
+ self.x_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+
+ def get_area(self,base_y=False):
+ if base_y:
+ area = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_area = area
+ else:
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.area = area
+
+ # self.transform_between_riemann_rects(self.rects,area)
+ return area
+
+ def get_rects(self,base_y=False):
+ if base_y:
+ rects = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_rects=rects
+ else:
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.rects=rects
+ # self.transform_between_riemann_rects(self.area,rects)
+
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[6*rp:7*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+ def show_integral_values_at_different_y(self):
+ rects=self.y_rects
+ rect = rects[len(rects)*1//10]
+ dy_brace = Brace(rect, LEFT, buff = 0)
+ dy_label = dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_group = VGroup(dy_brace,dy_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[5*rp:6*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, DOWN, buff =.1)
+ x_int = TexMobject("\\int_{y}^{\sqrt y}dx").rotate(-PI/2)
+ x_int.next_to(brace, DOWN, SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dy_brace_group.next_to, rect, LEFT, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_x_int, x_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(x_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_x_int = x_int
+
+ x_int = last_x_int
+ y_brace = last_brace
+ self.y_brace_group=VGroup(y_brace,dy_brace,rect)
+ self.x_int=x_int
+ self.dy_label=dy_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+ def bounded_riemann_rectangles_y(
+ self,
+ graph1,
+ graph2,
+ y_min=None,
+ y_max=None,
+ dy=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ y_min = y_min if y_min is not None else self.y_min
+ y_max = y_max if y_max is not None else self.y_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ y_range = np.arange(y_min, y_max, dy)
+ colors = color_gradient([start_color, end_color], len(y_range))
+ for y, color in zip(y_range, colors):
+ if input_sample_type == "left":
+ sample_input = y
+ elif input_sample_type == "right":
+ sample_input = y + dy
+ elif input_sample_type == "center":
+ sample_input = y + 0.5 * dy
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.coords_to_point(
+ graph1(sample_input),sample_input
+ )
+ dy_input=sample_input + width_scale_factor * dy
+ graph1_point_dy= self.coords_to_point(
+ graph1(dy_input),dy_input
+ )
+ graph2_point = self.coords_to_point(
+ graph2(sample_input),sample_input
+ )
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dy,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
new file mode 100644
index 0000000..55f91d3
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
@@ -0,0 +1,226 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.5,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_y_int=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_y_int,DOWN,buff=.5
+ ).align_to(
+ caption_y_int,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+ rects=self.get_rects()
+
+ self.play(Write(caption_y_int))
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ int_lim,RIGHT,buff=0))
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT))
+
+ self.show_area()
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+
+ def show_area(self):
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def get_rects(self):
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[4*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
--
cgit
From 8d57d47df8325601b70fa6611a68d8ed7dd56dc4 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Wed, 27 May 2020 03:26:24 +0530
Subject: checkpoint of file3 add
---
.../fubini's-theorem/iteration_methods_check.gif | Bin 0 -> 465521 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif
new file mode 100644
index 0000000..2e507f9
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif differ
--
cgit
From 6d2ae3ea9e4925cab7482cf56b7ed6da1d7314fb Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Wed, 27 May 2020 10:22:17 +0530
Subject: update file names
---
.../fubini's-theorem/file3_iteration_methods.gif | Bin 1762897 -> 0 bytes
.../fubini's-theorem/file3_iteration_methods.py | 428 ---------------------
.../file3_iteration_methods_checkpoint.gif | Bin 0 -> 465521 bytes
.../file3_iteration_methods_checkpoint.py | 226 +++++++++++
.../fubini's-theorem/file4_iteration_methods.gif | Bin 0 -> 1762897 bytes
.../fubini's-theorem/file4_iteration_methods.py | 428 +++++++++++++++++++++
.../fubini's-theorem/iteration_methods_check.gif | Bin 465521 -> 0 bytes
.../fubini's-theorem/iteration_methods_check.py | 226 -----------
8 files changed, 654 insertions(+), 654 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
(limited to 'FSF-2020')
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/file3_iteration_methods.gif
deleted file mode 100644
index e73dd8e..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
deleted file mode 100644
index 662242a..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
+++ /dev/null
@@ -1,428 +0,0 @@
-from manimlib.imports import *
-
-class IterationMethods(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 1,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,2)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
- "area_color": PINK ,
- "area_opacity": .6,
- }
-
- 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.intro_scene()
- self.setup_axes(animate=True)
-
-
- curve1= self.get_graph(
- lambda x : x**2 ,
- x_min = 0,
- x_max = 1,
- color = ORANGE)
- c1_eqn=self.get_graph_label(
- curve1,
- label="y=x^2",
- x_val=.5,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
-
- curve2= self.get_graph(
- lambda x : x ,
- x_min = 0,
- x_max = 1,
- color = YELLOW)
- c2_eqn=self.get_graph_label(
- curve2,
- label="y=x",
- x_val=.7,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.curve1=curve1
- self.curve2=curve2
-
- caption_limit=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
- int_lim=TextMobject(
- "$$\\int_0^1$$"
- ).next_to(
- caption_limit,DOWN,buff=.5
- ).align_to(
- caption_limit,LEFT
- )
-
- self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
-
- self.play(Write(caption_limit))
- self.get_rects()
- self.show_integral_values_at_different_x()
- self.wait(1)
- self.add(int_lim)
-
- self.integral_setup(int_lim,first_y=True)
-
-
- self.another_method_scene()
- self.remove(self.area)
- self.wait()
-
- c1_eqn_y=self.get_graph_label(
- curve1,
- label="x=\sqrt y",
- x_val=.6,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
- c2_eqn_y=self.get_graph_label(
- curve2,
- label="x=y",
- x_val=.7,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.play(
- ReplacementTransform(c1_eqn,c1_eqn_y),
- ReplacementTransform(c2_eqn,c2_eqn_y)
- )
- self.get_rects(base_y=True)
- self.show_integral_values_at_different_y()
- self.wait(1)
-
- int_lim_y=int_lim.copy()
- int_lim_y.next_to(int_lim,DOWN)
- equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
- self.add(equal,int_lim_y)
-
- self.integral_setup(int_lim_y,first_y=False)
-
- self.wait(2)
-
- ###################
- def intro_scene(self):
- text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
- self.play(Write(text),run_time=4)
- self.wait(2)
- self.play(FadeOut(text))
-
- def another_method_scene(self):
- text=TextMobject(r"The other method\\ of iteration")
- text.next_to(self.curve1,UP,buff=-1)
- self.play(GrowFromCenter(text))
- self.wait(2)
- self.play(LaggedStart(FadeOut(text),lag_ratio=2))
-
- def integral_setup(self,ref_object,first_y=True):
- if first_y:
- area=self.get_area()
- self.area=area
- self.play(FadeOut(self.brace_group))
- self.play(ApplyMethod(
- self.y_int.next_to,
- ref_object,RIGHT,buff=0)
- )
-
- self.play(ApplyMethod(
- self.dx_label.next_to,
- self.y_int,RIGHT),
- ShowCreation(area),run_time=4
- )
- else:
- area=self.get_area(base_y=True)
- self.area=area
- self.play(
- FadeOut(self.y_brace_group),
- Rotate(self.x_int,PI/2)
- )
- self.play(ApplyMethod(
- self.x_int.next_to,
- ref_object,RIGHT,buff=0)
- )
- self.play(ApplyMethod(
- self.dy_label.next_to,
- self.x_int,RIGHT),
- ShowCreation(area),run_time=4
- )
-
- def get_area(self,base_y=False):
- if base_y:
- area = self.bounded_riemann_rectangles_y(
- lambda x: x,
- lambda x: np.sqrt(x),
- y_min = 0,
- y_max = 1,
- dy =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.y_area = area
- else:
- area = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.area = area
-
- # self.transform_between_riemann_rects(self.rects,area)
- return area
-
- def get_rects(self,base_y=False):
- if base_y:
- rects = self.bounded_riemann_rectangles_y(
- lambda x: x,
- lambda x: np.sqrt(x),
- y_min = 0,
- y_max = 1,
- dy =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.y_rects=rects
- else:
- rects = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.rects=rects
- # self.transform_between_riemann_rects(self.area,rects)
-
- return rects
-
- def show_integral_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/20)
- rects_subset = rects[6*rp:7*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff =.1)
- y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
- y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y_int, y_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y_int = y_int
-
- y_int = last_y_int
- y_brace = last_brace
- self.brace_group=VGroup(y_brace,dx_brace,rect)
- self.y_int=y_int
- self.dx_label=dx_label
-
- def show_integral_values_at_different_y(self):
- rects=self.y_rects
- rect = rects[len(rects)*1//10]
- dy_brace = Brace(rect, LEFT, buff = 0)
- dy_label = dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_group = VGroup(dy_brace,dy_label)
- rp=int(len(rects)/20)
- rects_subset = rects[5*rp:6*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, DOWN, buff =.1)
- x_int = TexMobject("\\int_{y}^{\sqrt y}dx").rotate(-PI/2)
- x_int.next_to(brace, DOWN, SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dy_brace_group.next_to, rect, LEFT, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_x_int, x_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(x_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_x_int = x_int
-
- x_int = last_x_int
- y_brace = last_brace
- self.y_brace_group=VGroup(y_brace,dy_brace,rect)
- self.x_int=x_int
- self.dy_label=dy_label
-
-
- def bounded_riemann_rectangles(
- self,
- graph1,
- graph2,
- x_min=None,
- x_max=None,
- dx=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- x_min = x_min if x_min is not None else self.x_min
- x_max = x_max if x_max is not None else self.x_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- x_range = np.arange(x_min, x_max, dx)
- colors = color_gradient([start_color, end_color], len(x_range))
- for x, color in zip(x_range, colors):
- if input_sample_type == "left":
- sample_input = x
- elif input_sample_type == "right":
- sample_input = x + dx
- elif input_sample_type == "center":
- sample_input = x + 0.5 * dx
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.input_to_graph_point(sample_input, graph1)
- graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
- graph2_point = self.input_to_graph_point(sample_input, graph2)
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dx,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
- def bounded_riemann_rectangles_y(
- self,
- graph1,
- graph2,
- y_min=None,
- y_max=None,
- dy=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- y_min = y_min if y_min is not None else self.y_min
- y_max = y_max if y_max is not None else self.y_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- y_range = np.arange(y_min, y_max, dy)
- colors = color_gradient([start_color, end_color], len(y_range))
- for y, color in zip(y_range, colors):
- if input_sample_type == "left":
- sample_input = y
- elif input_sample_type == "right":
- sample_input = y + dy
- elif input_sample_type == "center":
- sample_input = y + 0.5 * dy
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.coords_to_point(
- graph1(sample_input),sample_input
- )
- dy_input=sample_input + width_scale_factor * dy
- graph1_point_dy= self.coords_to_point(
- graph1(dy_input),dy_input
- )
- graph2_point = self.coords_to_point(
- graph2(sample_input),sample_input
- )
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dy,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
-
-#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif
new file mode 100644
index 0000000..2e507f9
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
new file mode 100644
index 0000000..55f91d3
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
@@ -0,0 +1,226 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.5,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_y_int=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_y_int,DOWN,buff=.5
+ ).align_to(
+ caption_y_int,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+ rects=self.get_rects()
+
+ self.play(Write(caption_y_int))
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ int_lim,RIGHT,buff=0))
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT))
+
+ self.show_area()
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+
+ def show_area(self):
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def get_rects(self):
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[4*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif
new file mode 100644
index 0000000..e73dd8e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
new file mode 100644
index 0000000..662242a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
@@ -0,0 +1,428 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_limit=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_limit,DOWN,buff=.5
+ ).align_to(
+ caption_limit,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+
+ self.play(Write(caption_limit))
+ self.get_rects()
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+
+ self.integral_setup(int_lim,first_y=True)
+
+
+ self.another_method_scene()
+ self.remove(self.area)
+ self.wait()
+
+ c1_eqn_y=self.get_graph_label(
+ curve1,
+ label="x=\sqrt y",
+ x_val=.6,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+ c2_eqn_y=self.get_graph_label(
+ curve2,
+ label="x=y",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.play(
+ ReplacementTransform(c1_eqn,c1_eqn_y),
+ ReplacementTransform(c2_eqn,c2_eqn_y)
+ )
+ self.get_rects(base_y=True)
+ self.show_integral_values_at_different_y()
+ self.wait(1)
+
+ int_lim_y=int_lim.copy()
+ int_lim_y.next_to(int_lim,DOWN)
+ equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
+ self.add(equal,int_lim_y)
+
+ self.integral_setup(int_lim_y,first_y=False)
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+ def another_method_scene(self):
+ text=TextMobject(r"The other method\\ of iteration")
+ text.next_to(self.curve1,UP,buff=-1)
+ self.play(GrowFromCenter(text))
+ self.wait(2)
+ self.play(LaggedStart(FadeOut(text),lag_ratio=2))
+
+ def integral_setup(self,ref_object,first_y=True):
+ if first_y:
+ area=self.get_area()
+ self.area=area
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+ else:
+ area=self.get_area(base_y=True)
+ self.area=area
+ self.play(
+ FadeOut(self.y_brace_group),
+ Rotate(self.x_int,PI/2)
+ )
+ self.play(ApplyMethod(
+ self.x_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+ self.play(ApplyMethod(
+ self.dy_label.next_to,
+ self.x_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+
+ def get_area(self,base_y=False):
+ if base_y:
+ area = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_area = area
+ else:
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.area = area
+
+ # self.transform_between_riemann_rects(self.rects,area)
+ return area
+
+ def get_rects(self,base_y=False):
+ if base_y:
+ rects = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_rects=rects
+ else:
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.rects=rects
+ # self.transform_between_riemann_rects(self.area,rects)
+
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[6*rp:7*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+ def show_integral_values_at_different_y(self):
+ rects=self.y_rects
+ rect = rects[len(rects)*1//10]
+ dy_brace = Brace(rect, LEFT, buff = 0)
+ dy_label = dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_group = VGroup(dy_brace,dy_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[5*rp:6*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, DOWN, buff =.1)
+ x_int = TexMobject("\\int_{y}^{\sqrt y}dx").rotate(-PI/2)
+ x_int.next_to(brace, DOWN, SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dy_brace_group.next_to, rect, LEFT, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_x_int, x_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(x_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_x_int = x_int
+
+ x_int = last_x_int
+ y_brace = last_brace
+ self.y_brace_group=VGroup(y_brace,dy_brace,rect)
+ self.x_int=x_int
+ self.dy_label=dy_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+ def bounded_riemann_rectangles_y(
+ self,
+ graph1,
+ graph2,
+ y_min=None,
+ y_max=None,
+ dy=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ y_min = y_min if y_min is not None else self.y_min
+ y_max = y_max if y_max is not None else self.y_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ y_range = np.arange(y_min, y_max, dy)
+ colors = color_gradient([start_color, end_color], len(y_range))
+ for y, color in zip(y_range, colors):
+ if input_sample_type == "left":
+ sample_input = y
+ elif input_sample_type == "right":
+ sample_input = y + dy
+ elif input_sample_type == "center":
+ sample_input = y + 0.5 * dy
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.coords_to_point(
+ graph1(sample_input),sample_input
+ )
+ dy_input=sample_input + width_scale_factor * dy
+ graph1_point_dy= self.coords_to_point(
+ graph1(dy_input),dy_input
+ )
+ graph2_point = self.coords_to_point(
+ graph2(sample_input),sample_input
+ )
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dy,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif
deleted file mode 100644
index 2e507f9..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
deleted file mode 100644
index 55f91d3..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/iteration_methods_check.py
+++ /dev/null
@@ -1,226 +0,0 @@
-from manimlib.imports import *
-
-class IterationMethods(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 1,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,2)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+4*LEFT+3*DOWN,
- "area_color": PINK ,
- "area_opacity": .6,
- }
-
- 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.intro_scene()
- self.setup_axes(animate=True)
-
-
- curve1= self.get_graph(
- lambda x : x**2 ,
- x_min = 0,
- x_max = 1,
- color = ORANGE)
- c1_eqn=self.get_graph_label(
- curve1,
- label="y=x^2",
- x_val=.5,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
-
- curve2= self.get_graph(
- lambda x : x ,
- x_min = 0,
- x_max = 1,
- color = YELLOW)
- c2_eqn=self.get_graph_label(
- curve2,
- label="y=x",
- x_val=.5,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.curve1=curve1
- self.curve2=curve2
-
- caption_y_int=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
- int_lim=TextMobject(
- "$$\\int_0^1$$"
- ).next_to(
- caption_y_int,DOWN,buff=.5
- ).align_to(
- caption_y_int,LEFT
- )
-
- self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
- rects=self.get_rects()
-
- self.play(Write(caption_y_int))
- self.show_integral_values_at_different_x()
- self.wait(1)
- self.add(int_lim)
- self.play(FadeOut(self.brace_group))
- self.play(ApplyMethod(
- self.y_int.next_to,
- int_lim,RIGHT,buff=0))
-
- self.play(ApplyMethod(
- self.dx_label.next_to,
- self.y_int,RIGHT))
-
- self.show_area()
-
- self.wait(2)
-
- ###################
- def intro_scene(self):
- text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
- self.play(Write(text),run_time=4)
- self.wait(2)
- self.play(FadeOut(text))
-
-
- def show_area(self):
- area = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity = 1,
- stroke_width = 0,
- )
- self.play(ShowCreation(area))
- # self.transform_between_riemann_rects(self.rects,area)
- self.area = area
-
- def get_rects(self):
- rects = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- # self.transform_between_riemann_rects(self.area,rects)
- self.rects=rects
- return rects
-
- def show_integral_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/10)
- rects_subset = self.rects[4*rp:5*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff =.1)
- y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
- y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y_int, y_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y_int = y_int
-
- y_int = last_y_int
- y_brace = last_brace
- self.brace_group=VGroup(y_brace,dx_brace,rect)
- self.y_int=y_int
- self.dx_label=dx_label
-
-
- def bounded_riemann_rectangles(
- self,
- graph1,
- graph2,
- x_min=None,
- x_max=None,
- dx=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- x_min = x_min if x_min is not None else self.x_min
- x_max = x_max if x_max is not None else self.x_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- x_range = np.arange(x_min, x_max, dx)
- colors = color_gradient([start_color, end_color], len(x_range))
- for x, color in zip(x_range, colors):
- if input_sample_type == "left":
- sample_input = x
- elif input_sample_type == "right":
- sample_input = x + dx
- elif input_sample_type == "center":
- sample_input = x + 0.5 * dx
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.input_to_graph_point(sample_input, graph1)
- graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
- graph2_point = self.input_to_graph_point(sample_input, graph2)
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dx,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
-#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
--
cgit
From 730cd6af1e4478d9ebf9051e06abdc4d318f72d6 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 18:48:27 +0530
Subject: Add files via upload
---
.../vector-spaces/Vector-Spaces/3D_Vector_Space.py | 14 +++
.../Vector-Spaces/Vector_Addition_and_Scaling.py | 137 +++++++++++++++++++++
.../Vector-Spaces/Vector_Space_As_Functions.py | 62 ++++++++++
3 files changed, 213 insertions(+)
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
new file mode 100644
index 0000000..70913eb
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
@@ -0,0 +1,14 @@
+from manimlib.imports import *
+class ThreeDSpace(ThreeDScene):
+ def construct(self):
+ curve = ParametricFunction(
+ lambda x: np.array([
+ 0, -x , x]), color = YELLOW, t_min = -2, t_max = 2)
+ axes = ThreeDAxes()
+ axes.set_stroke(width=1,color=GOLD)
+ self.add(axes)
+ self.set_camera_orientation(phi = 70*DEGREES,theta =60*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+ self.play(ShowCreation(curve))
+ self.wait(6)
+
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
new file mode 100644
index 0000000..70af123
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
@@ -0,0 +1,137 @@
+from manimlib.imports import *
+import numpy as np
+
+class vectorspace(GraphScene):
+ CONFIG={
+ "x_min": -7,
+ "x_max": 7,
+ "y_min": -7,
+ "y_max": 7,
+ "graph_origin": ORIGIN,
+ "x_axis_label":"$X$",
+ "y_axis_label":"$Y$",
+ "x_labeled_nums": list(np.arange(-7, 8,1)),
+ "y_labeled_nums": list(np.arange(-7, 8,1)),
+ "x_axis_width": 8,
+ "y_axis_height": 7,
+ "x_tick_frequency":1,
+ "axes_color": GREY,
+ "area_opacity": 3,
+ "num_rects": 10,
+ }
+ def construct(self):
+ XD = self.x_axis_width/(self.x_max- self.x_min)
+ YD = self.y_axis_height/(self.y_max- self.y_min)
+ a1=1*XD*RIGHT+2*YD*UP
+ a2=1*XD*RIGHT+1*YD*UP
+ vec1=Vector(direction=a1).set_color(RED_E)
+ vec1.shift(self.graph_origin)
+ vec2=Vector(direction=a2).set_color(YELLOW_E)
+ vec2.shift(self.graph_origin)
+ vec1_text=TextMobject(r"$\vec{a}$")
+ vec2_text=TextMobject(r"$\vec{b}$")
+ vec1_text=(vec1_text.shift(self.graph_origin+a1+0.2)).scale(.7)
+ vec2_text=(vec2_text.shift(self.graph_origin+a2+0.2)).scale(.7)
+ self.setup_axes(animate=True)
+ self.wait(2)
+ self.play(ShowCreation(vec1))
+ self.play(ShowCreation(vec1_text))
+ self.wait(.7)
+ self.play(ShowCreation(vec2))
+ self.play(ShowCreation(vec2_text))
+ self.wait(.7)
+ a=TextMobject(r"$\vec{a} = (1,2)$",color=RED_B).scale(.6)
+ a.shift(3*LEFT+2.7*UP)
+ b=TextMobject(r"$\vec{b} = (1,1)$",color=YELLOW_E).scale(.6)
+ b.shift(3*LEFT+2*UP)
+ self.play(ShowCreation(a))
+ self.play(ShowCreation(b))
+ self.wait(.5)
+ c=TextMobject(r"$2\cdot\vec{a} = 2\cdot(1,2) = (2,4)$",color=RED_B)
+ c.shift(3*LEFT+2.7*UP)
+ c.scale(.6)
+ self.play(Transform(a,c))
+ scaling1=TextMobject(r"Scaling vector $\vec{a}$ by 2 units",color=GOLD).scale(.5)
+ scaling1.shift(3.4*RIGHT+2.4*UP)
+ self.play(ShowCreation(scaling1))
+ a1=2*XD*RIGHT+4*YD*UP
+ self.play(FadeOut(vec1_text))
+ vec1_scaled=Vector(direction=a1).set_color(RED_E)
+ vec1_scaled.shift(self.graph_origin)
+ self.play(ShowCreation(vec1_scaled))
+ self.play(FadeOut(vec1))
+ vec1_scaled_text=TextMobject(r"$2\vec{a}$").scale(.7)
+ vec1_scaled_text.shift(self.graph_origin+a1+0.2)
+ self.play(ShowCreation(vec1_scaled_text))
+ self.play(FadeOut(scaling1))
+ d=TextMobject(r"$3\cdot\vec{b} = 3\cdot(1,1) = (3,3)$",color=YELLOW_E).scale(.6)
+ d.shift(3*LEFT+2*UP)
+ self.play(Transform(b,d))
+ scaling2=TextMobject(r"Scaling vector $\vec{b}$ by 3 units",color=GOLD).scale(.5)
+ scaling2.shift(3.4*RIGHT+2.4*UP)
+ self.play(ShowCreation(scaling2))
+ a2=3*XD*RIGHT+3*YD*UP
+ self.play(FadeOut(vec2_text))
+ vec2_2=Vector
+ vec2_scaled=Vector(direction=a2).set_color(YELLOW_E)
+ vec2_scaled.shift(self.graph_origin)
+ self.play(ShowCreation(vec2_scaled))
+ self.play(FadeOut(vec2))
+ vec2_scaled_text=TextMobject(r"$3\vec{b}$").scale(.7)
+ vec2_scaled_text.shift(self.graph_origin+a2+0.2)
+ self.play(ShowCreation(vec2_scaled_text))
+ self.wait(.7)
+ self.play(FadeOut(scaling2))
+ add = TextMobject("+").scale(.7)
+ add.shift(4.8*LEFT+2*UP)
+ self.play(ShowCreation(add))
+ self.wait(.5)
+ line = Line()
+ line.shift(3*LEFT+1.6*UP)
+ line.scale(1.8)
+ self.play(ShowCreation(line))
+ self.wait(1)
+ e = TextMobject(r"$\vec{c} = 2\cdot\vec{a} + 3\cdot\vec{b} = (5,7)$",color=GREEN_D).scale(.6)
+ e.shift(3*LEFT+1.3*UP)
+ self.play(ShowCreation(e))
+ self.wait(.5)
+ add1=TextMobject("Addition of the scaled vectors",color=GOLD).scale(.5)
+ add1.shift(4.1*RIGHT+2.4*UP)
+ self.play(ShowCreation(add1))
+ self.wait(.5)
+ self.play(FadeOut(vec1_scaled_text))
+ self.play(FadeOut(vec2_scaled_text))
+ self.play(FadeOut(vec1_scaled))
+ vec1_scaled2=Vector(direction=a1).set_color(RED_E)
+ vec1_scaled2.shift(self.graph_origin+3*RIGHT*XD+3*UP*YD)
+ self.play(ShowCreation(vec1_scaled2))
+ a3=5*XD*RIGHT+7*YD*UP
+ vec3=Vector(direction=a3).set_color(GREEN_C)
+ vec3.shift(self.graph_origin)
+ vec3_text=TextMobject(r"$\vec{c}$").scale(.7)
+ vec3_text.shift(self.graph_origin+a3+0.2)
+ self.play(ShowCreation(vec3))
+ self.wait(.5)
+ self.play(ShowCreation(vec3_text))
+ self.wait(1)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
new file mode 100644
index 0000000..4f5614d
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
@@ -0,0 +1,62 @@
+from manimlib.imports import *
+from scipy import sin,cos
+class FunctionalVectorSpace(GraphScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ }
+ def construct(self):
+ self.setup_axes(animate = True)
+ curve1 = self.get_graph(lambda x : sin(x), x_min=-5,x_max=5,color=YELLOW_E)
+ curve2 = self.get_graph(lambda x : cos(x), x_min=-5,x_max=5,color=RED)
+ self.play(ShowCreation(curve1))
+ fx=TextMobject(r"$f(x)$",color=YELLOW_E).scale(0.7)
+ fx.shift(5*LEFT+0.7*UP)
+ self.play(ShowCreation(fx))
+ self.play(ShowCreation(curve2))
+ gx=TextMobject(r"$g(x)$",color=RED).scale(0.7)
+ gx.shift(5*LEFT+0.2*UP)
+ self.play(ShowCreation(gx))
+ self.wait(2)
+ scaling=TextMobject("Scaling f(x) by 2 units",color=GOLD).scale(0.65)
+ scaling.shift(3*LEFT+2.4*UP)
+ curve3 = self.get_graph(lambda x : 2*sin(x), x_min=-5,x_max=5,color=BLUE)
+ fx2=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
+ fx2.shift(5*LEFT+1*UP)
+ self.play(Transform(curve1,curve3),FadeOut(fx),ShowCreation(fx2),ShowCreation(scaling))
+ self.wait(3)
+ hx = TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
+ hx.shift(4.9*LEFT+1.5*UP)
+ curve4 = self.get_graph(lambda x : 2*sin(x) + cos(x), x_min=-5,x_max=5,color=PURPLE)
+ self.play(ShowCreation(curve4),ShowCreation(hx))
+ self.play(FadeOut(curve2),FadeOut(curve1),FadeOut(fx2),FadeOut(gx),FadeOut(scaling))
+ hxn=TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
+ hxn.shift(3*RIGHT+2.4*UP)
+ equal = TextMobject("=").scale(0.7)
+ equal.shift(3.5*RIGHT+2.4*UP)
+ fx2n=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
+ fx2n.shift(4.2*RIGHT+2.4*UP)
+ add=TextMobject("+").scale(0.7)
+ add.shift(4.8*RIGHT+2.4*UP)
+ gxn=TextMobject(r"$g(x)$",color=RED).scale(0.7)
+ gxn.shift(5.3*RIGHT+2.4*UP)
+ vector_add=TextMobject("Vector Addition",color=GOLD).scale(0.65)
+ vector_add.shift(3*UP+3*RIGHT)
+ self.play(ShowCreation(hxn),ShowCreation(equal),ShowCreation(fx2n),ShowCreation(add),ShowCreation(gxn),ShowCreation(vector_add))
+ self.wait(2)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit
From a72c9a676fb98c7ea1cfc8cadae197b2e5098623 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Wed, 27 May 2020 18:49:26 +0530
Subject: Uploaded additional files and gifs
---
.../file1_epsilon_delta_defn.py | 120 +++++++++++++++++++++
.../file2_limit_approach_point.py | 66 ++++++++++++
.../file3_limit_func.py | 30 ++++++
.../file4_continuity_func.py | 32 ++++++
4 files changed, 248 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_epsilon_delta_defn.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file2_limit_approach_point.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file3_limit_func.py
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file4_continuity_func.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_epsilon_delta_defn.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_epsilon_delta_defn.py
new file mode 100644
index 0000000..63b6165
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_epsilon_delta_defn.py
@@ -0,0 +1,120 @@
+from manimlib.imports import *
+
+class EpsilonDelta(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes() # creates a 3D Axis
+
+
+ sphere = ParametricSurface(
+ lambda u, v: np.array([
+ 2*np.sin(u)*np.cos(v),
+ 2*np.sin(u)*np.sin(v),
+ 2*np.cos(u)
+ ]),u_min=0,u_max=PI/4,v_min=0,v_max=PI/2,checkerboard_colors=[RED_D, RED_E],
+ resolution=(15, 32)).scale(2)
+ #sphere.shift(0.5*RIGHT+0.5*UP)
+
+ #self.set_camera_orientation(phi=0*DEGREES,theta=270*DEGREES)
+ self.set_camera_orientation(phi=75 * DEGREES)
+
+
+
+ circle = Circle(radius= 0.4,color = GREEN)
+ circle.shift(0.5*RIGHT+0.5*UP)
+
+ line1 = DashedLine(np.array([0.5, 0.1,0]), np.array([0.5, 0.1,2.1]), color = BLUE_E)
+ line2 = DashedLine(np.array([0.5, 0.9,0]), np.array([0.5, 0.9,1.7]), color = BLUE_E)
+ line3 = DashedLine(np.array([0, 0,2.1]), np.array([0.5, 0.1,2.1]), color = YELLOW_C)
+ line4 = DashedLine(np.array([0, 0,1.7]), np.array([0.5, 0.9,1.7]), color = YELLOW_C)
+
+ dot1 = Sphere()
+ dot1.scale(0.01)
+ dot1.move_to(np.array([0,0,1.9]))
+ dot1.set_fill(BLUE_E)
+
+ temp_func1 = TextMobject(r"$L$")
+ temp_func1.scale(0.6)
+ temp_func1.set_color(BLUE_E)
+
+ dot2 = Sphere()
+ dot2.scale(0.01)
+ dot2.move_to(np.array([0,0,1.7]))
+ dot2.set_fill(PURPLE)
+
+ temp_func2 = TextMobject(r"$L - \epsilon$")
+ temp_func2.scale(0.6)
+ temp_func2.set_color(PURPLE)
+
+ dot3 = Sphere()
+ dot3.scale(0.01)
+ dot3.move_to(np.array([0,0,2.1]))
+ dot3.set_fill(PURPLE)
+
+ temp_func3 = TextMobject(r"$L + \epsilon$")
+ temp_func3.scale(0.6)
+ temp_func3.set_color(PURPLE)
+
+ self.add(axes)
+
+ self.play(ShowCreation(dot1))
+ self.add_fixed_in_frame_mobjects(temp_func1)
+ temp_func1.move_to(1.9*UP)
+ self.play(Write(temp_func1))
+
+ self.play(ShowCreation(dot2))
+ self.add_fixed_in_frame_mobjects(temp_func2)
+ temp_func2.move_to(1.7*UP)
+ self.play(Write(temp_func2))
+
+ self.play(ShowCreation(dot3))
+ self.add_fixed_in_frame_mobjects(temp_func3)
+ temp_func3.move_to(2.1*UP)
+ self.play(Write(temp_func3))
+
+
+ circle_center = Sphere()
+ circle_center.scale(0.05)
+ circle_center.move_to(np.array([0.5,0.5,0]))
+ circle_center.set_fill(GREEN)
+
+ temp_circle_center = TextMobject(r"$(a,b,0)$")
+ temp_circle_center.scale(0.5)
+ temp_circle_center.set_color(GREEN)
+
+ curve_circle_center = Sphere()
+ curve_circle_center.scale(0.05)
+ curve_circle_center.move_to(np.array([0.5,0.5,1.9]))
+ curve_circle_center.set_fill(BLUE_E)
+
+ temp_curve_circle_center = TextMobject(r"$(a,b,L)$")
+ temp_curve_circle_center.scale(0.5)
+ temp_curve_circle_center.set_color(BLUE)
+
+ delta_lab = TextMobject(r"$\delta - disk$")
+ delta_lab.scale(0.5)
+ delta_lab.set_color(PINK)
+
+ self.play(ShowCreation(circle_center))
+ self.add_fixed_in_frame_mobjects(temp_circle_center)
+ temp_circle_center.move_to(1.5*RIGHT)
+ self.play(Write(temp_circle_center))
+
+ self.play(ShowCreation(curve_circle_center))
+ self.add_fixed_in_frame_mobjects(temp_curve_circle_center)
+ temp_curve_circle_center.move_to(1.9*UP+1*RIGHT)
+ self.play(Write(temp_curve_circle_center))
+
+
+ self.add_fixed_in_frame_mobjects(delta_lab)
+ delta_lab.move_to(0.4*DOWN+1.7*RIGHT)
+ self.play(Write(delta_lab))
+
+
+
+
+
+ self.begin_ambient_camera_rotation(rate=0.2)
+ self.play(Write(sphere))
+ self.play(ShowCreation(circle), ShowCreation(line1), ShowCreation(line2))
+ self.play(ShowCreation(line3), ShowCreation(line4))
+ self.wait(8)
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file2_limit_approach_point.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file2_limit_approach_point.py
new file mode 100644
index 0000000..57d1d45
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file2_limit_approach_point.py
@@ -0,0 +1,66 @@
+from manimlib.imports import *
+
+class Limit(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "graph_origin": ORIGIN + 3* DOWN+4*LEFT,
+ "x_labeled_nums": list(range(0, 4)),
+ "y_labeled_nums": list(range(0, 5)),
+ }
+ def construct(self):
+ topic = TextMobject("Different paths of approach to limit point")
+ topic.scale(1.5)
+ topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(topic))
+ self.wait(1)
+ self.play(FadeOut(topic))
+
+
+
+ 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(animate = True)
+
+ y_x = self.get_graph(lambda x : x, x_min = -1, x_max = 4)
+ y_x_lab = self.get_graph_label(y_x, label = r"y = x")
+
+ y_xsquare = self.get_graph(lambda x : x*x, x_min = -1, x_max = 4)
+ y_xsquare_lab = self.get_graph_label(y_xsquare, label = r"y = x^2")
+
+ y_1 = self.get_graph(lambda x : 1, x_min = -1, x_max = 4)
+ y_1_lab = self.get_graph_label(y_1, label = r"y = 1")
+
+ y_2minusx = self.get_graph(lambda x : 2 - x, x_min = -1, x_max = 4, color = RED)
+ y_2minusx_lab = self.get_graph_label(y_2minusx, label = r"y = 2 - x")
+
+ limit_point = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
+ limit_point_lab = TextMobject(r"(1,1)")
+ limit_point_lab.next_to(limit_point, DOWN)
+
+ self.play(ShowCreation(limit_point))
+ self.play(Write(limit_point_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_x))
+ self.play(Write(y_x_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_xsquare))
+ self.play(Write(y_xsquare_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_1))
+ self.play(Write(y_1_lab))
+ self.wait(1)
+
+ self.play(ShowCreation(y_2minusx))
+ self.play(Write(y_2minusx_lab))
+ self.wait(1)
+
+
+
+
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file3_limit_func.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file3_limit_func.py
new file mode 100644
index 0000000..02e00e8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file3_limit_func.py
@@ -0,0 +1,30 @@
+from manimlib.imports import *
+
+class LimitFunc(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ text3d = TextMobject(r"$f(x,y) = \frac{x^2 - y^2}{x^2 + y^2}$")
+ self.add_fixed_in_frame_mobjects(text3d)
+
+ text3d.to_corner(UL)
+
+ text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.play(Write(text3d))
+ self.wait(1)
+
+ limit_func = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ (np.cos(v)*np.cos(v) - np.sin(v)*np.sin(v))/3
+ ]),u_min=-3,u_max=3,v_min=0,v_max=2*PI,checkerboard_colors=[YELLOW_C, YELLOW_E],
+ resolution=(15, 32)).scale(2)
+
+ self.set_camera_orientation(phi=80 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+ self.add(axes)
+ self.play(Write(limit_func))
+ self.wait(10)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file4_continuity_func.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file4_continuity_func.py
new file mode 100644
index 0000000..551c8a8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file4_continuity_func.py
@@ -0,0 +1,32 @@
+from manimlib.imports import *
+
+class ContinuityFunc(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ text3d = TextMobject(r"$f(x,y) = \frac{3x^2y}{x^2 + y^2}$")
+ self.add_fixed_in_frame_mobjects(text3d)
+
+ text3d.to_corner(UL)
+
+ text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.play(Write(text3d))
+ self.wait(1)
+
+ continuity_func = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ 3*u*np.cos(v)*np.cos(v)*np.sin(v)
+ ]),u_min=-1.5,u_max=1.5,v_min=0,v_max=2*PI,checkerboard_colors=[YELLOW_C, YELLOW_E],
+ resolution=(15, 32)).scale(2)
+
+
+
+ self.set_camera_orientation(phi=80 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+ self.add(axes)
+ self.play(Write(continuity_func))
+ self.wait(8)
\ No newline at end of file
--
cgit
From f37fbc5243fd8a60dbd1c1ae6e31536b4c68b2e7 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Wed, 27 May 2020 18:56:42 +0530
Subject: Delete file1_limit_approach_point.py
---
.../file1_limit_approach_point.py | 66 ----------------------
1 file changed, 66 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
deleted file mode 100644
index 57d1d45..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/file1_limit_approach_point.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from manimlib.imports import *
-
-class Limit(GraphScene):
- CONFIG = {
- "x_min": 0,
- "x_max": 4,
- "y_min": 0,
- "y_max": 4,
- "graph_origin": ORIGIN + 3* DOWN+4*LEFT,
- "x_labeled_nums": list(range(0, 4)),
- "y_labeled_nums": list(range(0, 5)),
- }
- def construct(self):
- topic = TextMobject("Different paths of approach to limit point")
- topic.scale(1.5)
- topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
- self.play(Write(topic))
- self.wait(1)
- self.play(FadeOut(topic))
-
-
-
- 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(animate = True)
-
- y_x = self.get_graph(lambda x : x, x_min = -1, x_max = 4)
- y_x_lab = self.get_graph_label(y_x, label = r"y = x")
-
- y_xsquare = self.get_graph(lambda x : x*x, x_min = -1, x_max = 4)
- y_xsquare_lab = self.get_graph_label(y_xsquare, label = r"y = x^2")
-
- y_1 = self.get_graph(lambda x : 1, x_min = -1, x_max = 4)
- y_1_lab = self.get_graph_label(y_1, label = r"y = 1")
-
- y_2minusx = self.get_graph(lambda x : 2 - x, x_min = -1, x_max = 4, color = RED)
- y_2minusx_lab = self.get_graph_label(y_2minusx, label = r"y = 2 - x")
-
- limit_point = Dot().shift(self.graph_origin+1*XTD*RIGHT+1*YTD*UP)
- limit_point_lab = TextMobject(r"(1,1)")
- limit_point_lab.next_to(limit_point, DOWN)
-
- self.play(ShowCreation(limit_point))
- self.play(Write(limit_point_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_x))
- self.play(Write(y_x_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_xsquare))
- self.play(Write(y_xsquare_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_1))
- self.play(Write(y_1_lab))
- self.wait(1)
-
- self.play(ShowCreation(y_2minusx))
- self.play(Write(y_2minusx_lab))
- self.wait(1)
-
-
-
-
\ No newline at end of file
--
cgit
From d7bde4c54d93e0d61a861b0b58ff6f52283f32a6 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Wed, 27 May 2020 18:57:04 +0530
Subject: Delete file1_limit_approach_point.gif
---
.../gifs/file1_limit_approach_point.gif | Bin 47411 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif
deleted file mode 100644
index 830b6f1..0000000
Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_limit_approach_point.gif and /dev/null differ
--
cgit
From 8d1ab085499f062225209afbbe5df719d93ec5a2 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Wed, 27 May 2020 18:57:33 +0530
Subject: Addded gifs
---
.../gifs/file1_epsilon_delta_defn.gif | Bin 0 -> 214399 bytes
.../gifs/file2_limit_approach_point.gif | Bin 0 -> 47411 bytes
.../gifs/file3_limit_func.gif | Bin 0 -> 511560 bytes
.../gifs/file4_continuity_func.gif | Bin 0 -> 523873 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_epsilon_delta_defn.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file2_limit_approach_point.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file3_limit_func.gif
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file4_continuity_func.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_epsilon_delta_defn.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_epsilon_delta_defn.gif
new file mode 100644
index 0000000..68f637e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file1_epsilon_delta_defn.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file2_limit_approach_point.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file2_limit_approach_point.gif
new file mode 100644
index 0000000..830b6f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file2_limit_approach_point.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file3_limit_func.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file3_limit_func.gif
new file mode 100644
index 0000000..07b23be
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file3_limit_func.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file4_continuity_func.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file4_continuity_func.gif
new file mode 100644
index 0000000..560e0f1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/gifs/file4_continuity_func.gif differ
--
cgit
From c905171679fa8ef186f4594f6713e0b887f730d5 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:03:05 +0530
Subject: Add files via upload
---
.../Subspaces/Straight_Line_through_Origin.py | 48 +++++++++++++
.../Vector-Spaces/Subspaces/Subspace_Example.py | 82 ++++++++++++++++++++++
.../Vector-Spaces/Subspaces/Unit_Circle.py | 68 ++++++++++++++++++
3 files changed, 198 insertions(+)
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Straight_Line_through_Origin.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Example.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Unit_Circle.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Straight_Line_through_Origin.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Straight_Line_through_Origin.py
new file mode 100644
index 0000000..5790d2e
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Straight_Line_through_Origin.py
@@ -0,0 +1,48 @@
+from manimlib.imports import *
+from scipy import exp, sin, log,tan,cos
+class Straight_Line(GraphScene):
+ CONFIG = {
+ "x_min" : -4,
+ "x_max" : 4,
+ "y_min" : -4,
+ "y_max" : 4,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "x_labeled_nums" : list(np.arange(-4,5,1)),
+ "y_labeled_nums" : list(np.arange(-4,5,1)),
+ "graph_origin" : ORIGIN+0.7*DOWN,
+ "axes_color" : GREY,
+ "x_axis_width": 6,
+ "y_axis_height":6,
+ }
+ def construct(self):
+ self.setup_axes(animate=True)
+ line_1 = self.get_graph(lambda x : x, x_min=-3,x_max=3,color=YELLOW)
+ self.play(ShowCreation(line_1))
+ text1 = TextMobject("ax + by = 0",color=BLUE_B)
+ text1.shift(3*RIGHT+2*UP)
+ text1.scale(0.65)
+ dot = Dot(color=BLUE_B).shift(0.7*DOWN)
+ dot.scale(1.3)
+ self.play(ShowCreation(dot))
+ text2 = TextMobject("Line passing through the origin")
+ text2.scale(0.7)
+ text2.shift(3.5*UP)
+ self.play(ShowCreation(text1),ShowCreation(text2))
+ self.wait(1)
+ self.play(FadeOut(line_1),FadeOut(text2),FadeOut(text1))
+ text4=TextMobject("Line not passing through the origin")
+ text4.scale(0.7)
+ text4.shift(3.5*UP)
+ self.play(ShowCreation(text4))
+
+ line_2 = self.get_graph(lambda x : 2.5*x +1, x_min = -2, x_max=1, color = RED)
+ text3 = TextMobject(r"ax + by $\neq 0$",color=BLUE_B)
+ text3.scale(0.65)
+ self.play(ShowCreation(line_2))
+ text3.shift(1.5*RIGHT+2.2*UP)
+ self.play(ShowCreation(text3))
+ self.wait(1)
+
+
+
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Example.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Example.py
new file mode 100644
index 0000000..ada173e
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Example.py
@@ -0,0 +1,82 @@
+from manimlib.imports import *
+class Subspace_Example(Scene):
+ def construct(self):
+ sq = Square(side = 2, color=BLACK).shift(2*LEFT)
+ sq.set_fill(color=RED,opacity=350)
+ line1=Line(color=BLACK).shift(2*LEFT)
+ line1.rotate(np.pi/2)
+ line2=Line(color=BLACK).shift(2.5*LEFT+0.5*UP)
+ line2.scale(0.5)
+ line3=Line(color=BLACK).shift(+1.5*LEFT)
+ line3.scale(0.5)
+ a1=TextMobject(r"$a_1$",color=BLACK).scale(0.5).shift(3.4*LEFT+0.7*UP)
+ a2=TextMobject(r"$a_2$",color=BLACK).scale(0.5).shift(3.4*LEFT+0.3*DOWN)
+ a3=TextMobject(r"$a_3$",color=BLACK).scale(0.5).shift(0.7*LEFT+0.5*DOWN)
+ a4=TextMobject(r"$a_4$",color=BLACK).scale(0.5).shift(0.7*LEFT+0.5*UP)
+ big_rect=Rectangle().scale(3).shift(0.5*DOWN)
+ big_rect.set_fill(color=GREY,opacity=350)
+ vec_space=TextMobject("$Vector Space$").scale(0.77).shift(4.5*RIGHT+3.5*UP)
+ sub=TextMobject(r"$Subspace$",color=BLACK).scale(0.77).shift(3.8*RIGHT+2*UP)
+ self.play(ShowCreation(vec_space))
+ self.play(ShowCreation(big_rect),ShowCreation(sub))
+ self.play(ShowCreation(sq),ShowCreation(line1),ShowCreation(line2),ShowCreation(line3),ShowCreation(a1),ShowCreation(a2),ShowCreation(a3),ShowCreation(a4))
+ rec = Rectangle(color=BLACK).scale(0.5).shift(1*RIGHT)
+ rec.rotate(np.pi/2)
+ rec.set_fill(color=BLUE,opacity=350)
+ line4=Line(color=BLACK).shift(1*RIGHT).rotate(np.pi/2)
+ line5=Line(color=BLACK).scale(0.25).shift(0.75*RIGHT)
+ line6=Line(color=BLACK).scale(0.25).shift(0.5*DOWN+1.25*RIGHT)
+ b1=TextMobject(r"$b_1$",color=BLACK).scale(0.5).shift(0.3*RIGHT+0.5*UP)
+ b2=TextMobject(r"$b_2$",color=BLACK).scale(0.5).shift(0.3*RIGHT+0.5*DOWN)
+ b3=TextMobject(r"$b_3$",color=BLACK).scale(0.5).shift(1.67*RIGHT+0.8*DOWN)
+ b4=TextMobject(r"$b_4$",color=BLACK).scale(0.5).shift(1.67*RIGHT+0.5*UP)
+ self.play(ShowCreation(rec),ShowCreation(line4),ShowCreation(line5),ShowCreation(line6),ShowCreation(b1),ShowCreation(b2),ShowCreation(b3),ShowCreation(b4))
+ self.wait(1)
+ text1=TextMobject(r"$a_1 + a_2 = a_3 + a_4$",color=BLACK).scale(0.5).shift(2*LEFT+1.5*DOWN)
+ text2=TextMobject(r"$b_1 + b_2 = b_3 + b_4$",color=BLACK).scale(0.5).shift(1.5*RIGHT+1.5*DOWN)
+ self.play(ShowCreation(text1),ShowCreation(text2))
+ self.wait(3)
+ self.play(FadeOut(text1),FadeOut(text2))
+ rec.shift(3*LEFT+2.01*DOWN)
+ line4.shift(3*LEFT+2*DOWN)
+ line5.shift(3*LEFT+2*DOWN)
+ line6.shift(3*LEFT+2*DOWN)
+ b1.shift(3.1*LEFT+2.1*DOWN)
+ b2.shift(3.1*LEFT+2.1*DOWN)
+ b3.shift(2.9*LEFT+2*DOWN)
+ b4.shift(2.9*LEFT+2.3*DOWN)
+ self.play(ShowCreation(rec),ShowCreation(line4),ShowCreation(line5),ShowCreation(line6),ShowCreation(b1),ShowCreation(b2),ShowCreation(b3),ShowCreation(b4))
+ self.wait(2)
+
+ text3=TextMobject(r"$(a_1 + a_2) + (b_1 + b_2) = (a_3 + a_4) + (b_3 + b_4)$",color=BLACK).scale(0.5).shift(2.5*RIGHT+0.5*DOWN)
+ text3=TextMobject(r"$(a_1 + a_2) + (b_1 + b_2) = (a_3 + a_4) + (b_3 + b_4)$",color=BLACK).scale(0.5).shift(2.5*RIGHT+0.5*DOWN)
+ text4=TextMobject("Vector Addition",color=BLACK).scale(0.8).shift(2.5*RIGHT+0.5*UP)
+ self.play(ShowCreation(text3),ShowCreation(text4))
+ self.wait(3)
+ rec.set_fill(color=GREY,opacity=350)
+ self.play(FadeOut(text3),FadeOut(text4),FadeOut(line4),FadeOut(line5),FadeOut(line6),FadeOut(rec),FadeOut(b4),FadeOut(b3),FadeOut(b2),FadeOut(b1))
+ sq1=Square(color=BLACK).scale(0.5).shift(1.5*LEFT+1.5*UP)
+ sq1.set_fill(color=RED,opacity=350)
+ sq2=Square(color=BLACK).scale(0.5).shift(1.5*LEFT+1.5*DOWN)
+ sq2.set_fill(color=RED,opacity=350)
+ rec1=Rectangle(height=0.5,width=1,color=BLACK).shift(2.5*LEFT+1.2*UP)
+ rec1.set_fill(color=RED,opacity=350)
+ rec2=Rectangle(height=1.5,width=1,color=BLACK)
+ rec2.set_fill(color=RED,opacity=350).shift(2.5*LEFT+1.5*DOWN)
+ self.play(ShowCreation(sq1),ShowCreation(sq2),ShowCreation(rec1),ShowCreation(rec2))
+ a=TextMobject(r"$a_1$",color=BLACK).scale(0.5).shift(3.4*LEFT+1.2*UP)
+ b=TextMobject(r"$a_2$",color=BLACK).scale(0.5).shift(3.4*LEFT+1.4*DOWN)
+ c=TextMobject(r"$a_3$",color=BLACK).scale(0.5).shift(0.7*LEFT+1.4*DOWN)
+ d=TextMobject(r"$a_4$",color=BLACK).scale(0.5).shift(0.7*LEFT+1.4*UP)
+ self.play(ShowCreation(a),ShowCreation(b),ShowCreation(c),ShowCreation(d))
+ self.wait(2.3)
+ text4=TextMobject("Scalar Multiplication",color=BLACK).scale(0.8).shift(2.5*RIGHT+0.5*UP)
+ text5=TextMobject(r"$\implies 2(a_1 + a_2) = 2(a_3 + a_4)$",color=BLACK).scale(0.5).shift(2*RIGHT+0.5*DOWN)
+ text6=TextMobject(r"$(a_1 + a_1) + (a_2 + a_2) = (a_3 + a_3) + (a_4 +a_4)$",color=BLACK).scale(0.5).shift(2.5*RIGHT)
+ self.play(ShowCreation(text4),ShowCreation(text5),ShowCreation(text6))
+ self.wait(3)
+
+
+
+
+
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Unit_Circle.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Unit_Circle.py
new file mode 100644
index 0000000..2973f08
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Unit_Circle.py
@@ -0,0 +1,68 @@
+from manimlib.imports import *
+import numpy as np
+import math
+
+class Unit_Circle(GraphScene):
+ CONFIG = {
+ "x_min" : -3,
+ "x_max" : 3,
+ "y_min" : -3,
+ "y_max" : 3,
+ "y_tick_frequency" : 1,
+ "x_tick_frequency" : 1,
+ "x_labeled_nums" : list(np.arange(-3,4,1)),
+ "y_labeled_nums" : list(np.arange(-3,4,1)),
+ "graph_origin" : ORIGIN,
+ "axes_color" : GREY,
+ "x_axis_width": 6,
+ "y_axis_height":6,
+ }
+
+ def construct(self):
+ self.setup_axes(animate = True)
+ circle = Circle(radius=1,color=BLUE)
+ self.play(ShowCreation(circle))
+ dot1 = Dot(color=RED).scale(0.7)
+ dot1.shift(1*UP)
+ dot2 = Dot(color=RED).scale(0.7)
+ dot2.shift(1*LEFT)
+ dot3 = Dot(color=RED).scale(0.7)
+ dot3.shift(1*DOWN)
+ dot4 = Dot(color=RED).scale(0.7)
+ dot4.shift(1*RIGHT)
+ dot5= Dot(color=RED).scale(0.7)
+ dot6 = Dot(color=RED).scale(0.7)
+ dot5.shift(0.5*RIGHT+(math.sqrt(3)/2)*UP)
+ dot6.shift(0.5*LEFT+(math.sqrt(3)/2)*DOWN)
+ dot7 = Dot(color=RED).scale(0.7)
+ dot7.shift(math.sqrt(2)/2*RIGHT+math.sqrt(2)/2*UP)
+ dot8 = Dot(color=RED).scale(0.7)
+ dot8.shift(math.sqrt(2)/2*LEFT+math.sqrt(2)/2*UP)
+ dot9 = Dot(color=RED).scale(0.7)
+ dot9.shift(0.5*LEFT+(math.sqrt(3)/2)*UP)
+ dot10 = Dot(color=RED).scale(0.7)
+ dot10.shift(math.sqrt(3)/2*LEFT+0.5*UP)
+ dot11=Dot(color=RED).scale(0.7)
+ dot11.shift(math.sqrt(3)/2*RIGHT+0.5*UP)
+ dot12= Dot(color=RED).scale(0.7)
+ dot12.shift(math.sqrt(3)/2*LEFT+0.5*DOWN)
+ dot13=Dot(color=RED).scale(0.7)
+ dot13.shift(math.sqrt(2)/2*RIGHT+math.sqrt(2)/2*DOWN)
+ dot14=Dot(color=RED).scale(0.7)
+ dot14.shift(math.sqrt(2)/2*LEFT+math.sqrt(2)/2*DOWN)
+ dot15=Dot(color=RED).scale(0.7)
+ dot15.shift(math.sqrt(3)/2*RIGHT+0.5*DOWN)
+ dot16=Dot(color=RED).scale(0.7)
+ dot16.shift(0.5*RIGHT+(math.sqrt(3)/2)*DOWN)
+ self.play(ShowCreation(dot1),ShowCreation(dot2))
+ self.play(ShowCreation(dot3),ShowCreation(dot4))
+ self.play(ShowCreation(dot5),ShowCreation(dot6))
+ self.play(ShowCreation(dot7),ShowCreation(dot8))
+ self.play(ShowCreation(dot9),ShowCreation(dot10))
+ self.play(ShowCreation(dot11),ShowCreation(dot12))
+ self.play(ShowCreation(dot13),ShowCreation(dot14))
+ self.play(ShowCreation(dot15),ShowCreation(dot16))
+ self.wait(4)
+
+
+
--
cgit
From 31e59b2ca163acd668a56ac356ebe040e9285a5a Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:04:23 +0530
Subject: Add files via upload
---
.../Vector-Spaces/Vector-Spaces/3D_Vector_Space.py | 14 +++
.../Vector-Spaces/Vector_Addition_and_Scaling.py | 137 +++++++++++++++++++++
.../Vector-Spaces/Vector_Space_As_Functions.py | 62 ++++++++++
3 files changed, 213 insertions(+)
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/3D_Vector_Space.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Space_As_Functions.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/3D_Vector_Space.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/3D_Vector_Space.py
new file mode 100644
index 0000000..70913eb
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/3D_Vector_Space.py
@@ -0,0 +1,14 @@
+from manimlib.imports import *
+class ThreeDSpace(ThreeDScene):
+ def construct(self):
+ curve = ParametricFunction(
+ lambda x: np.array([
+ 0, -x , x]), color = YELLOW, t_min = -2, t_max = 2)
+ axes = ThreeDAxes()
+ axes.set_stroke(width=1,color=GOLD)
+ self.add(axes)
+ self.set_camera_orientation(phi = 70*DEGREES,theta =60*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+ self.play(ShowCreation(curve))
+ self.wait(6)
+
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Addition_and_Scaling.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
new file mode 100644
index 0000000..70af123
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
@@ -0,0 +1,137 @@
+from manimlib.imports import *
+import numpy as np
+
+class vectorspace(GraphScene):
+ CONFIG={
+ "x_min": -7,
+ "x_max": 7,
+ "y_min": -7,
+ "y_max": 7,
+ "graph_origin": ORIGIN,
+ "x_axis_label":"$X$",
+ "y_axis_label":"$Y$",
+ "x_labeled_nums": list(np.arange(-7, 8,1)),
+ "y_labeled_nums": list(np.arange(-7, 8,1)),
+ "x_axis_width": 8,
+ "y_axis_height": 7,
+ "x_tick_frequency":1,
+ "axes_color": GREY,
+ "area_opacity": 3,
+ "num_rects": 10,
+ }
+ def construct(self):
+ XD = self.x_axis_width/(self.x_max- self.x_min)
+ YD = self.y_axis_height/(self.y_max- self.y_min)
+ a1=1*XD*RIGHT+2*YD*UP
+ a2=1*XD*RIGHT+1*YD*UP
+ vec1=Vector(direction=a1).set_color(RED_E)
+ vec1.shift(self.graph_origin)
+ vec2=Vector(direction=a2).set_color(YELLOW_E)
+ vec2.shift(self.graph_origin)
+ vec1_text=TextMobject(r"$\vec{a}$")
+ vec2_text=TextMobject(r"$\vec{b}$")
+ vec1_text=(vec1_text.shift(self.graph_origin+a1+0.2)).scale(.7)
+ vec2_text=(vec2_text.shift(self.graph_origin+a2+0.2)).scale(.7)
+ self.setup_axes(animate=True)
+ self.wait(2)
+ self.play(ShowCreation(vec1))
+ self.play(ShowCreation(vec1_text))
+ self.wait(.7)
+ self.play(ShowCreation(vec2))
+ self.play(ShowCreation(vec2_text))
+ self.wait(.7)
+ a=TextMobject(r"$\vec{a} = (1,2)$",color=RED_B).scale(.6)
+ a.shift(3*LEFT+2.7*UP)
+ b=TextMobject(r"$\vec{b} = (1,1)$",color=YELLOW_E).scale(.6)
+ b.shift(3*LEFT+2*UP)
+ self.play(ShowCreation(a))
+ self.play(ShowCreation(b))
+ self.wait(.5)
+ c=TextMobject(r"$2\cdot\vec{a} = 2\cdot(1,2) = (2,4)$",color=RED_B)
+ c.shift(3*LEFT+2.7*UP)
+ c.scale(.6)
+ self.play(Transform(a,c))
+ scaling1=TextMobject(r"Scaling vector $\vec{a}$ by 2 units",color=GOLD).scale(.5)
+ scaling1.shift(3.4*RIGHT+2.4*UP)
+ self.play(ShowCreation(scaling1))
+ a1=2*XD*RIGHT+4*YD*UP
+ self.play(FadeOut(vec1_text))
+ vec1_scaled=Vector(direction=a1).set_color(RED_E)
+ vec1_scaled.shift(self.graph_origin)
+ self.play(ShowCreation(vec1_scaled))
+ self.play(FadeOut(vec1))
+ vec1_scaled_text=TextMobject(r"$2\vec{a}$").scale(.7)
+ vec1_scaled_text.shift(self.graph_origin+a1+0.2)
+ self.play(ShowCreation(vec1_scaled_text))
+ self.play(FadeOut(scaling1))
+ d=TextMobject(r"$3\cdot\vec{b} = 3\cdot(1,1) = (3,3)$",color=YELLOW_E).scale(.6)
+ d.shift(3*LEFT+2*UP)
+ self.play(Transform(b,d))
+ scaling2=TextMobject(r"Scaling vector $\vec{b}$ by 3 units",color=GOLD).scale(.5)
+ scaling2.shift(3.4*RIGHT+2.4*UP)
+ self.play(ShowCreation(scaling2))
+ a2=3*XD*RIGHT+3*YD*UP
+ self.play(FadeOut(vec2_text))
+ vec2_2=Vector
+ vec2_scaled=Vector(direction=a2).set_color(YELLOW_E)
+ vec2_scaled.shift(self.graph_origin)
+ self.play(ShowCreation(vec2_scaled))
+ self.play(FadeOut(vec2))
+ vec2_scaled_text=TextMobject(r"$3\vec{b}$").scale(.7)
+ vec2_scaled_text.shift(self.graph_origin+a2+0.2)
+ self.play(ShowCreation(vec2_scaled_text))
+ self.wait(.7)
+ self.play(FadeOut(scaling2))
+ add = TextMobject("+").scale(.7)
+ add.shift(4.8*LEFT+2*UP)
+ self.play(ShowCreation(add))
+ self.wait(.5)
+ line = Line()
+ line.shift(3*LEFT+1.6*UP)
+ line.scale(1.8)
+ self.play(ShowCreation(line))
+ self.wait(1)
+ e = TextMobject(r"$\vec{c} = 2\cdot\vec{a} + 3\cdot\vec{b} = (5,7)$",color=GREEN_D).scale(.6)
+ e.shift(3*LEFT+1.3*UP)
+ self.play(ShowCreation(e))
+ self.wait(.5)
+ add1=TextMobject("Addition of the scaled vectors",color=GOLD).scale(.5)
+ add1.shift(4.1*RIGHT+2.4*UP)
+ self.play(ShowCreation(add1))
+ self.wait(.5)
+ self.play(FadeOut(vec1_scaled_text))
+ self.play(FadeOut(vec2_scaled_text))
+ self.play(FadeOut(vec1_scaled))
+ vec1_scaled2=Vector(direction=a1).set_color(RED_E)
+ vec1_scaled2.shift(self.graph_origin+3*RIGHT*XD+3*UP*YD)
+ self.play(ShowCreation(vec1_scaled2))
+ a3=5*XD*RIGHT+7*YD*UP
+ vec3=Vector(direction=a3).set_color(GREEN_C)
+ vec3.shift(self.graph_origin)
+ vec3_text=TextMobject(r"$\vec{c}$").scale(.7)
+ vec3_text.shift(self.graph_origin+a3+0.2)
+ self.play(ShowCreation(vec3))
+ self.wait(.5)
+ self.play(ShowCreation(vec3_text))
+ self.wait(1)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Space_As_Functions.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Space_As_Functions.py
new file mode 100644
index 0000000..4f5614d
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/Vector_Space_As_Functions.py
@@ -0,0 +1,62 @@
+from manimlib.imports import *
+from scipy import sin,cos
+class FunctionalVectorSpace(GraphScene):
+ CONFIG = {
+ "x_min": -5,
+ "x_max": 5,
+ "y_min": -5,
+ "y_max": 5,
+ "graph_origin": ORIGIN,
+ }
+ def construct(self):
+ self.setup_axes(animate = True)
+ curve1 = self.get_graph(lambda x : sin(x), x_min=-5,x_max=5,color=YELLOW_E)
+ curve2 = self.get_graph(lambda x : cos(x), x_min=-5,x_max=5,color=RED)
+ self.play(ShowCreation(curve1))
+ fx=TextMobject(r"$f(x)$",color=YELLOW_E).scale(0.7)
+ fx.shift(5*LEFT+0.7*UP)
+ self.play(ShowCreation(fx))
+ self.play(ShowCreation(curve2))
+ gx=TextMobject(r"$g(x)$",color=RED).scale(0.7)
+ gx.shift(5*LEFT+0.2*UP)
+ self.play(ShowCreation(gx))
+ self.wait(2)
+ scaling=TextMobject("Scaling f(x) by 2 units",color=GOLD).scale(0.65)
+ scaling.shift(3*LEFT+2.4*UP)
+ curve3 = self.get_graph(lambda x : 2*sin(x), x_min=-5,x_max=5,color=BLUE)
+ fx2=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
+ fx2.shift(5*LEFT+1*UP)
+ self.play(Transform(curve1,curve3),FadeOut(fx),ShowCreation(fx2),ShowCreation(scaling))
+ self.wait(3)
+ hx = TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
+ hx.shift(4.9*LEFT+1.5*UP)
+ curve4 = self.get_graph(lambda x : 2*sin(x) + cos(x), x_min=-5,x_max=5,color=PURPLE)
+ self.play(ShowCreation(curve4),ShowCreation(hx))
+ self.play(FadeOut(curve2),FadeOut(curve1),FadeOut(fx2),FadeOut(gx),FadeOut(scaling))
+ hxn=TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
+ hxn.shift(3*RIGHT+2.4*UP)
+ equal = TextMobject("=").scale(0.7)
+ equal.shift(3.5*RIGHT+2.4*UP)
+ fx2n=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
+ fx2n.shift(4.2*RIGHT+2.4*UP)
+ add=TextMobject("+").scale(0.7)
+ add.shift(4.8*RIGHT+2.4*UP)
+ gxn=TextMobject(r"$g(x)$",color=RED).scale(0.7)
+ gxn.shift(5.3*RIGHT+2.4*UP)
+ vector_add=TextMobject("Vector Addition",color=GOLD).scale(0.65)
+ vector_add.shift(3*UP+3*RIGHT)
+ self.play(ShowCreation(hxn),ShowCreation(equal),ShowCreation(fx2n),ShowCreation(add),ShowCreation(gxn),ShowCreation(vector_add))
+ self.wait(2)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit
From 5ecb68a8c5bdfcb98de6053ed4b86015482223e9 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:13:47 +0530
Subject: Delete Vector_Addition_and_Scaling.py
---
.../Vector-Spaces/Vector_Addition_and_Scaling.py | 137 ---------------------
1 file changed, 137 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
deleted file mode 100644
index 70af123..0000000
--- a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Addition_and_Scaling.py
+++ /dev/null
@@ -1,137 +0,0 @@
-from manimlib.imports import *
-import numpy as np
-
-class vectorspace(GraphScene):
- CONFIG={
- "x_min": -7,
- "x_max": 7,
- "y_min": -7,
- "y_max": 7,
- "graph_origin": ORIGIN,
- "x_axis_label":"$X$",
- "y_axis_label":"$Y$",
- "x_labeled_nums": list(np.arange(-7, 8,1)),
- "y_labeled_nums": list(np.arange(-7, 8,1)),
- "x_axis_width": 8,
- "y_axis_height": 7,
- "x_tick_frequency":1,
- "axes_color": GREY,
- "area_opacity": 3,
- "num_rects": 10,
- }
- def construct(self):
- XD = self.x_axis_width/(self.x_max- self.x_min)
- YD = self.y_axis_height/(self.y_max- self.y_min)
- a1=1*XD*RIGHT+2*YD*UP
- a2=1*XD*RIGHT+1*YD*UP
- vec1=Vector(direction=a1).set_color(RED_E)
- vec1.shift(self.graph_origin)
- vec2=Vector(direction=a2).set_color(YELLOW_E)
- vec2.shift(self.graph_origin)
- vec1_text=TextMobject(r"$\vec{a}$")
- vec2_text=TextMobject(r"$\vec{b}$")
- vec1_text=(vec1_text.shift(self.graph_origin+a1+0.2)).scale(.7)
- vec2_text=(vec2_text.shift(self.graph_origin+a2+0.2)).scale(.7)
- self.setup_axes(animate=True)
- self.wait(2)
- self.play(ShowCreation(vec1))
- self.play(ShowCreation(vec1_text))
- self.wait(.7)
- self.play(ShowCreation(vec2))
- self.play(ShowCreation(vec2_text))
- self.wait(.7)
- a=TextMobject(r"$\vec{a} = (1,2)$",color=RED_B).scale(.6)
- a.shift(3*LEFT+2.7*UP)
- b=TextMobject(r"$\vec{b} = (1,1)$",color=YELLOW_E).scale(.6)
- b.shift(3*LEFT+2*UP)
- self.play(ShowCreation(a))
- self.play(ShowCreation(b))
- self.wait(.5)
- c=TextMobject(r"$2\cdot\vec{a} = 2\cdot(1,2) = (2,4)$",color=RED_B)
- c.shift(3*LEFT+2.7*UP)
- c.scale(.6)
- self.play(Transform(a,c))
- scaling1=TextMobject(r"Scaling vector $\vec{a}$ by 2 units",color=GOLD).scale(.5)
- scaling1.shift(3.4*RIGHT+2.4*UP)
- self.play(ShowCreation(scaling1))
- a1=2*XD*RIGHT+4*YD*UP
- self.play(FadeOut(vec1_text))
- vec1_scaled=Vector(direction=a1).set_color(RED_E)
- vec1_scaled.shift(self.graph_origin)
- self.play(ShowCreation(vec1_scaled))
- self.play(FadeOut(vec1))
- vec1_scaled_text=TextMobject(r"$2\vec{a}$").scale(.7)
- vec1_scaled_text.shift(self.graph_origin+a1+0.2)
- self.play(ShowCreation(vec1_scaled_text))
- self.play(FadeOut(scaling1))
- d=TextMobject(r"$3\cdot\vec{b} = 3\cdot(1,1) = (3,3)$",color=YELLOW_E).scale(.6)
- d.shift(3*LEFT+2*UP)
- self.play(Transform(b,d))
- scaling2=TextMobject(r"Scaling vector $\vec{b}$ by 3 units",color=GOLD).scale(.5)
- scaling2.shift(3.4*RIGHT+2.4*UP)
- self.play(ShowCreation(scaling2))
- a2=3*XD*RIGHT+3*YD*UP
- self.play(FadeOut(vec2_text))
- vec2_2=Vector
- vec2_scaled=Vector(direction=a2).set_color(YELLOW_E)
- vec2_scaled.shift(self.graph_origin)
- self.play(ShowCreation(vec2_scaled))
- self.play(FadeOut(vec2))
- vec2_scaled_text=TextMobject(r"$3\vec{b}$").scale(.7)
- vec2_scaled_text.shift(self.graph_origin+a2+0.2)
- self.play(ShowCreation(vec2_scaled_text))
- self.wait(.7)
- self.play(FadeOut(scaling2))
- add = TextMobject("+").scale(.7)
- add.shift(4.8*LEFT+2*UP)
- self.play(ShowCreation(add))
- self.wait(.5)
- line = Line()
- line.shift(3*LEFT+1.6*UP)
- line.scale(1.8)
- self.play(ShowCreation(line))
- self.wait(1)
- e = TextMobject(r"$\vec{c} = 2\cdot\vec{a} + 3\cdot\vec{b} = (5,7)$",color=GREEN_D).scale(.6)
- e.shift(3*LEFT+1.3*UP)
- self.play(ShowCreation(e))
- self.wait(.5)
- add1=TextMobject("Addition of the scaled vectors",color=GOLD).scale(.5)
- add1.shift(4.1*RIGHT+2.4*UP)
- self.play(ShowCreation(add1))
- self.wait(.5)
- self.play(FadeOut(vec1_scaled_text))
- self.play(FadeOut(vec2_scaled_text))
- self.play(FadeOut(vec1_scaled))
- vec1_scaled2=Vector(direction=a1).set_color(RED_E)
- vec1_scaled2.shift(self.graph_origin+3*RIGHT*XD+3*UP*YD)
- self.play(ShowCreation(vec1_scaled2))
- a3=5*XD*RIGHT+7*YD*UP
- vec3=Vector(direction=a3).set_color(GREEN_C)
- vec3.shift(self.graph_origin)
- vec3_text=TextMobject(r"$\vec{c}$").scale(.7)
- vec3_text.shift(self.graph_origin+a3+0.2)
- self.play(ShowCreation(vec3))
- self.wait(.5)
- self.play(ShowCreation(vec3_text))
- self.wait(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
cgit
From 8e03fbcadca1d7a4ae0b69dd1062d4cdf89240f5 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:14:03 +0530
Subject: Delete 3D_Vector_Space.py
---
.../vector-spaces/Vector-Spaces/3D_Vector_Space.py | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
deleted file mode 100644
index 70913eb..0000000
--- a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/3D_Vector_Space.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from manimlib.imports import *
-class ThreeDSpace(ThreeDScene):
- def construct(self):
- curve = ParametricFunction(
- lambda x: np.array([
- 0, -x , x]), color = YELLOW, t_min = -2, t_max = 2)
- axes = ThreeDAxes()
- axes.set_stroke(width=1,color=GOLD)
- self.add(axes)
- self.set_camera_orientation(phi = 70*DEGREES,theta =60*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.3)
- self.play(ShowCreation(curve))
- self.wait(6)
-
--
cgit
From eaf43a99f2797845d436e3a07976498de34cbbb3 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:14:16 +0530
Subject: Delete Vector_Space_As_Functions.py
---
.../Vector-Spaces/Vector_Space_As_Functions.py | 62 ----------------------
1 file changed, 62 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
deleted file mode 100644
index 4f5614d..0000000
--- a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector_Space_As_Functions.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from manimlib.imports import *
-from scipy import sin,cos
-class FunctionalVectorSpace(GraphScene):
- CONFIG = {
- "x_min": -5,
- "x_max": 5,
- "y_min": -5,
- "y_max": 5,
- "graph_origin": ORIGIN,
- }
- def construct(self):
- self.setup_axes(animate = True)
- curve1 = self.get_graph(lambda x : sin(x), x_min=-5,x_max=5,color=YELLOW_E)
- curve2 = self.get_graph(lambda x : cos(x), x_min=-5,x_max=5,color=RED)
- self.play(ShowCreation(curve1))
- fx=TextMobject(r"$f(x)$",color=YELLOW_E).scale(0.7)
- fx.shift(5*LEFT+0.7*UP)
- self.play(ShowCreation(fx))
- self.play(ShowCreation(curve2))
- gx=TextMobject(r"$g(x)$",color=RED).scale(0.7)
- gx.shift(5*LEFT+0.2*UP)
- self.play(ShowCreation(gx))
- self.wait(2)
- scaling=TextMobject("Scaling f(x) by 2 units",color=GOLD).scale(0.65)
- scaling.shift(3*LEFT+2.4*UP)
- curve3 = self.get_graph(lambda x : 2*sin(x), x_min=-5,x_max=5,color=BLUE)
- fx2=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
- fx2.shift(5*LEFT+1*UP)
- self.play(Transform(curve1,curve3),FadeOut(fx),ShowCreation(fx2),ShowCreation(scaling))
- self.wait(3)
- hx = TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
- hx.shift(4.9*LEFT+1.5*UP)
- curve4 = self.get_graph(lambda x : 2*sin(x) + cos(x), x_min=-5,x_max=5,color=PURPLE)
- self.play(ShowCreation(curve4),ShowCreation(hx))
- self.play(FadeOut(curve2),FadeOut(curve1),FadeOut(fx2),FadeOut(gx),FadeOut(scaling))
- hxn=TextMobject(r"$h(x)$",color=PURPLE).scale(0.7)
- hxn.shift(3*RIGHT+2.4*UP)
- equal = TextMobject("=").scale(0.7)
- equal.shift(3.5*RIGHT+2.4*UP)
- fx2n=TextMobject(r"$2f(x)$",color=BLUE).scale(0.7)
- fx2n.shift(4.2*RIGHT+2.4*UP)
- add=TextMobject("+").scale(0.7)
- add.shift(4.8*RIGHT+2.4*UP)
- gxn=TextMobject(r"$g(x)$",color=RED).scale(0.7)
- gxn.shift(5.3*RIGHT+2.4*UP)
- vector_add=TextMobject("Vector Addition",color=GOLD).scale(0.65)
- vector_add.shift(3*UP+3*RIGHT)
- self.play(ShowCreation(hxn),ShowCreation(equal),ShowCreation(fx2n),ShowCreation(add),ShowCreation(gxn),ShowCreation(vector_add))
- self.wait(2)
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--
cgit
From 83522974e3f99b8ce3e844877fd8a7ada081f410 Mon Sep 17 00:00:00 2001
From: nishanpoojary
Date: Wed, 27 May 2020 19:38:30 +0530
Subject: Added Limits and Continuity Quiz
---
...s_and_Continuity_of_Multivariable_Function_Quiz.pdf | Bin 0 -> 101435 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/Limits_and_Continuity_of_Multivariable_Function_Quiz.pdf
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/Limits_and_Continuity_of_Multivariable_Function_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/Limits_and_Continuity_of_Multivariable_Function_Quiz.pdf
new file mode 100644
index 0000000..99918e5
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/limits-and-continuity-of-multivariable-functions/Limits_and_Continuity_of_Multivariable_Function_Quiz.pdf differ
--
cgit
From 6414cc9cc0471a473716bb9bfe6dfa8f81bd58f5 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 19:41:27 +0530
Subject: Update README.md
---
FSF-2020/linear-algebra/vector-spaces/README.md | 9 +++++++++
1 file changed, 9 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/README.md b/FSF-2020/linear-algebra/vector-spaces/README.md
index e69de29..03f6a03 100644
--- a/FSF-2020/linear-algebra/vector-spaces/README.md
+++ b/FSF-2020/linear-algebra/vector-spaces/README.md
@@ -0,0 +1,9 @@
+# Contributer: Simran Chhattani
+My Github Account : simranchhattani
+
+## Sub-Topics Covered:
++ Vector Spaces
++ Basis of a Vector Space and Subspace
++ Polynomial and Function Vector Space
++ Inner Product Spaces
++ Dual of a Vector Space
--
cgit
From 16a7ed658ff6cdc3843af3190034f8a6162c7ab8 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 20:37:16 +0530
Subject: Add files via upload
---
.../Subspaces/gifs/Straight_Line_Through_Origin.gif | Bin 0 -> 314823 bytes
.../Vector-Spaces/Subspaces/gifs/Subspace_Example.gif | Bin 0 -> 647405 bytes
.../Vector-Spaces/Subspaces/gifs/Unit_Circle.gif | Bin 0 -> 149852 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Straight_Line_Through_Origin.gif
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Subspace_Example.gif
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Unit_Circle.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Straight_Line_Through_Origin.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Straight_Line_Through_Origin.gif
new file mode 100644
index 0000000..b7695a4
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Straight_Line_Through_Origin.gif differ
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Subspace_Example.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Subspace_Example.gif
new file mode 100644
index 0000000..32b02be
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Subspace_Example.gif differ
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Unit_Circle.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Unit_Circle.gif
new file mode 100644
index 0000000..165d040
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/gifs/Unit_Circle.gif differ
--
cgit
From 439152addc4ae7d132c74d7368f71067068b64c8 Mon Sep 17 00:00:00 2001
From: simranchhattani
Date: Wed, 27 May 2020 20:44:35 +0530
Subject: Add files via upload
---
.../Vector-Spaces/gifs/3D_Vector_Space.gif | Bin 0 -> 1976679 bytes
.../gifs/Function_Vector_Space_Example.gif | Bin 0 -> 634786 bytes
.../Vector_Addition_and_Scalar_Multiplication.gif | Bin 0 -> 4954730 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/3D_Vector_Space.gif
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Function_Vector_Space_Example.gif
create mode 100644 FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Vector_Addition_and_Scalar_Multiplication.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/3D_Vector_Space.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/3D_Vector_Space.gif
new file mode 100644
index 0000000..137546a
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/3D_Vector_Space.gif differ
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Function_Vector_Space_Example.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Function_Vector_Space_Example.gif
new file mode 100644
index 0000000..d9edf46
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Function_Vector_Space_Example.gif differ
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Vector_Addition_and_Scalar_Multiplication.gif b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Vector_Addition_and_Scalar_Multiplication.gif
new file mode 100644
index 0000000..ed65f8a
Binary files /dev/null and b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Vector-Spaces/gifs/Vector_Addition_and_Scalar_Multiplication.gif differ
--
cgit
From f516d1b082ed5e107e37e0c5a43916ca14816bef Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 10:19:46 +0530
Subject: draft submission
---
.../fubini's-theorem/file2_surface2.gif | Bin 2556585 -> 3791121 bytes
.../fubini's-theorem/file2_surface2.py | 16 +-
.../file3.o_iteration_methods_checkpoint.gif | Bin 0 -> 465521 bytes
.../file3.o_iteration_methods_checkpoint.py | 226 +++++++++++
.../fubini's-theorem/file3_iteration_methods.gif | Bin 0 -> 1762897 bytes
.../fubini's-theorem/file3_iteration_methods.py | 428 +++++++++++++++++++++
.../file3_iteration_methods_checkpoint.gif | Bin 465521 -> 0 bytes
.../file3_iteration_methods_checkpoint.py | 226 -----------
.../fubini's-theorem/file4_iteration_methods.gif | Bin 1762897 -> 0 bytes
.../fubini's-theorem/file4_iteration_methods.py | 428 ---------------------
10 files changed, 664 insertions(+), 660 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
(limited to 'FSF-2020')
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/file2_surface2.gif
index ac13f21..37c4b1d 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
index c998f3b..3160fdb 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file2_surface2.py
@@ -63,7 +63,7 @@ class SurfacesAnimation(ThreeDScene):
surface.set_style(
fill_opacity=.5,
fill_color=BLUE_E,
- stroke_width=0.2,
+ stroke_width=0.4,
stroke_color=WHITE,
)
#get boundary curves
@@ -85,17 +85,18 @@ class SurfacesAnimation(ThreeDScene):
self.add(c1,c2,c1_label,c2_label)
- self.begin_ambient_camera_rotation(rate=0.4)
+ self.begin_ambient_camera_rotation(rate=0.24)
self.get_region(self.axes,c1,c2)
self.play(Write(surface))
self.get_lines()
- self.wait(1)
+ self.wait(3.5)
self.stop_ambient_camera_rotation()
+ self.wait(.5)
self.move_camera(
distance=20,
phi=10 * DEGREES,
theta=80 * DEGREES,
- run_time=2.5
+ run_time=3
)
self.wait(2)
@@ -128,7 +129,7 @@ class SurfacesAnimation(ThreeDScene):
R=TextMobject("R").set_color(PINK).scale(2).rotate(180*DEGREES , OUT)
R.move_to(region,IN+RIGHT)
- self.play(Write(region))
+ self.play(ShowCreation(region))
self.add(R)
def get_surface(self,axes, func, **kwargs):
@@ -279,8 +280,11 @@ class SurfacesAnimation(ThreeDScene):
axes.z_axis.label = z_label
for axis in axes:
axis.add(axis.label)
- return axes
+ return axes
#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
+
+
+
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/file3.o_iteration_methods_checkpoint.gif
new file mode 100644
index 0000000..2e507f9
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.py
new file mode 100644
index 0000000..55f91d3
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3.o_iteration_methods_checkpoint.py
@@ -0,0 +1,226 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.5,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_y_int=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_y_int,DOWN,buff=.5
+ ).align_to(
+ caption_y_int,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+ rects=self.get_rects()
+
+ self.play(Write(caption_y_int))
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ int_lim,RIGHT,buff=0))
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT))
+
+ self.show_area()
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+
+ def show_area(self):
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity = 1,
+ stroke_width = 0,
+ )
+ self.play(ShowCreation(area))
+ # self.transform_between_riemann_rects(self.rects,area)
+ self.area = area
+
+ def get_rects(self):
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ # self.transform_between_riemann_rects(self.area,rects)
+ self.rects=rects
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/10)
+ rects_subset = self.rects[4*rp:5*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
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/file3_iteration_methods.gif
new file mode 100644
index 0000000..e73dd8e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
new file mode 100644
index 0000000..662242a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
@@ -0,0 +1,428 @@
+from manimlib.imports import *
+
+class IterationMethods(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 1,
+ "y_min" : 0,
+ "y_max" : 1,
+ "x_tick_frequency" : 1,
+ "y_tick_frequency" : 1,
+ "x_labeled_nums": list(np.arange(0,2)),
+ "y_labeled_nums": list(np.arange(0 ,2)),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
+ "area_color": PINK ,
+ "area_opacity": .6,
+ }
+
+ 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.intro_scene()
+ self.setup_axes(animate=True)
+
+
+ curve1= self.get_graph(
+ lambda x : x**2 ,
+ x_min = 0,
+ x_max = 1,
+ color = ORANGE)
+ c1_eqn=self.get_graph_label(
+ curve1,
+ label="y=x^2",
+ x_val=.5,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+
+ curve2= self.get_graph(
+ lambda x : x ,
+ x_min = 0,
+ x_max = 1,
+ color = YELLOW)
+ c2_eqn=self.get_graph_label(
+ curve2,
+ label="y=x",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.curve1=curve1
+ self.curve2=curve2
+
+ caption_limit=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
+ int_lim=TextMobject(
+ "$$\\int_0^1$$"
+ ).next_to(
+ caption_limit,DOWN,buff=.5
+ ).align_to(
+ caption_limit,LEFT
+ )
+
+ self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
+
+ self.play(Write(caption_limit))
+ self.get_rects()
+ self.show_integral_values_at_different_x()
+ self.wait(1)
+ self.add(int_lim)
+
+ self.integral_setup(int_lim,first_y=True)
+
+
+ self.another_method_scene()
+ self.remove(self.area)
+ self.wait()
+
+ c1_eqn_y=self.get_graph_label(
+ curve1,
+ label="x=\sqrt y",
+ x_val=.6,
+ direction=RIGHT,
+ buff=MED_LARGE_BUFF,
+ color=ORANGE,
+ )
+ c2_eqn_y=self.get_graph_label(
+ curve2,
+ label="x=y",
+ x_val=.7,
+ direction=LEFT,
+ buff=MED_LARGE_BUFF,
+ color=YELLOW,
+ )
+ self.play(
+ ReplacementTransform(c1_eqn,c1_eqn_y),
+ ReplacementTransform(c2_eqn,c2_eqn_y)
+ )
+ self.get_rects(base_y=True)
+ self.show_integral_values_at_different_y()
+ self.wait(1)
+
+ int_lim_y=int_lim.copy()
+ int_lim_y.next_to(int_lim,DOWN)
+ equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
+ self.add(equal,int_lim_y)
+
+ self.integral_setup(int_lim_y,first_y=False)
+
+ self.wait(2)
+
+ ###################
+ def intro_scene(self):
+ text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
+ self.play(Write(text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(text))
+
+ def another_method_scene(self):
+ text=TextMobject(r"The other method\\ of iteration")
+ text.next_to(self.curve1,UP,buff=-1)
+ self.play(GrowFromCenter(text))
+ self.wait(2)
+ self.play(LaggedStart(FadeOut(text),lag_ratio=2))
+
+ def integral_setup(self,ref_object,first_y=True):
+ if first_y:
+ area=self.get_area()
+ self.area=area
+ self.play(FadeOut(self.brace_group))
+ self.play(ApplyMethod(
+ self.y_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+
+ self.play(ApplyMethod(
+ self.dx_label.next_to,
+ self.y_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+ else:
+ area=self.get_area(base_y=True)
+ self.area=area
+ self.play(
+ FadeOut(self.y_brace_group),
+ Rotate(self.x_int,PI/2)
+ )
+ self.play(ApplyMethod(
+ self.x_int.next_to,
+ ref_object,RIGHT,buff=0)
+ )
+ self.play(ApplyMethod(
+ self.dy_label.next_to,
+ self.x_int,RIGHT),
+ ShowCreation(area),run_time=4
+ )
+
+ def get_area(self,base_y=False):
+ if base_y:
+ area = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_area = area
+ else:
+ area = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.001,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.area = area
+
+ # self.transform_between_riemann_rects(self.rects,area)
+ return area
+
+ def get_rects(self,base_y=False):
+ if base_y:
+ rects = self.bounded_riemann_rectangles_y(
+ lambda x: x,
+ lambda x: np.sqrt(x),
+ y_min = 0,
+ y_max = 1,
+ dy =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.y_rects=rects
+ else:
+ rects = self.bounded_riemann_rectangles(
+ self.curve1,
+ self.curve2,
+ x_min = 0,
+ x_max = 1,
+ dx =.01,
+ start_color = self.area_color,
+ end_color = self.area_color,
+ fill_opacity =self.area_opacity,
+ stroke_width = 0,
+ )
+ self.rects=rects
+ # self.transform_between_riemann_rects(self.area,rects)
+
+ return rects
+
+ def show_integral_values_at_different_x(self):
+ rects=self.rects
+ rect = rects[len(rects)*1//10]
+ dx_brace = Brace(rect, DOWN, buff = 0)
+ dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
+ dx_brace_group = VGroup(dx_brace,dx_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[6*rp:7*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, LEFT, buff =.1)
+ y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
+ y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_y_int, y_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(y_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_y_int = y_int
+
+ y_int = last_y_int
+ y_brace = last_brace
+ self.brace_group=VGroup(y_brace,dx_brace,rect)
+ self.y_int=y_int
+ self.dx_label=dx_label
+
+ def show_integral_values_at_different_y(self):
+ rects=self.y_rects
+ rect = rects[len(rects)*1//10]
+ dy_brace = Brace(rect, LEFT, buff = 0)
+ dy_label = dy_brace.get_text("$dy$", buff = SMALL_BUFF)
+ dy_brace_group = VGroup(dy_brace,dy_label)
+ rp=int(len(rects)/20)
+ rects_subset = rects[5*rp:6*rp]
+
+ last_rect = None
+ for rect in rects_subset:
+ brace = Brace(rect, DOWN, buff =.1)
+ x_int = TexMobject("\\int_{y}^{\sqrt y}dx").rotate(-PI/2)
+ x_int.next_to(brace, DOWN, SMALL_BUFF)
+ anims = [
+ rect.set_fill, self.area_color, 1,
+ dy_brace_group.next_to, rect, LEFT, SMALL_BUFF
+ ]
+ if last_rect is not None:
+ anims += [
+ last_rect.set_fill, None, 0,
+ # last_rect.set_fill, self.area_color, self.area_opacity,
+ ReplacementTransform(last_brace, brace),
+ ReplacementTransform(last_x_int, x_int),
+ ]
+ else:
+ anims += [
+ GrowFromCenter(brace),
+ Write(x_int)
+ ]
+ self.play(*anims)
+ # self.wait(.2)
+
+ last_rect = rect
+ last_brace = brace
+ last_x_int = x_int
+
+ x_int = last_x_int
+ y_brace = last_brace
+ self.y_brace_group=VGroup(y_brace,dy_brace,rect)
+ self.x_int=x_int
+ self.dy_label=dy_label
+
+
+ def bounded_riemann_rectangles(
+ self,
+ graph1,
+ graph2,
+ x_min=None,
+ x_max=None,
+ dx=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ x_min = x_min if x_min is not None else self.x_min
+ x_max = x_max if x_max is not None else self.x_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ x_range = np.arange(x_min, x_max, dx)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ if input_sample_type == "left":
+ sample_input = x
+ elif input_sample_type == "right":
+ sample_input = x + dx
+ elif input_sample_type == "center":
+ sample_input = x + 0.5 * dx
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.input_to_graph_point(sample_input, graph1)
+ graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
+ graph2_point = self.input_to_graph_point(sample_input, graph2)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dx,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+ def bounded_riemann_rectangles_y(
+ self,
+ graph1,
+ graph2,
+ y_min=None,
+ y_max=None,
+ dy=0.01,
+ input_sample_type="center",
+ stroke_width=1,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ show_signed_area=True,
+ width_scale_factor=1.001
+ ):
+ y_min = y_min if y_min is not None else self.y_min
+ y_max = y_max if y_max is not None else self.y_max
+ if start_color is None:
+ start_color = self.default_riemann_start_color
+ if end_color is None:
+ end_color = self.default_riemann_end_color
+ rectangles = VGroup()
+ y_range = np.arange(y_min, y_max, dy)
+ colors = color_gradient([start_color, end_color], len(y_range))
+ for y, color in zip(y_range, colors):
+ if input_sample_type == "left":
+ sample_input = y
+ elif input_sample_type == "right":
+ sample_input = y + dy
+ elif input_sample_type == "center":
+ sample_input = y + 0.5 * dy
+ else:
+ raise Exception("Invalid input sample type")
+ graph1_point = self.coords_to_point(
+ graph1(sample_input),sample_input
+ )
+ dy_input=sample_input + width_scale_factor * dy
+ graph1_point_dy= self.coords_to_point(
+ graph1(dy_input),dy_input
+ )
+ graph2_point = self.coords_to_point(
+ graph2(sample_input),sample_input
+ )
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ graph1_point,
+ graph1_point_dy,
+ graph2_point
+ ])))
+
+ rect = Rectangle()
+ rect.replace(points, stretch=True)
+ if graph1_point[1] < self.graph_origin[1] and show_signed_area:
+ fill_color = invert_color(color)
+ else:
+ fill_color = color
+ rect.set_fill(fill_color, opacity=fill_opacity)
+ rect.set_stroke(stroke_color, width=stroke_width)
+ rectangles.add(rect)
+ return rectangles
+
+
+#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif
deleted file mode 100644
index 2e507f9..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
deleted file mode 100644
index 55f91d3..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods_checkpoint.py
+++ /dev/null
@@ -1,226 +0,0 @@
-from manimlib.imports import *
-
-class IterationMethods(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 1,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,2)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+4*LEFT+3*DOWN,
- "area_color": PINK ,
- "area_opacity": .6,
- }
-
- 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.intro_scene()
- self.setup_axes(animate=True)
-
-
- curve1= self.get_graph(
- lambda x : x**2 ,
- x_min = 0,
- x_max = 1,
- color = ORANGE)
- c1_eqn=self.get_graph_label(
- curve1,
- label="y=x^2",
- x_val=.5,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
-
- curve2= self.get_graph(
- lambda x : x ,
- x_min = 0,
- x_max = 1,
- color = YELLOW)
- c2_eqn=self.get_graph_label(
- curve2,
- label="y=x",
- x_val=.5,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.curve1=curve1
- self.curve2=curve2
-
- caption_y_int=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
- int_lim=TextMobject(
- "$$\\int_0^1$$"
- ).next_to(
- caption_y_int,DOWN,buff=.5
- ).align_to(
- caption_y_int,LEFT
- )
-
- self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
- rects=self.get_rects()
-
- self.play(Write(caption_y_int))
- self.show_integral_values_at_different_x()
- self.wait(1)
- self.add(int_lim)
- self.play(FadeOut(self.brace_group))
- self.play(ApplyMethod(
- self.y_int.next_to,
- int_lim,RIGHT,buff=0))
-
- self.play(ApplyMethod(
- self.dx_label.next_to,
- self.y_int,RIGHT))
-
- self.show_area()
-
- self.wait(2)
-
- ###################
- def intro_scene(self):
- text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
- self.play(Write(text),run_time=4)
- self.wait(2)
- self.play(FadeOut(text))
-
-
- def show_area(self):
- area = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity = 1,
- stroke_width = 0,
- )
- self.play(ShowCreation(area))
- # self.transform_between_riemann_rects(self.rects,area)
- self.area = area
-
- def get_rects(self):
- rects = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- # self.transform_between_riemann_rects(self.area,rects)
- self.rects=rects
- return rects
-
- def show_integral_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/10)
- rects_subset = self.rects[4*rp:5*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff =.1)
- y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
- y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y_int, y_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y_int = y_int
-
- y_int = last_y_int
- y_brace = last_brace
- self.brace_group=VGroup(y_brace,dx_brace,rect)
- self.y_int=y_int
- self.dx_label=dx_label
-
-
- def bounded_riemann_rectangles(
- self,
- graph1,
- graph2,
- x_min=None,
- x_max=None,
- dx=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- x_min = x_min if x_min is not None else self.x_min
- x_max = x_max if x_max is not None else self.x_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- x_range = np.arange(x_min, x_max, dx)
- colors = color_gradient([start_color, end_color], len(x_range))
- for x, color in zip(x_range, colors):
- if input_sample_type == "left":
- sample_input = x
- elif input_sample_type == "right":
- sample_input = x + dx
- elif input_sample_type == "center":
- sample_input = x + 0.5 * dx
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.input_to_graph_point(sample_input, graph1)
- graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
- graph2_point = self.input_to_graph_point(sample_input, graph2)
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dx,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
-#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif
deleted file mode 100644
index e73dd8e..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
deleted file mode 100644
index 662242a..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_iteration_methods.py
+++ /dev/null
@@ -1,428 +0,0 @@
-from manimlib.imports import *
-
-class IterationMethods(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 1,
- "y_min" : 0,
- "y_max" : 1,
- "x_tick_frequency" : 1,
- "y_tick_frequency" : 1,
- "x_labeled_nums": list(np.arange(0,2)),
- "y_labeled_nums": list(np.arange(0 ,2)),
- "x_axis_width": 6,
- "y_axis_height": 6,
- "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
- "area_color": PINK ,
- "area_opacity": .6,
- }
-
- 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.intro_scene()
- self.setup_axes(animate=True)
-
-
- curve1= self.get_graph(
- lambda x : x**2 ,
- x_min = 0,
- x_max = 1,
- color = ORANGE)
- c1_eqn=self.get_graph_label(
- curve1,
- label="y=x^2",
- x_val=.5,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
-
- curve2= self.get_graph(
- lambda x : x ,
- x_min = 0,
- x_max = 1,
- color = YELLOW)
- c2_eqn=self.get_graph_label(
- curve2,
- label="y=x",
- x_val=.7,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.curve1=curve1
- self.curve2=curve2
-
- caption_limit=TextMobject(r"Observe the limits\\ of integration").to_corner(UR)
- int_lim=TextMobject(
- "$$\\int_0^1$$"
- ).next_to(
- caption_limit,DOWN,buff=.5
- ).align_to(
- caption_limit,LEFT
- )
-
- self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
-
- self.play(Write(caption_limit))
- self.get_rects()
- self.show_integral_values_at_different_x()
- self.wait(1)
- self.add(int_lim)
-
- self.integral_setup(int_lim,first_y=True)
-
-
- self.another_method_scene()
- self.remove(self.area)
- self.wait()
-
- c1_eqn_y=self.get_graph_label(
- curve1,
- label="x=\sqrt y",
- x_val=.6,
- direction=RIGHT,
- buff=MED_LARGE_BUFF,
- color=ORANGE,
- )
- c2_eqn_y=self.get_graph_label(
- curve2,
- label="x=y",
- x_val=.7,
- direction=LEFT,
- buff=MED_LARGE_BUFF,
- color=YELLOW,
- )
- self.play(
- ReplacementTransform(c1_eqn,c1_eqn_y),
- ReplacementTransform(c2_eqn,c2_eqn_y)
- )
- self.get_rects(base_y=True)
- self.show_integral_values_at_different_y()
- self.wait(1)
-
- int_lim_y=int_lim.copy()
- int_lim_y.next_to(int_lim,DOWN)
- equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
- self.add(equal,int_lim_y)
-
- self.integral_setup(int_lim_y,first_y=False)
-
- self.wait(2)
-
- ###################
- def intro_scene(self):
- text=TextMobject(r"How different orders of \textbf{iterated integral}\\ works over the same region ?" )
- self.play(Write(text),run_time=4)
- self.wait(2)
- self.play(FadeOut(text))
-
- def another_method_scene(self):
- text=TextMobject(r"The other method\\ of iteration")
- text.next_to(self.curve1,UP,buff=-1)
- self.play(GrowFromCenter(text))
- self.wait(2)
- self.play(LaggedStart(FadeOut(text),lag_ratio=2))
-
- def integral_setup(self,ref_object,first_y=True):
- if first_y:
- area=self.get_area()
- self.area=area
- self.play(FadeOut(self.brace_group))
- self.play(ApplyMethod(
- self.y_int.next_to,
- ref_object,RIGHT,buff=0)
- )
-
- self.play(ApplyMethod(
- self.dx_label.next_to,
- self.y_int,RIGHT),
- ShowCreation(area),run_time=4
- )
- else:
- area=self.get_area(base_y=True)
- self.area=area
- self.play(
- FadeOut(self.y_brace_group),
- Rotate(self.x_int,PI/2)
- )
- self.play(ApplyMethod(
- self.x_int.next_to,
- ref_object,RIGHT,buff=0)
- )
- self.play(ApplyMethod(
- self.dy_label.next_to,
- self.x_int,RIGHT),
- ShowCreation(area),run_time=4
- )
-
- def get_area(self,base_y=False):
- if base_y:
- area = self.bounded_riemann_rectangles_y(
- lambda x: x,
- lambda x: np.sqrt(x),
- y_min = 0,
- y_max = 1,
- dy =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.y_area = area
- else:
- area = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.001,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.area = area
-
- # self.transform_between_riemann_rects(self.rects,area)
- return area
-
- def get_rects(self,base_y=False):
- if base_y:
- rects = self.bounded_riemann_rectangles_y(
- lambda x: x,
- lambda x: np.sqrt(x),
- y_min = 0,
- y_max = 1,
- dy =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.y_rects=rects
- else:
- rects = self.bounded_riemann_rectangles(
- self.curve1,
- self.curve2,
- x_min = 0,
- x_max = 1,
- dx =.01,
- start_color = self.area_color,
- end_color = self.area_color,
- fill_opacity =self.area_opacity,
- stroke_width = 0,
- )
- self.rects=rects
- # self.transform_between_riemann_rects(self.area,rects)
-
- return rects
-
- def show_integral_values_at_different_x(self):
- rects=self.rects
- rect = rects[len(rects)*1//10]
- dx_brace = Brace(rect, DOWN, buff = 0)
- dx_label = dx_brace.get_text("$dx$", buff = SMALL_BUFF)
- dx_brace_group = VGroup(dx_brace,dx_label)
- rp=int(len(rects)/20)
- rects_subset = rects[6*rp:7*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, LEFT, buff =.1)
- y_int = TexMobject("\\int_{x^2}^{x}dy")#.rotate(PI/2)
- y_int.next_to(brace, LEFT, MED_SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dx_brace_group.next_to, rect, DOWN, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_y_int, y_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(y_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_y_int = y_int
-
- y_int = last_y_int
- y_brace = last_brace
- self.brace_group=VGroup(y_brace,dx_brace,rect)
- self.y_int=y_int
- self.dx_label=dx_label
-
- def show_integral_values_at_different_y(self):
- rects=self.y_rects
- rect = rects[len(rects)*1//10]
- dy_brace = Brace(rect, LEFT, buff = 0)
- dy_label = dy_brace.get_text("$dy$", buff = SMALL_BUFF)
- dy_brace_group = VGroup(dy_brace,dy_label)
- rp=int(len(rects)/20)
- rects_subset = rects[5*rp:6*rp]
-
- last_rect = None
- for rect in rects_subset:
- brace = Brace(rect, DOWN, buff =.1)
- x_int = TexMobject("\\int_{y}^{\sqrt y}dx").rotate(-PI/2)
- x_int.next_to(brace, DOWN, SMALL_BUFF)
- anims = [
- rect.set_fill, self.area_color, 1,
- dy_brace_group.next_to, rect, LEFT, SMALL_BUFF
- ]
- if last_rect is not None:
- anims += [
- last_rect.set_fill, None, 0,
- # last_rect.set_fill, self.area_color, self.area_opacity,
- ReplacementTransform(last_brace, brace),
- ReplacementTransform(last_x_int, x_int),
- ]
- else:
- anims += [
- GrowFromCenter(brace),
- Write(x_int)
- ]
- self.play(*anims)
- # self.wait(.2)
-
- last_rect = rect
- last_brace = brace
- last_x_int = x_int
-
- x_int = last_x_int
- y_brace = last_brace
- self.y_brace_group=VGroup(y_brace,dy_brace,rect)
- self.x_int=x_int
- self.dy_label=dy_label
-
-
- def bounded_riemann_rectangles(
- self,
- graph1,
- graph2,
- x_min=None,
- x_max=None,
- dx=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- x_min = x_min if x_min is not None else self.x_min
- x_max = x_max if x_max is not None else self.x_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- x_range = np.arange(x_min, x_max, dx)
- colors = color_gradient([start_color, end_color], len(x_range))
- for x, color in zip(x_range, colors):
- if input_sample_type == "left":
- sample_input = x
- elif input_sample_type == "right":
- sample_input = x + dx
- elif input_sample_type == "center":
- sample_input = x + 0.5 * dx
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.input_to_graph_point(sample_input, graph1)
- graph1_point_dx= self.input_to_graph_point(sample_input + width_scale_factor * dx, graph1)
- graph2_point = self.input_to_graph_point(sample_input, graph2)
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dx,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
- def bounded_riemann_rectangles_y(
- self,
- graph1,
- graph2,
- y_min=None,
- y_max=None,
- dy=0.01,
- input_sample_type="center",
- stroke_width=1,
- stroke_color=BLACK,
- fill_opacity=1,
- start_color=None,
- end_color=None,
- show_signed_area=True,
- width_scale_factor=1.001
- ):
- y_min = y_min if y_min is not None else self.y_min
- y_max = y_max if y_max is not None else self.y_max
- if start_color is None:
- start_color = self.default_riemann_start_color
- if end_color is None:
- end_color = self.default_riemann_end_color
- rectangles = VGroup()
- y_range = np.arange(y_min, y_max, dy)
- colors = color_gradient([start_color, end_color], len(y_range))
- for y, color in zip(y_range, colors):
- if input_sample_type == "left":
- sample_input = y
- elif input_sample_type == "right":
- sample_input = y + dy
- elif input_sample_type == "center":
- sample_input = y + 0.5 * dy
- else:
- raise Exception("Invalid input sample type")
- graph1_point = self.coords_to_point(
- graph1(sample_input),sample_input
- )
- dy_input=sample_input + width_scale_factor * dy
- graph1_point_dy= self.coords_to_point(
- graph1(dy_input),dy_input
- )
- graph2_point = self.coords_to_point(
- graph2(sample_input),sample_input
- )
-
- points = VGroup(*list(map(VectorizedPoint, [
- graph1_point,
- graph1_point_dy,
- graph2_point
- ])))
-
- rect = Rectangle()
- rect.replace(points, stretch=True)
- if graph1_point[1] < self.graph_origin[1] and show_signed_area:
- fill_color = invert_color(color)
- else:
- fill_color = color
- rect.set_fill(fill_color, opacity=fill_opacity)
- rect.set_stroke(stroke_color, width=stroke_width)
- rectangles.add(rect)
- return rectangles
-
-
-#uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
--
cgit
From 624869428ba1be7a499b837dfff9d26793fc1c3b Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 11:19:24 +0530
Subject: update README
---
.../integrals-of-multivariable-functions/README.md | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'FSF-2020')
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 a321caf..02914ad 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
@@ -1 +1,6 @@
FSF2020--Somnath Pandit
+
+**Topics:**
+
+1. Double Integral
+2. Fubini's Theorem
--
cgit
From c0fe39d398631f5b8bb251d9b22033a1f1c4a8dd Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 11:47:13 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
(limited to 'FSF-2020')
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 02914ad..58b9c1a 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,4 +3,21 @@ FSF2020--Somnath Pandit
**Topics:**
1. Double Integral
+
+![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif?raw=true)
+
+![file2_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/file2_area_under_func.gif?raw=true)
+
+![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?raw=true/file3_y_limit_dependent_on_x.gif)
+
+![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?raw=true)
+
+![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?raw=true)
+
2. Fubini's Theorem
+
+![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?raw=true)
+
+![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?raw=true)
+
+![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?raw=true)
--
cgit
From 848e6a16dc79e41b3242e934ec7df3954680a2ad Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 11:48:47 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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 58b9c1a..c738f08 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
@@ -8,7 +8,7 @@ FSF2020--Somnath Pandit
![file2_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/file2_area_under_func.gif?raw=true)
-![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?raw=true/file3_y_limit_dependent_on_x.gif)
+![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)
![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?raw=true)
--
cgit
From 788ce8d1cc33eff2f2f543fcacceb5a80e79d7ea Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 11:55:28 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
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 c738f08..80ecad8 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
@@ -2,22 +2,30 @@ FSF2020--Somnath Pandit
**Topics:**
-1. Double Integral
+# Double Integral
+**file1_surface**
![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif?raw=true)
+**file2_area_under_func**
![file2_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/file2_area_under_func.gif?raw=true)
+**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)
+**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?raw=true)
+**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?raw=true)
-2. Fubini's Theorem
+# Fubini's Theorem
+**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?raw=true)
+**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?raw=true)
+**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?raw=true)
--
cgit
From 6f7c072b4e19fbdad05de3158b4d262417ded2c5 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 11:58:49 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'FSF-2020')
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 80ecad8..23e2423 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
@@ -5,27 +5,27 @@ FSF2020--Somnath Pandit
# Double Integral
**file1_surface**
-![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif?raw=true)
+![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif)
**file2_area_under_func**
-![file2_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/file2_area_under_func.gif?raw=true)
+![file2_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/file2_area_under_func.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)
**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?raw=true)
+![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)
**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?raw=true)
+![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)
# Fubini's Theorem
**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?raw=true)
+![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)
**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?raw=true)
+![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)
**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?raw=true)
+![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)
--
cgit
From a805f5b76f0a82a230acbc79f3dafce13e3b37be Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 28 May 2020 14:29:50 +0530
Subject: added curvy_region
---
.../integrals-of-multivariable-functions/README.md | 5 +
.../fubini's-theorem/file4_curvy_region.gif | Bin 0 -> 1282583 bytes
.../fubini's-theorem/file4_curvy_region.py | 102 +++++++++++++++++++++
3 files changed, 107 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.py
(limited to 'FSF-2020')
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 23e2423..0cd6968 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
@@ -29,3 +29,8 @@ FSF2020--Somnath Pandit
**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)
+
+**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)
+
+
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/file4_curvy_region.gif
new file mode 100644
index 0000000..b0620e5
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.py
new file mode 100644
index 0000000..46134a7
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file4_curvy_region.py
@@ -0,0 +1,102 @@
+from manimlib.imports import *
+
+class CurvyRegion(GraphScene):
+ CONFIG = {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 6,
+ "graph_origin": ORIGIN+4.5*LEFT+3*DOWN,
+ "x_labeled_nums": np.arange(0, 9,2),
+ "y_labeled_nums": np.arange(0, 7,2),
+ "x_axis_width": 6,
+ "y_axis_height": 6,
+ }
+
+ def construct(self):
+ XD = self.x_axis_width/(self.x_max- self.x_min)
+ YD = self.y_axis_height/(self.y_max- self.y_min)
+ self.X=XD*RIGHT ;self.Y=YD*UP
+
+ sin_curve_points=[self.graph_origin+(2+.5*np.sin(2*y),y,0)
+ for y in np.arange(1,5,.005)]
+
+ cos_curve_points=[self.graph_origin+(
+ 5+.5*np.cos(2*y),y,0)
+ for y in np.arange(1,5,.005)]
+ cos_curve_points.reverse()
+
+ region=Polygon(
+ *sin_curve_points+cos_curve_points,
+ color=YELLOW,
+ stroke_width=1,
+ fill_color=BLUE_E,
+ fill_opacity=.75
+ )
+
+ line=Line((1,0,0),(1,6,0),color=RED)
+ line.move_to(self.graph_origin+2.5*self.X,DOWN)
+ self.line=line
+ self.setup_axes(animate = False)
+
+ self.add(region)
+ self.wait()
+ self.first_y_int_scene()
+ self.try_x_first_scene()
+
+
+ def first_y_int_scene(self):
+ talk=TextMobject(r"For doing the $y$ integration\\ first we need to set\\ proper $y$ limts").to_corner(UR,buff=LARGE_BUFF)
+ problem=TextMobject(r"But here we get\\ more than two $y$ values\\ for a single $x$ value" ).to_corner(UR,buff=LARGE_BUFF)
+ int_y=TextMobject("$$\\int_?^? dy$$").next_to(problem,DOWN,buff=.5)
+
+ self.play(Write(talk))
+ self.play(FadeIn(self.line))
+ self.wait(2)
+ self.play(ReplacementTransform(talk,problem))
+ self.play(
+ ApplyMethod(self.line.shift,3.7*self.X),
+ run_time=4
+ )
+ self.wait()
+ self.play(Write(int_y))
+ self.wait(3)
+ self.play(FadeOut(VGroup(problem,int_y,self.line)))
+
+ def try_x_first_scene(self):
+ try_text=TextMobject(r"But if we try to integrate\\ along $x$ first ...." ).to_corner(UR,buff=LARGE_BUFF)
+ good_limits=TextMobject(r"For one $y$ value we get\\ only \textbf{two} $x$ values $\dots$").to_corner(UR,buff=LARGE_BUFF)
+ limit_values= TextMobject(r"one Lower limit\\ one Upper limit ").next_to(good_limits,DOWN,buff=.5)
+ int_x=TextMobject("$$\\int_{f(y)}^{g(y)} dx$$").next_to(limit_values,DOWN)
+
+ self.setup_line()
+ self.play(Write(try_text))
+ self.play(FadeIn(self.line))
+ self.wait()
+ self.play(ReplacementTransform(try_text,good_limits))
+ self.wait()
+ self.play(
+ ApplyMethod(self.line.shift,3*self.Y),
+ run_time=4
+ )
+ self.play(Write(limit_values))
+ self.wait()
+ self.show_functions()
+ self.play(Write(int_x))
+ self.wait(3)
+
+ def setup_line(self):
+ line=self.line.rotate(PI/2)
+ line.move_to(self.graph_origin+.5*self.X+1.5*self.Y,LEFT)
+ self.line=line
+
+ def show_functions(self):
+ fy=TextMobject("$$f(y)$$")
+ gy=TextMobject("$$g(y)$$")
+ fy.move_to(self.graph_origin+2*self.X+3.3*self.Y)
+ gy.move_to(self.graph_origin+7*self.X+2*self.Y)
+ self.play(FadeIn(VGroup(fy,gy)))
+
+
+ #uploaded by Somnath Pandit.FSF2020_Fubini's_Theorem
+
--
cgit
From 3064bf04b5fa63a303abdf7dfcc099186ad4350b Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Fri, 29 May 2020 18:18:47 +0530
Subject: Add files via upload
---
.../Laplace Transformations/gifs/DiracFunction.gif | Bin 0 -> 60841 bytes
.../gifs/DiracFunctionFormation.gif | Bin 0 -> 315096 bytes
.../gifs/LtransformDiracFunction.gif | Bin 0 -> 99703 bytes
.../gifs/LtransformUnitStepFunction.gif | Bin 0 -> 151025 bytes
.../gifs/UnitStepFunctionExample.gif | Bin 0 -> 192755 bytes
.../Laplace Transformations/gifs/basicIntuition.gif | Bin 0 -> 113203 bytes
.../gifs/solvingDEintuition.gif | Bin 0 -> 196162 bytes
.../Laplace Transformations/gifs/unitStepFunction.gif | Bin 0 -> 56604 bytes
8 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunction.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunctionFormation.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformDiracFunction.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformUnitStepFunction.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/UnitStepFunctionExample.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/basicIntuition.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/solvingDEintuition.gif
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/unitStepFunction.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunction.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunction.gif
new file mode 100644
index 0000000..cb62ed2
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunction.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunctionFormation.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunctionFormation.gif
new file mode 100644
index 0000000..23acbe9
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/DiracFunctionFormation.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformDiracFunction.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformDiracFunction.gif
new file mode 100644
index 0000000..b1d50b5
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformDiracFunction.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformUnitStepFunction.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformUnitStepFunction.gif
new file mode 100644
index 0000000..ccbd791
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/LtransformUnitStepFunction.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/UnitStepFunctionExample.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/UnitStepFunctionExample.gif
new file mode 100644
index 0000000..2b1c38f
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/UnitStepFunctionExample.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/basicIntuition.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/basicIntuition.gif
new file mode 100644
index 0000000..3b974bb
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/basicIntuition.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/solvingDEintuition.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/solvingDEintuition.gif
new file mode 100644
index 0000000..9883a8c
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/solvingDEintuition.gif differ
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/unitStepFunction.gif b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/unitStepFunction.gif
new file mode 100644
index 0000000..16757e1
Binary files /dev/null and b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/gifs/unitStepFunction.gif differ
--
cgit
From a356b658294689d860a63b5213b4ddb2a235b515 Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Fri, 29 May 2020 18:24:25 +0530
Subject: Added gifs
---
.../Laplace Transformations/README.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
new file mode 100644
index 0000000..2d8f06b
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
@@ -0,0 +1,21 @@
+###Basic Intuition
+![GIF1](gifs/basicIntuition.gif)
+
+###Solving D.E.intuition
+![GIF2](gifs/solvingDEintuition.gif)
+
+###Unit Step Function
+####Part1
+![GIF3](gifs/unitStepFunction.gif)
+####Part2
+![GIF4](gifs/UnitStepFunctionExample.gif)
+####Part3
+![GIF5](gifs/LtransformUnitStepFunction.gif)
+
+###Dirac Delta Function
+####Part1
+![GIF6](gifs/DiracFunction.gif)
+####Part2
+![GIF7](gifs/DiracFunctionFormation.gif)
+####Part3
+![GIF8](gifs/LtransformDiracFunction.gif)
--
cgit
From f299ffa1757488368e9d0bbef71f8b2a1792639c Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Fri, 29 May 2020 18:25:52 +0530
Subject: Updated Gifs
---
.../Laplace Transformations/README.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
index 2d8f06b..d4cd8bc 100644
--- a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
+++ b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/README.md
@@ -1,21 +1,21 @@
-###Basic Intuition
+### Basic Intuition
![GIF1](gifs/basicIntuition.gif)
-###Solving D.E.intuition
+### Solving D.E.intuition
![GIF2](gifs/solvingDEintuition.gif)
-###Unit Step Function
-####Part1
+### Unit Step Function
+#### Part1
![GIF3](gifs/unitStepFunction.gif)
-####Part2
+#### Part2
![GIF4](gifs/UnitStepFunctionExample.gif)
-####Part3
+#### Part3
![GIF5](gifs/LtransformUnitStepFunction.gif)
-###Dirac Delta Function
-####Part1
+### Dirac Delta Function
+#### Part1
![GIF6](gifs/DiracFunction.gif)
-####Part2
+#### Part2
![GIF7](gifs/DiracFunctionFormation.gif)
-####Part3
+#### Part3
![GIF8](gifs/LtransformDiracFunction.gif)
--
cgit
From 8f4d09e3556a899190545d0dfe068fb31ac5b15c Mon Sep 17 00:00:00 2001
From: G Sri Harsha
Date: Fri, 29 May 2020 18:26:34 +0530
Subject: Add files via upload
---
.../file5_formationDiracDeltaFunction.py | 142 +++++++++++++++++++++
1 file changed, 142 insertions(+)
create mode 100644 FSF-2020/calculus/series-and-transformations/Laplace Transformations/file5_formationDiracDeltaFunction.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file5_formationDiracDeltaFunction.py b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file5_formationDiracDeltaFunction.py
new file mode 100644
index 0000000..565a7cb
--- /dev/null
+++ b/FSF-2020/calculus/series-and-transformations/Laplace Transformations/file5_formationDiracDeltaFunction.py
@@ -0,0 +1,142 @@
+from manimlib.imports import *
+import math
+import pylatex
+
+def func(x,t):
+ if(x>-t and x 1182328 bytes
.../The-Four-Fundamental-Subspaces/Column_Space.py | 30 +++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif
new file mode 100644
index 0000000..7d8d2e1
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
new file mode 100644
index 0000000..afe4f9a
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
@@ -0,0 +1,30 @@
+from manimlib.imports import *
+
+class Column_Space(Scene):
+ def construct(self):
+
+ A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$")
+ A.move_to(2*UP)
+ A[1].set_color(color = DARK_BLUE)
+ A.scale(0.75)
+
+ self.play(Write(A),run_time = 1)
+
+ CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$")
+ CS_A.move_to(1.5*LEFT+1*DOWN)
+ CS_A[1].set_color(color = DARK_BLUE)
+ CS_A[3].set_color(color = DARK_BLUE)
+ CS_A[5].set_color(color = DARK_BLUE)
+ CS_A.scale(0.75)
+
+ self.play(Write(CS_A),run_time = 2)
+
+ arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT)
+ arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT)
+ arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT)
+
+ Defn = TextMobject("Linear Combination of Columns of Matrix")
+ Defn.move_to(3*DOWN)
+
+ self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1)
+ self.wait(1)
\ No newline at end of file
--
cgit
From 774fda4a9da1a3a0f87ce8d365e206a7eff58551 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 16:41:12 +0530
Subject: modification and new files
---
.../file3_y_limit_dependent_on_x.gif | Bin 1170435 -> 1165354 bytes
.../file3_y_limit_dependent_on_x.py | 2 +-
.../double-integrals/file6_doing_integration.gif | Bin 0 -> 6661372 bytes
.../double-integrals/file6_doing_integration.py | 332 +++++++++++++++++++++
.../file7_int_process_of_example.gif | Bin 0 -> 6100824 bytes
.../file7_int_process_of_example.py | 328 ++++++++++++++++++++
.../fubini's-theorem/file3_iteration_methods.gif | Bin 1762897 -> 1813461 bytes
.../fubini's-theorem/file3_iteration_methods.py | 13 +-
8 files changed, 668 insertions(+), 7 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
(limited to 'FSF-2020')
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/file3_y_limit_dependent_on_x.gif
index a2bfd9d..dcfacb6 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
index 4894ebf..f755495 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file3_y_limit_dependent_on_x.py
@@ -29,7 +29,7 @@ class YlimitXdependent(GraphScene):
line_eqn=TextMobject("2x+y=2").move_to(self.graph_origin+.8*X+Y).rotate(np.arctan(-2))
self.line=line
- caption=TextMobject(r"See the value of $y$ \\ is changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
+ caption=TextMobject(r"The value of $y$ is\\ changing with $x$").move_to(self.graph_origin+1.2*X+1.8*Y)
self.play(ShowCreation(line),Write(line_eqn))
# self.show_area()
self.show_rects()
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/file6_doing_integration.gif
new file mode 100644
index 0000000..cafed44
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
new file mode 100644
index 0000000..34d1769
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
@@ -0,0 +1,332 @@
+from manimlib.imports import *
+
+class IntegrationProcess(SpecialThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":1 ,"b": 6, "c":2 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.cos(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+ self.set_camera_orientation(distance=35,
+ phi=85 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.75,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+ slice_curve=(self.get_y_slice_graph(
+ axes,self.Func,5,color=YELLOW))
+
+
+ self.begin_ambient_camera_rotation(rate=0.08)
+ # self.play(Write(surface))
+ self.add(surface)
+
+ self.get_lines()
+
+ self.show_process(axes)
+
+ self.wait(2)
+
+
+
+ def show_process(self,axes):
+ y_tracker = ValueTracker(axes.c)
+ self.y_tracker=y_tracker
+ y=y_tracker.get_value
+ graph = always_redraw(
+ lambda: self.get_y_slice_graph(
+ axes, self.Func, y(),
+ stroke_color=YELLOW,
+ stroke_width=4,
+ )
+ )
+ graph.suspend_updating()
+
+
+ plane = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(x,y(),self.Func(x,y()))
+ for x in np.arange(axes.a,axes.b,0.01)
+ ],
+ *[
+ axes.c2p(x, y(), 0)
+ for x in [ axes.b, axes.a,]
+ ],
+ stroke_width=0,
+ fill_color=BLUE_E,
+ fill_opacity=.5,
+ ))
+ plane.suspend_updating()
+
+ self.play(Write(VGroup(graph,plane)),run_time=4)
+ graph.resume_updating()
+ plane.resume_updating()
+ self.play(
+ ApplyMethod(
+ y_tracker.set_value, axes.d,
+ rate_func=linear,
+ run_time=6,
+ )
+ )
+
+
+ def get_y_slice_graph(self, axes, func, y, **kwargs):
+ config = dict()
+ config.update(self.default_graph_style)
+ config.update({
+ "t_min": axes.a,
+ "t_max": axes.b,
+ })
+ config.update(kwargs)
+ slice_curve=ParametricFunction(
+ lambda x: axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config,
+ )
+ return slice_curve
+
+ '''def get_y_slice_plane(self, axes):
+ self.y_tracker=y_tracker
+ y=y_tracker.get_value()
+ curve_points=[
+ axes.c2p(x,y,self.Func(x,y))
+ for x in np.arange(axes.a,axes.b,0.01)
+ ]
+ base_points=[
+ axes.c2p(x, y, 0)
+ for x in [ axes.b, axes.a,]
+ ]
+ plane_points= curve_points+base_points
+ plane = always_redraw(lambda: Polygon(
+ *plane_points,
+ stroke_width=.4,
+ fill_color=BLUE,
+ fill_opacity=0.2
+ ))
+ plane.add_updater(lambda m: m.shift(
+ axes.c2p(
+ axes.a,
+ y_tracker.get_value(),
+ 1,
+ ) - plane.points[0]
+ ))
+ plane.y_tracker = y_tracker
+
+ return plane '''
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ # self.play(ShowCreation(lines))
+ self.add(lines)
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
+
+ #uploaded by Somnath Pandit.FSF2020_Double_Integral
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/file7_int_process_of_example.gif
new file mode 100644
index 0000000..d48656b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
new file mode 100644
index 0000000..ab9337d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
@@ -0,0 +1,328 @@
+from manimlib.imports import *
+
+class IntegrationProcess(SpecialThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 5,
+ "y_min": 0,
+ "y_max": 7,
+ "z_min": 0,
+ "z_max": 3,
+ "a":0 ,"b":4 , "c":0 , "d":6,
+ "axes_shift":1.5*IN+2*LEFT+4*DOWN,
+ "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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2*(1+(x+y)/10)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+ self.set_camera_orientation(#distance=35,
+ phi=60 * DEGREES,
+ theta=10 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=(1+x+y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=.1)
+ self.fn_text=fn_text
+
+ R=TextMobject("R").set_color(BLACK).scale(3).rotate(PI/2)
+ R.move_to(axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.75,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+ slice_curve=(self.get_y_slice_graph(
+ axes,self.Func,5,color=YELLOW))
+
+
+ self.begin_ambient_camera_rotation(rate=0.04)
+ # self.play(Write(surface))
+ self.add(surface)
+
+ self.get_lines()
+
+ self.show_process(axes)
+
+ self.wait()
+
+
+
+ def show_process(self,axes):
+ y_tracker = ValueTracker(axes.c)
+ self.y_tracker=y_tracker
+ y=y_tracker.get_value
+ graph = always_redraw(
+ lambda: self.get_y_slice_graph(
+ axes, self.Func, y(),
+ stroke_color=YELLOW,
+ stroke_width=4,
+ )
+ )
+ graph.suspend_updating()
+
+ plane = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(x,y(),self.Func(x,y()))
+ for x in np.arange(axes.a,axes.b,0.01)
+ ],
+ *[
+ axes.c2p(x, y(), 0)
+ for x in [ axes.b, axes.a,]
+ ],
+ stroke_width=0,
+ fill_color=BLUE_E,
+ fill_opacity=.65,
+ ))
+ plane.suspend_updating()
+
+ first_x_text=TextMobject("First the $x$ integration..",color=YELLOW)
+ first_x_text.to_corner(UR,buff=1.1)
+
+ x_func=TextMobject("$\\frac 3 2 + y$",color=BLUE)
+ '''x_func.next_to(self.fn_text,DOWN)
+ x_func.align_to(self.fn_text,LEFT)'''
+ x_func.to_edge(LEFT,buff=1)
+
+ then_y_text=TextMobject("Then the $y$ integration..",color=YELLOW)
+ then_y_text.to_corner(UR,buff=1.1)
+
+ self.add_fixed_in_frame_mobjects(first_x_text)
+ self.play(Write(first_x_text))
+ self.add_fixed_in_frame_mobjects(x_func)
+ self.play(
+ Write(VGroup(graph,plane,x_func)),
+ run_time=3
+ )
+
+ self.wait()
+ self.remove(first_x_text)
+ self.add_fixed_in_frame_mobjects(then_y_text)
+ self.play(Write(then_y_text))
+ graph.resume_updating()
+ plane.resume_updating()
+ self.play(
+ ApplyMethod(
+ y_tracker.set_value, axes.d,
+ rate_func=linear,
+ run_time=6,
+ )
+ )
+
+
+ def get_y_slice_graph(self, axes, func, y, **kwargs):
+ config = dict()
+ config.update(self.default_graph_style)
+ config.update({
+ "t_min": axes.a,
+ "t_max": axes.b,
+ })
+ config.update(kwargs)
+ slice_curve=ParametricFunction(
+ lambda x: axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config,
+ )
+ return slice_curve
+
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"RED"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ # self.play(ShowCreation(lines))
+ self.add(lines)
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ 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)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=TEAL,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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=[
+
+ ("2", 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, LEFT)
+ 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_Double_Integral
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/file3_iteration_methods.gif
index e73dd8e..4e1611b 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
index 662242a..ad78a0b 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/file3_iteration_methods.py
@@ -63,15 +63,13 @@ class IterationMethods(GraphScene):
).align_to(
caption_limit,LEFT
)
-
+ self.int_lim=int_lim
self.play(ShowCreation(VGroup(curve1,curve2)),Write(VGroup(c2_eqn,c1_eqn)))
self.play(Write(caption_limit))
self.get_rects()
self.show_integral_values_at_different_x()
self.wait(1)
- self.add(int_lim)
-
self.integral_setup(int_lim,first_y=True)
@@ -105,8 +103,9 @@ class IterationMethods(GraphScene):
int_lim_y=int_lim.copy()
int_lim_y.next_to(int_lim,DOWN)
+ self.int_lim_y=int_lim_y
equal=TextMobject("$$=$$").next_to(int_lim_y,LEFT)
- self.add(equal,int_lim_y)
+ self.add(equal)
self.integral_setup(int_lim_y,first_y=False)
@@ -139,7 +138,8 @@ class IterationMethods(GraphScene):
self.play(ApplyMethod(
self.dx_label.next_to,
self.y_int,RIGHT),
- ShowCreation(area),run_time=4
+ ShowCreation(area),
+ Write(self.int_lim),run_time=4
)
else:
area=self.get_area(base_y=True)
@@ -155,7 +155,8 @@ class IterationMethods(GraphScene):
self.play(ApplyMethod(
self.dy_label.next_to,
self.x_int,RIGHT),
- ShowCreation(area),run_time=4
+ ShowCreation(area),
+ Write(self.int_lim_y),run_time=4
)
def get_area(self,base_y=False):
--
cgit
From 5c7407ce38cc135e6f72d4bd690c8739bd619511 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 16:54:10 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 29 +---------------------
1 file changed, 1 insertion(+), 28 deletions(-)
(limited to 'FSF-2020')
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 0cd6968..25eb3c8 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
@@ -4,33 +4,6 @@ FSF2020--Somnath Pandit
# Double Integral
-**file1_surface**
-![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif)
-
-**file2_area_under_func**
-![file2_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/file2_area_under_func.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)
-
-**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)
-
-**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)
-
# Fubini's Theorem
-**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)
-
-**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)
-
-**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)
-
-**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)
-
-
+# Line Integrals
--
cgit
From 7540f66931aa7fe35a432af5ccda59f7269b0c04 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 16:55:22 +0530
Subject: Create Animations.md
---
.../fubini's-theorem/Animations.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
new file mode 100644
index 0000000..c1c6e8e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
@@ -0,0 +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)
+
+**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)
+
+**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)
+
+**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)
+
+
--
cgit
From 9d057283b06096be29f468dba9618828ccd14925 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 16:56:45 +0530
Subject: Rename Animations.md to README.md
---
.../fubini's-theorem/Animations.md | 14 --------------
.../fubini's-theorem/README.md | 14 ++++++++++++++
2 files changed, 14 insertions(+), 14 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
deleted file mode 100644
index c1c6e8e..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/Animations.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-**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)
-
-**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)
-
-**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)
-
-**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)
-
-
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
new file mode 100644
index 0000000..c1c6e8e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fubini's-theorem/README.md
@@ -0,0 +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)
+
+**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)
+
+**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)
+
+**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)
+
+
--
cgit
From 5baeb584839361cd7b5c0eadbe15edbfb0e84a00 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 17:04:19 +0530
Subject: Update README.md
---
.../integrals-of-multivariable-functions/README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'FSF-2020')
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 25eb3c8..221e78d 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
@@ -1,9 +1,9 @@
FSF2020--Somnath Pandit
-**Topics:**
+# **Topics:**
-# Double Integral
+## Double Integral
-# Fubini's Theorem
+## Fubini's Theorem
-# Line Integrals
+## Line Integrals
--
cgit
From 3ed5bc5ee874d84982c443d3cbde0828f124de2c Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Sun, 31 May 2020 17:10:21 +0530
Subject: Create README.md
---
.../double-integrals/README.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..fe4d73a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/README.md
@@ -0,0 +1,21 @@
+**file1_surface**
+![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif)
+
+**file2_area_under_func**
+![file2_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/file2_area_under_func.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)
+
+**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)
+
+**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)
+
+**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)
+
+**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)
+
--
cgit
From 29f26bf517b4cd42e75d41d2bdf3e77f0b04a514 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 2 Jun 2020 23:07:03 +0530
Subject: Scalar func sum method
---
.../line-integral/file1_scalar_line_int_as_sum.gif | Bin 0 -> 1051018 bytes
.../line-integral/file1_scalar_line_int_as_sum.py | 227 +++++++++++++++++++++
2 files changed, 227 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif
new file mode 100644
index 0000000..1984b08
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
new file mode 100644
index 0000000..e3f3574
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
@@ -0,0 +1,227 @@
+from manimlib.imports import *
+
+
+class LineIntegrationAsSum(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 10,
+ "y_min" : 0,
+ "y_max" : 6,
+ "graph_origin": ORIGIN+5*LEFT+3*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 6 ,
+ "x_tick_frequency": 2,
+ "y_tick_frequency": 2,
+ "Func":lambda x : 1+x**1.3*np.exp(-.12*(x-2)**2)*np.sin(x/4),
+ "a": 1 ,"b": 9, "n": 15,
+ }
+
+ 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)
+
+ curve=self.get_graph(
+ self.Func,
+ x_min=self.a,
+ x_max=self.b,
+ )
+ curve.set_color([BLACK,BLUE,BLUE,BLUE,BLACK])
+ curve_label= self.get_graph_label(
+ curve,
+ label="\\text{path of intgration}",
+ x_val=4,
+ direction=UR,
+ buff=.6,
+ color=BLUE
+ )
+ self.curve=curve
+ self.curve_label=curve_label
+
+ self.play(ShowCreation(VGroup(curve,curve_label)))
+ self.wait(.6)
+ self.break_in_arcs()
+ self.show_the_sum()
+ self.construct_equation()
+ self.wait(2)
+
+
+
+ def break_in_arcs(self):
+
+ self.write_about_breaking()
+
+ dl=0.8
+ self.get_breakers(dl)
+ self.wait(2)
+ self.play(FadeOut(self.upto_break_text))
+ self.dl=dl
+
+ def write_about_breaking(self):
+ breaking_text=TextMobject("\\texttt{..broken}"," into small", "subarcs")
+ breaking_text.set_color_by_tex_to_color_map({
+ "broken":RED,"subarcs": BLUE
+ })
+ breaking_text.next_to(self.curve_label,DOWN)
+ breaking_text.align_to(self.curve_label,LEFT)
+ self.play(
+ Write(breaking_text)
+ )
+
+ self.upto_break_text=VGroup(
+ self.curve_label,
+ breaking_text,
+ )
+
+ def get_breakers(self,dl):
+ point=self.a
+ points=[]
+ while point<(self.b-dl) :
+ start=point
+ end=point+dl
+ points += [end]
+ breaker=Line(
+ self.input_to_graph_point(start,self.curve),
+ self.input_to_graph_point(end,self.curve),
+ stroke_width=2,
+ color=RED,
+ )
+ breaker.rotate(PI/2).scale(.5)
+
+ point=end
+ self.play(FadeIn(breaker),run_time=.2)
+ # self.add(breaker)
+
+ del points[-1]
+ self.points=points
+
+
+ def show_the_sum(self):
+ at_any_points_text=TextMobject("At any ","point", "in each ", "subarc")
+ at_any_points_text.set_color_by_tex_to_color_map({
+ "point":YELLOW , "subarc": BLUE
+ })
+ at_any_points_text.to_edge(TOP,buff=SMALL_BUFF)
+
+ evaluate_text=TextMobject("$f(x,y)$ ", "is evaluated").next_to(at_any_points_text,DOWN)
+ evaluate_text.set_color_by_tex("$f(x,y)$",ORANGE)
+
+ self.at_any_points_text=at_any_points_text
+ self.evaluate_text=evaluate_text
+
+
+ dots=[]
+ for point in self.points:
+
+ dot=Dot(
+ point=self.input_to_graph_point(point,self.curve),
+ radius= .7*DEFAULT_DOT_RADIUS,
+ stroke_width= 0,
+ fill_opacity= 1.0,
+ color= YELLOW,
+ )
+ dots+=[dot]
+
+ self.play(
+ Write(at_any_points_text),
+ FadeIn(VGroup(*dots)),run_time=1.5
+ )
+ self.wait()
+ self.position_of_point_irrelevent()
+ self.multiply_with_function(dots)
+
+
+
+ def multiply_with_function(self,dots):
+ index=-(len(self.points)//3)
+ dot=dots[index]
+
+
+ multiply_text=TexMobject("f(x_i,y_i)", "\\text{ is multiplied with }","\\Delta s_i")
+ multiply_text.set_color_by_tex_to_color_map({
+ "f(x_i,y_i)":ORANGE , "\\Delta s_i": BLUE
+ })
+ multiply_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ point_coord=TextMobject("$(x_i,y_i)$",color=YELLOW)
+ point_coord.next_to(dot,DL,buff=.01).scale(.8)
+
+ func_val=TextMobject("$f(x_i,y_i)$",color=ORANGE)
+ func_val.next_to(dot,UR)
+
+ sum_up_text=TextMobject("and "," summed ", "for all i' s")
+ 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)
+ self.play(GrowFromCenter(self.ds_brace_group))
+ self.wait(2)
+ self.play(FadeOut(VGroup(
+ self.ds_brace,
+ self.at_any_points_text,
+ self.evaluate_text
+ )))
+ self.play(Write(multiply_text))
+ self.play(ApplyMethod(
+ self.ds_brace_label.next_to,
+ func_val, RIGHT,buff=.2
+ ))
+ self.play(Write(sum_up_text))
+
+ self.func_val=func_val
+ self.sum_text_group=VGroup(multiply_text,sum_up_text)
+
+ def position_of_point_irrelevent(self):
+ pass
+
+
+
+ def get_ds(self,dots,index):
+ p1= dots[index]
+ p2= dots[index+1]
+ ds_brace=Brace(VGroup(p1,p2),DL)
+ ds_brace.move_to(p1,UR)
+ ds_brace_label=ds_brace.get_text("$\Delta s_i$", buff = .05)
+ ds_brace_label.set_color(BLUE)
+ self.ds_brace=ds_brace
+ self.ds_brace_label=ds_brace_label
+ self.ds_brace_group=VGroup(ds_brace,ds_brace_label)
+
+
+ def construct_equation(self):
+ sum_eqn=TextMobject("$$\\sum_i^{ } $$").set_color(PURPLE)
+ sum_eqn.move_to(self.graph_origin+7*self.X+4*self.Y)
+
+ line_integral_text=TextMobject("The Value of the line integral is").next_to(self.sum_text_group,IN)
+ approx=TextMobject("$\\approx$",color=RED).next_to(sum_eqn,LEFT)
+ multipled=VGroup(self.func_val,self.ds_brace_label)
+ self.play(FadeIn(sum_eqn))
+ self.play(ApplyMethod(
+ multipled.next_to,sum_eqn,RIGHT
+ ))
+ self.wait()
+ self.play(FadeOut(self.sum_text_group))
+ self.play(Write(line_integral_text))
+ self.play(FadeIn(approx))
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Line Integrals
+
+
+
--
cgit
From e531d1c5a95d57266de08d098bfea7bc4dde3fd7 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 2 Jun 2020 23:11:09 +0530
Subject: Update folder name and README
---
.../line-integral/file1_scalar_line_int_as_sum.gif | Bin 1051018 -> 0 bytes
.../line-integral/file1_scalar_line_int_as_sum.py | 227 ---------------------
.../line-integrals/README.md | 11 +
.../file1_scalar_line_int_as_sum.gif | Bin 0 -> 1051018 bytes
.../line-integrals/file1_scalar_line_int_as_sum.py | 227 +++++++++++++++++++++
5 files changed, 238 insertions(+), 227 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif
deleted file mode 100644
index 1984b08..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
deleted file mode 100644
index e3f3574..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integral/file1_scalar_line_int_as_sum.py
+++ /dev/null
@@ -1,227 +0,0 @@
-from manimlib.imports import *
-
-
-class LineIntegrationAsSum(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 10,
- "y_min" : 0,
- "y_max" : 6,
- "graph_origin": ORIGIN+5*LEFT+3*DOWN,
- "x_axis_width": 10,
- "y_axis_height": 6 ,
- "x_tick_frequency": 2,
- "y_tick_frequency": 2,
- "Func":lambda x : 1+x**1.3*np.exp(-.12*(x-2)**2)*np.sin(x/4),
- "a": 1 ,"b": 9, "n": 15,
- }
-
- 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)
-
- curve=self.get_graph(
- self.Func,
- x_min=self.a,
- x_max=self.b,
- )
- curve.set_color([BLACK,BLUE,BLUE,BLUE,BLACK])
- curve_label= self.get_graph_label(
- curve,
- label="\\text{path of intgration}",
- x_val=4,
- direction=UR,
- buff=.6,
- color=BLUE
- )
- self.curve=curve
- self.curve_label=curve_label
-
- self.play(ShowCreation(VGroup(curve,curve_label)))
- self.wait(.6)
- self.break_in_arcs()
- self.show_the_sum()
- self.construct_equation()
- self.wait(2)
-
-
-
- def break_in_arcs(self):
-
- self.write_about_breaking()
-
- dl=0.8
- self.get_breakers(dl)
- self.wait(2)
- self.play(FadeOut(self.upto_break_text))
- self.dl=dl
-
- def write_about_breaking(self):
- breaking_text=TextMobject("\\texttt{..broken}"," into small", "subarcs")
- breaking_text.set_color_by_tex_to_color_map({
- "broken":RED,"subarcs": BLUE
- })
- breaking_text.next_to(self.curve_label,DOWN)
- breaking_text.align_to(self.curve_label,LEFT)
- self.play(
- Write(breaking_text)
- )
-
- self.upto_break_text=VGroup(
- self.curve_label,
- breaking_text,
- )
-
- def get_breakers(self,dl):
- point=self.a
- points=[]
- while point<(self.b-dl) :
- start=point
- end=point+dl
- points += [end]
- breaker=Line(
- self.input_to_graph_point(start,self.curve),
- self.input_to_graph_point(end,self.curve),
- stroke_width=2,
- color=RED,
- )
- breaker.rotate(PI/2).scale(.5)
-
- point=end
- self.play(FadeIn(breaker),run_time=.2)
- # self.add(breaker)
-
- del points[-1]
- self.points=points
-
-
- def show_the_sum(self):
- at_any_points_text=TextMobject("At any ","point", "in each ", "subarc")
- at_any_points_text.set_color_by_tex_to_color_map({
- "point":YELLOW , "subarc": BLUE
- })
- at_any_points_text.to_edge(TOP,buff=SMALL_BUFF)
-
- evaluate_text=TextMobject("$f(x,y)$ ", "is evaluated").next_to(at_any_points_text,DOWN)
- evaluate_text.set_color_by_tex("$f(x,y)$",ORANGE)
-
- self.at_any_points_text=at_any_points_text
- self.evaluate_text=evaluate_text
-
-
- dots=[]
- for point in self.points:
-
- dot=Dot(
- point=self.input_to_graph_point(point,self.curve),
- radius= .7*DEFAULT_DOT_RADIUS,
- stroke_width= 0,
- fill_opacity= 1.0,
- color= YELLOW,
- )
- dots+=[dot]
-
- self.play(
- Write(at_any_points_text),
- FadeIn(VGroup(*dots)),run_time=1.5
- )
- self.wait()
- self.position_of_point_irrelevent()
- self.multiply_with_function(dots)
-
-
-
- def multiply_with_function(self,dots):
- index=-(len(self.points)//3)
- dot=dots[index]
-
-
- multiply_text=TexMobject("f(x_i,y_i)", "\\text{ is multiplied with }","\\Delta s_i")
- multiply_text.set_color_by_tex_to_color_map({
- "f(x_i,y_i)":ORANGE , "\\Delta s_i": BLUE
- })
- multiply_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- point_coord=TextMobject("$(x_i,y_i)$",color=YELLOW)
- point_coord.next_to(dot,DL,buff=.01).scale(.8)
-
- func_val=TextMobject("$f(x_i,y_i)$",color=ORANGE)
- func_val.next_to(dot,UR)
-
- sum_up_text=TextMobject("and "," summed ", "for all i' s")
- 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)
- self.play(GrowFromCenter(self.ds_brace_group))
- self.wait(2)
- self.play(FadeOut(VGroup(
- self.ds_brace,
- self.at_any_points_text,
- self.evaluate_text
- )))
- self.play(Write(multiply_text))
- self.play(ApplyMethod(
- self.ds_brace_label.next_to,
- func_val, RIGHT,buff=.2
- ))
- self.play(Write(sum_up_text))
-
- self.func_val=func_val
- self.sum_text_group=VGroup(multiply_text,sum_up_text)
-
- def position_of_point_irrelevent(self):
- pass
-
-
-
- def get_ds(self,dots,index):
- p1= dots[index]
- p2= dots[index+1]
- ds_brace=Brace(VGroup(p1,p2),DL)
- ds_brace.move_to(p1,UR)
- ds_brace_label=ds_brace.get_text("$\Delta s_i$", buff = .05)
- ds_brace_label.set_color(BLUE)
- self.ds_brace=ds_brace
- self.ds_brace_label=ds_brace_label
- self.ds_brace_group=VGroup(ds_brace,ds_brace_label)
-
-
- def construct_equation(self):
- sum_eqn=TextMobject("$$\\sum_i^{ } $$").set_color(PURPLE)
- sum_eqn.move_to(self.graph_origin+7*self.X+4*self.Y)
-
- line_integral_text=TextMobject("The Value of the line integral is").next_to(self.sum_text_group,IN)
- approx=TextMobject("$\\approx$",color=RED).next_to(sum_eqn,LEFT)
- multipled=VGroup(self.func_val,self.ds_brace_label)
- self.play(FadeIn(sum_eqn))
- self.play(ApplyMethod(
- multipled.next_to,sum_eqn,RIGHT
- ))
- self.wait()
- self.play(FadeOut(self.sum_text_group))
- self.play(Write(line_integral_text))
- self.play(FadeIn(approx))
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Line Integrals
-
-
-
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
new file mode 100644
index 0000000..b96c308
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/README.md
@@ -0,0 +1,11 @@
+**
+![]()
+
+**
+![]()
+
+**
+![]()
+
+**
+![]()
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/file1_scalar_line_int_as_sum.gif
new file mode 100644
index 0000000..1984b08
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.gif differ
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
new file mode 100644
index 0000000..e3f3574
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file1_scalar_line_int_as_sum.py
@@ -0,0 +1,227 @@
+from manimlib.imports import *
+
+
+class LineIntegrationAsSum(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 10,
+ "y_min" : 0,
+ "y_max" : 6,
+ "graph_origin": ORIGIN+5*LEFT+3*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 6 ,
+ "x_tick_frequency": 2,
+ "y_tick_frequency": 2,
+ "Func":lambda x : 1+x**1.3*np.exp(-.12*(x-2)**2)*np.sin(x/4),
+ "a": 1 ,"b": 9, "n": 15,
+ }
+
+ 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)
+
+ curve=self.get_graph(
+ self.Func,
+ x_min=self.a,
+ x_max=self.b,
+ )
+ curve.set_color([BLACK,BLUE,BLUE,BLUE,BLACK])
+ curve_label= self.get_graph_label(
+ curve,
+ label="\\text{path of intgration}",
+ x_val=4,
+ direction=UR,
+ buff=.6,
+ color=BLUE
+ )
+ self.curve=curve
+ self.curve_label=curve_label
+
+ self.play(ShowCreation(VGroup(curve,curve_label)))
+ self.wait(.6)
+ self.break_in_arcs()
+ self.show_the_sum()
+ self.construct_equation()
+ self.wait(2)
+
+
+
+ def break_in_arcs(self):
+
+ self.write_about_breaking()
+
+ dl=0.8
+ self.get_breakers(dl)
+ self.wait(2)
+ self.play(FadeOut(self.upto_break_text))
+ self.dl=dl
+
+ def write_about_breaking(self):
+ breaking_text=TextMobject("\\texttt{..broken}"," into small", "subarcs")
+ breaking_text.set_color_by_tex_to_color_map({
+ "broken":RED,"subarcs": BLUE
+ })
+ breaking_text.next_to(self.curve_label,DOWN)
+ breaking_text.align_to(self.curve_label,LEFT)
+ self.play(
+ Write(breaking_text)
+ )
+
+ self.upto_break_text=VGroup(
+ self.curve_label,
+ breaking_text,
+ )
+
+ def get_breakers(self,dl):
+ point=self.a
+ points=[]
+ while point<(self.b-dl) :
+ start=point
+ end=point+dl
+ points += [end]
+ breaker=Line(
+ self.input_to_graph_point(start,self.curve),
+ self.input_to_graph_point(end,self.curve),
+ stroke_width=2,
+ color=RED,
+ )
+ breaker.rotate(PI/2).scale(.5)
+
+ point=end
+ self.play(FadeIn(breaker),run_time=.2)
+ # self.add(breaker)
+
+ del points[-1]
+ self.points=points
+
+
+ def show_the_sum(self):
+ at_any_points_text=TextMobject("At any ","point", "in each ", "subarc")
+ at_any_points_text.set_color_by_tex_to_color_map({
+ "point":YELLOW , "subarc": BLUE
+ })
+ at_any_points_text.to_edge(TOP,buff=SMALL_BUFF)
+
+ evaluate_text=TextMobject("$f(x,y)$ ", "is evaluated").next_to(at_any_points_text,DOWN)
+ evaluate_text.set_color_by_tex("$f(x,y)$",ORANGE)
+
+ self.at_any_points_text=at_any_points_text
+ self.evaluate_text=evaluate_text
+
+
+ dots=[]
+ for point in self.points:
+
+ dot=Dot(
+ point=self.input_to_graph_point(point,self.curve),
+ radius= .7*DEFAULT_DOT_RADIUS,
+ stroke_width= 0,
+ fill_opacity= 1.0,
+ color= YELLOW,
+ )
+ dots+=[dot]
+
+ self.play(
+ Write(at_any_points_text),
+ FadeIn(VGroup(*dots)),run_time=1.5
+ )
+ self.wait()
+ self.position_of_point_irrelevent()
+ self.multiply_with_function(dots)
+
+
+
+ def multiply_with_function(self,dots):
+ index=-(len(self.points)//3)
+ dot=dots[index]
+
+
+ multiply_text=TexMobject("f(x_i,y_i)", "\\text{ is multiplied with }","\\Delta s_i")
+ multiply_text.set_color_by_tex_to_color_map({
+ "f(x_i,y_i)":ORANGE , "\\Delta s_i": BLUE
+ })
+ multiply_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ point_coord=TextMobject("$(x_i,y_i)$",color=YELLOW)
+ point_coord.next_to(dot,DL,buff=.01).scale(.8)
+
+ func_val=TextMobject("$f(x_i,y_i)$",color=ORANGE)
+ func_val.next_to(dot,UR)
+
+ sum_up_text=TextMobject("and "," summed ", "for all i' s")
+ 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)
+ self.play(GrowFromCenter(self.ds_brace_group))
+ self.wait(2)
+ self.play(FadeOut(VGroup(
+ self.ds_brace,
+ self.at_any_points_text,
+ self.evaluate_text
+ )))
+ self.play(Write(multiply_text))
+ self.play(ApplyMethod(
+ self.ds_brace_label.next_to,
+ func_val, RIGHT,buff=.2
+ ))
+ self.play(Write(sum_up_text))
+
+ self.func_val=func_val
+ self.sum_text_group=VGroup(multiply_text,sum_up_text)
+
+ def position_of_point_irrelevent(self):
+ pass
+
+
+
+ def get_ds(self,dots,index):
+ p1= dots[index]
+ p2= dots[index+1]
+ ds_brace=Brace(VGroup(p1,p2),DL)
+ ds_brace.move_to(p1,UR)
+ ds_brace_label=ds_brace.get_text("$\Delta s_i$", buff = .05)
+ ds_brace_label.set_color(BLUE)
+ self.ds_brace=ds_brace
+ self.ds_brace_label=ds_brace_label
+ self.ds_brace_group=VGroup(ds_brace,ds_brace_label)
+
+
+ def construct_equation(self):
+ sum_eqn=TextMobject("$$\\sum_i^{ } $$").set_color(PURPLE)
+ sum_eqn.move_to(self.graph_origin+7*self.X+4*self.Y)
+
+ line_integral_text=TextMobject("The Value of the line integral is").next_to(self.sum_text_group,IN)
+ approx=TextMobject("$\\approx$",color=RED).next_to(sum_eqn,LEFT)
+ multipled=VGroup(self.func_val,self.ds_brace_label)
+ self.play(FadeIn(sum_eqn))
+ self.play(ApplyMethod(
+ multipled.next_to,sum_eqn,RIGHT
+ ))
+ self.wait()
+ self.play(FadeOut(self.sum_text_group))
+ self.play(Write(line_integral_text))
+ self.play(FadeIn(approx))
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Line Integrals
+
+
+
--
cgit
From a3318e22d7f309ec3955ad4f2c53f31797484fc1 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 2 Jun 2020 23:15:54 +0530
Subject: update README
---
.../integrals-of-multivariable-functions/line-integrals/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
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 b96c308..b7e1846 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,5 +1,5 @@
-**
-![]()
+**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)
**
![]()
--
cgit
From b9a88691d72bab96e46fd26650308d05904c0b1d Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Wed, 3 Jun 2020 10:10:02 +0530
Subject: gif 1 and video 1 for lecture 2
---
.../Column_Space.gif | Bin 1182328 -> 0 bytes
.../The-Four-Fundamental-Subspaces/Column_Space.py | 30 -----
.../file1_Column_Space.gif | Bin 0 -> 1182328 bytes
.../file1_Column_Space.py | 30 +++++
.../file2_Row_Space.py | 145 +++++++++++++++++++++
5 files changed, 175 insertions(+), 30 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif
deleted file mode 100644
index 7d8d2e1..0000000
Binary files a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif and /dev/null differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
deleted file mode 100644
index afe4f9a..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from manimlib.imports import *
-
-class Column_Space(Scene):
- def construct(self):
-
- A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$")
- A.move_to(2*UP)
- A[1].set_color(color = DARK_BLUE)
- A.scale(0.75)
-
- self.play(Write(A),run_time = 1)
-
- CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$")
- CS_A.move_to(1.5*LEFT+1*DOWN)
- CS_A[1].set_color(color = DARK_BLUE)
- CS_A[3].set_color(color = DARK_BLUE)
- CS_A[5].set_color(color = DARK_BLUE)
- CS_A.scale(0.75)
-
- self.play(Write(CS_A),run_time = 2)
-
- arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT)
- arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT)
- arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT)
-
- Defn = TextMobject("Linear Combination of Columns of Matrix")
- Defn.move_to(3*DOWN)
-
- self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1)
- self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif
new file mode 100644
index 0000000..7d8d2e1
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py
new file mode 100644
index 0000000..afe4f9a
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py
@@ -0,0 +1,30 @@
+from manimlib.imports import *
+
+class Column_Space(Scene):
+ def construct(self):
+
+ A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$")
+ A.move_to(2*UP)
+ A[1].set_color(color = DARK_BLUE)
+ A.scale(0.75)
+
+ self.play(Write(A),run_time = 1)
+
+ CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$")
+ CS_A.move_to(1.5*LEFT+1*DOWN)
+ CS_A[1].set_color(color = DARK_BLUE)
+ CS_A[3].set_color(color = DARK_BLUE)
+ CS_A[5].set_color(color = DARK_BLUE)
+ CS_A.scale(0.75)
+
+ self.play(Write(CS_A),run_time = 2)
+
+ arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT)
+ arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT)
+ arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT)
+
+ Defn = TextMobject("Linear Combination of Columns of Matrix")
+ Defn.move_to(3*DOWN)
+
+ self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1)
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py
new file mode 100644
index 0000000..b16a32a
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py
@@ -0,0 +1,145 @@
+from manimlib.imports import *
+
+class Row_Space(Scene):
+ def construct(self):
+
+ Heading = TextMobject("Row Space")
+ defn1 = TextMobject("Definition 1: Row Space of a matrix is the linear combination of the rows of that matrix.")
+ defn2 = TextMobject("Definition 2: It is a vector space generated by a linear combination of the columns of $A^{T}$.")
+ equivalent = TextMobject(r"Definition 1 $\equiv$ Definition 2")
+
+ Heading.move_to(2*UP)
+ Heading.set_color(color = DARK_BLUE)
+
+ defn1.move_to(UP)
+ defn1.scale(0.75)
+
+ defn2.scale(0.75)
+
+ equivalent.move_to(DOWN)
+
+ self.play(Write(Heading))
+ self.play(Write(defn1))
+ self.play(Write(defn2))
+ self.play(Write(equivalent))
+
+ self.wait(2)
+ self.play(FadeOut(Heading),FadeOut(defn1),FadeOut(defn2),ApplyMethod(equivalent.move_to,2*UP))
+
+ how = TextMobject("Let us see, How?")
+ how.move_to(UP)
+ self.play(Write(how))
+ self.play(FadeOut(equivalent),FadeOut(how))
+
+ A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$")
+ A.move_to(2*UP+3*LEFT)
+ A[1].set_color(color = DARK_BLUE)
+ A.scale(0.80)
+
+ self.play(Write(A))
+
+ rows = TextMobject(r"Rows of A $\rightarrow$",
+ r"$\left( \begin{array}{c c c} 1 & 2 & 1 \end{array} \right)$,",
+ r"$ \left( \begin{array}{c c c} 1 & 3 & 1 \end{array} \right)$,",
+ r"$\left( \begin{array}{c c c} 2 & 1 & 4 \end{array} \right)$,",
+ r"$ \left( \begin{array}{c c c} 3 & 2 & 3 \end{array} \right)$")
+ rows.scale(0.75)
+ rows[1:5].set_color(DARK_BLUE)
+ self.play(Write(rows))
+
+ ac_defn1 = TextMobject("According to Definition 1 : ")
+ ac_defn1.move_to(DOWN)
+
+ RS_A = TextMobject(r"Row Space of $A = x_{1}$",
+ r"$\left( \begin{array}{c c c} 1 & 2 & 1 \end{array} \right)$",
+ r"$+x_{2}$",
+ r"$ \left( \begin{array}{c c c} 1 & 3 & 1 \end{array} \right)$",
+ r"$ + x_{3}$",
+ r"$\left( \begin{array}{c c c} 2 & 1 & 4 \end{array} \right)$",
+ r"$+x_{4}$",
+ r"$ \left( \begin{array}{c c c} 3 & 2 & 3 \end{array} \right)$")
+ RS_A.move_to(DOWN+DOWN)
+ RS_A[6].move_to(2*DOWN+DOWN)
+ RS_A[7].move_to(2*DOWN+2*RIGHT+DOWN)
+ RS_A[1].set_color(color = DARK_BLUE)
+ RS_A[3].set_color(color = DARK_BLUE)
+ RS_A[5].set_color(color = DARK_BLUE)
+ RS_A[7].set_color(color = DARK_BLUE)
+ RS_A.scale(0.75)
+
+ self.play(FadeOut(rows[0]),Transform(rows[1],RS_A[1]),Transform(rows[2],RS_A[3]),Transform(rows[3],RS_A[5]),Transform(rows[4],RS_A[7]))
+ self.play(FadeIn(ac_defn1), Write(RS_A))
+ self.wait(1)
+
+ self.play(FadeOut(rows[1]), FadeOut(rows[2]), FadeOut(rows[3]), FadeOut(rows[4]), FadeOut(RS_A), FadeOut(ac_defn1))
+
+ A_T = TextMobject(r"$A^{T} = $",r"$\left( \begin{array}{c c c c} 1 & 1 & 2 & 3 \\ 2 & 3 & 1 & 2 \\ 1 & 1 & 4 & 3 \end{array} \right)$")
+ A_T.move_to(2*UP+3*RIGHT)
+ A_T[1].set_color(color = DARK_BLUE)
+ A_T.scale(0.80)
+
+ self.play(Write(A_T))
+
+ change1 = TextMobject(r"Rows of $A\equiv$ Columns of $A^{T}$")
+ change2 = TextMobject(r"Columns of $A\equiv$ Rows of $A^{T}$")
+ change2.move_to(DOWN)
+
+ change3 = TextMobject(r"Row Space of $A$ = Linear Combination of",r"Rows","of",r"A")
+ change3.move_to(2*DOWN)
+ change3[1].set_color(DARK_BLUE)
+ change3[3].set_color(DARK_BLUE)
+
+ self.play(Write(change1))
+ self.play(Write(change2))
+ self.play(Write(change3))
+
+ columns = TextMobject("Columns")
+ columns.scale(0.6)
+ columns.set_color(DARK_BLUE)
+ columns.move_to(2*DOWN+4.1*RIGHT)
+
+ a = TextMobject(r"$A^{T}$")
+ a.set_color(DARK_BLUE)
+ a.move_to(1.95*DOWN+5.6*RIGHT)
+
+ self.wait(0.5)
+
+ self.play(Transform(change3[1],columns), Transform(change3[3],a))
+
+ equal = TextMobject(r"= Column Space($A^{T}$)")
+ equal.move_to(3*DOWN+0.5*RIGHT)
+
+ self.play(Write(equal))
+
+ self.play(FadeOut(A_T), FadeOut(change1), FadeOut(change2), FadeOut(change3), FadeOut(A), FadeOut(equal))
+
+ ac_defn1.move_to(3*UP)
+ RS_A.move_to(1.5*UP)
+ RS_A[6].move_to(UP)
+ RS_A[7].move_to(UP+1.5*RIGHT)
+
+ self.play(Write(RS_A),FadeIn(ac_defn1))
+
+ CS_AT = TextMobject(r"Row Space of $A = x_{1}$",
+ r"$\left( \begin{array}{c} 1 \\ 2 \\ 1 \end{array} \right)$",
+ r"$+x_{2}$",
+ r"$ \left( \begin{array}{c} 1 \\ 3 \\ 1 \end{array} \right)$",
+ r"$ + x_{3}$",
+ r"$\left( \begin{array}{c} 2 \\ 1 \\ 4 \end{array} \right)$",
+ r"$+x_{4}$",
+ r"$ \left( \begin{array}{c} 3 \\ 2 \\ 3 \end{array} \right)$")
+ CS_AT.move_to(1.5*DOWN)
+ CS_AT[1].set_color(color = DARK_BLUE)
+ CS_AT[3].set_color(color = DARK_BLUE)
+ CS_AT[5].set_color(color = DARK_BLUE)
+ CS_AT[7].set_color(color = DARK_BLUE)
+ CS_AT.scale(0.75)
+
+ ac_defn2 = TextMobject("According to Definition 2 : ")
+ equivalent = TextMobject(r"Hence, Definition 1 $\equiv$ Definition 2")
+ equivalent.move_to(3*DOWN)
+
+ self.play(Write(CS_AT),FadeIn(ac_defn2))
+ self.play(Write(equivalent))
+
+ self.wait()
--
cgit
From 989ed38029bb9a7fb8e6d0124d544bd51555fb16 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Wed, 3 Jun 2020 21:35:07 +0530
Subject: new animation
---
.../line-integrals/README.md | 7 +-
.../file3_vector_line_int_as_sum.gif | Bin 0 -> 1670998 bytes
.../line-integrals/file3_vector_line_int_as_sum.py | 326 +++++++++++++++++++++
3 files changed, 331 insertions(+), 2 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.py
(limited to 'FSF-2020')
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 b7e1846..bd7e520 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
@@ -4,8 +4,11 @@
**
![]()
-**
-![]()
+
+**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)
+
+
**
![]()
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/file3_vector_line_int_as_sum.gif
new file mode 100644
index 0000000..46b35bc
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.py
new file mode 100644
index 0000000..78294cc
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file3_vector_line_int_as_sum.py
@@ -0,0 +1,326 @@
+from manimlib.imports import *
+
+
+class LineIntegrationAsSum(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 10,
+ "y_min" : 0,
+ "y_max" : 6,
+ "graph_origin": ORIGIN+5*LEFT+3*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 6 ,
+ "x_tick_frequency": 2,
+ "y_tick_frequency": 2,
+ "Func":lambda x : 1+x**1.3*np.exp(-.12*(x-2)**2)*np.sin(x/4),
+ "a": 1 ,"b": 9, "n": 15,
+ }
+
+ 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)
+
+
+ curve=self.get_graph(
+ self.Func,
+ x_min=self.a,
+ x_max=self.b,
+ )
+ curve.set_color([BLACK,BLUE,BLUE,BLUE,BLACK])
+ curve_label= self.get_graph_label(
+ curve,
+ label="\\text{path of intgration}",
+ x_val=4,
+ direction=UR,
+ buff=.6,
+ color=BLUE
+ )
+ self.curve=curve
+ self.curve_label=curve_label
+
+ self.get_vector_field()
+
+
+ self.play(ShowCreation(VGroup(curve,curve_label)))
+ self.wait(.6)
+ self.break_in_arcs()
+ self.show_the_sum()
+
+ self.wait(2)
+
+
+ def get_vector_field(self):
+ func = lambda v: np.array([
+ v[0], # x
+ -v[1], # y
+ 0 # z
+ ])
+ vector_field= VectorField(
+ func,
+ delta_x=1,
+ delta_y=1,
+ colors=[GREEN_A,GREEN_C],
+ length_func= lambda norm: .8*sigmoid(norm),
+ vector_config={
+ "stroke_width": 2
+ }
+ )
+
+ self.vector_field= vector_field
+
+
+ def break_in_arcs(self):
+
+ self.write_about_breaking()
+
+ dl=0.8
+ self.get_breakers(dl)
+ self.wait(2)
+ self.play(FadeOut(self.upto_break_text))
+ self.dl=dl
+
+ def write_about_breaking(self):
+ breaking_text=TextMobject("\\texttt{..broken}"," into small", "subarcs")
+ breaking_text.set_color_by_tex_to_color_map({
+ "broken":RED,"subarcs": BLUE
+ })
+ breaking_text.next_to(self.curve_label,DOWN)
+ breaking_text.align_to(self.curve_label,LEFT)
+ self.play(
+ Write(breaking_text)
+ )
+
+ self.upto_break_text=VGroup(
+ self.curve_label,
+ breaking_text,
+ )
+
+ def get_breakers(self,dl):
+ point=self.a
+ points=[]
+ while point<(self.b-dl) :
+ start=point
+ end=point+dl
+ points += [end]
+ breaker=Line(
+ self.input_to_graph_point(start,self.curve),
+ self.input_to_graph_point(end,self.curve),
+ stroke_width=2,
+ color=RED,
+ )
+ breaker.rotate(PI/2).scale(.5)
+
+ point=end
+ self.play(FadeIn(breaker),run_time=.2)
+ # self.add(breaker)
+
+ del points[-1]
+ self.points=points
+
+
+ def show_the_sum(self):
+ at_any_points_text=TextMobject("At any ","point", "in each ", "subarc")
+ at_any_points_text.set_color_by_tex_to_color_map({
+ "point":YELLOW , "subarc": BLUE
+ })
+ at_any_points_text.to_edge(TOP,buff=SMALL_BUFF)
+
+ evaluate_text=TextMobject("$\\vec F(x,y)$ ", "is evaluated").next_to(at_any_points_text,DOWN)
+ evaluate_text.set_color_by_tex("$\\vec F(x,y)$",ORANGE)
+
+ multiply_text=TextMobject("...is multiplied with ","$\\Delta s_i$")
+ multiply_text.set_color_by_tex("\\Delta s_i", BLUE)
+ multiply_text.next_to(at_any_points_text,DOWN)
+
+
+
+ self.at_any_points_text=at_any_points_text
+ self.evaluate_text=evaluate_text
+ self.multiply_text=multiply_text
+
+ dots=[]
+ for point in self.points:
+
+ dot=Dot(
+ point=self.input_to_graph_point(point,self.curve),
+ radius= .7*DEFAULT_DOT_RADIUS,
+ stroke_width= 0,
+ fill_opacity= 1.0,
+ color= YELLOW,
+ )
+ dots+=[dot]
+
+ self.play(
+ Write(at_any_points_text),
+ FadeIn(VGroup(*dots)),run_time=1.5
+ )
+ self.dots=dots
+
+ self.wait()
+ self.show_the_dot_product()
+ self.multiply_with_ds()
+ self.construct_equation()
+
+
+ def show_the_dot_product(self):
+ index=-(len(self.points)//3)
+ self.index=index
+
+ dot=self.dots[index]
+
+
+ dot_prod_text=TextMobject("Dot Product of", "$\\vec F(x_i,y_i)$", "and","$\\vec T(x_i,y_i)$")
+ dot_prod_text.set_color_by_tex_to_color_map({
+ "\\vec F(x_i,y_i)":ORANGE ,
+ "\\vec T(x_i,y_i)": "#DC75CD" ,
+ })
+ dot_prod_text.to_edge(TOP,buff=SMALL_BUFF)
+
+
+ point_coord=TextMobject("$(x_i,y_i)$",color=YELLOW)
+ point_coord.next_to(dot,DL,buff=.01).scale(.8)
+
+ func_val=TextMobject("$\\vec F(x_i,y_i)$",color=ORANGE)
+ func_val.next_to(dot,UR).scale(.8)
+
+ self.dot_prod_text=dot_prod_text
+ self.func_val=func_val
+
+ dot.set_color(ORANGE).scale(1.2)
+
+
+ self.play(FadeIn(VGroup(point_coord,dot)))
+ self.play(Write(self.evaluate_text))
+ self.wait(1)
+ self.play(FadeOut(self.vector_field))
+ self.get_vector_and_tangent()
+ self.dot_product()
+
+
+ self.wait(2)
+ self.remove(point_coord)
+
+
+ def get_vector_and_tangent(self):
+ dot=self.dots[self.index]
+ self.show_specific_vectors(dot)
+ self.play(Write(self.func_val))
+ self.wait(1)
+ self.show_tangent(dot)
+ self.play(FadeIn(VGroup(*[
+ dot.set_color(ORANGE).scale(1.4)
+ for dot in self.dots ]
+ )))
+
+
+ def show_specific_vectors(self,dots):
+ for dot in dots:
+ vector=self.vector_field.get_vector(dot.get_center())
+ vector.set_color(ORANGE)
+
+ self.play(Write(vector),run_time=.2)
+
+
+ def show_tangent(self,dot):
+ tangent_sym=TextMobject("$\\vec T(x_i,y_i)$",color="#DC75CD").scale(.8)
+ x=dot.get_center()
+ angle=self.angle_of_tangent(
+ self.point_to_coords(x)[0],
+ self.curve,
+ dx=0.01
+ )
+ vect = Vector().rotate(angle,about_point=x)
+ vect.set_color("#DC75CD")
+ tangent=vect.next_to(x,DR,buff=0)
+ tangent_sym.next_to(tangent,DOWN,buff=.1)
+ self.play(Write(VGroup(tangent,tangent_sym)))
+
+ self.tangent_sym=tangent_sym
+
+ def dot_product(self):
+
+ dot_sym=Dot().next_to(self.func_val,RIGHT)
+
+ self.play(FadeOut(VGroup(
+ self.at_any_points_text,
+ self.evaluate_text
+ )))
+ self.play(Write(self.dot_prod_text))
+ self.play(
+ FadeIn(dot_sym),
+ ApplyMethod(
+ self.tangent_sym.next_to,
+ dot_sym, RIGHT
+ ))
+
+ self.dot_sym=dot_sym
+
+ def multiply_with_ds(self):
+ self.get_ds()
+
+ self.play(GrowFromCenter(self.ds_brace_group))
+ self.wait(2)
+ self.play(Write(self.multiply_text))
+ self.play(ApplyMethod(
+ self.ds_brace_label.next_to,
+ self.tangent_sym, RIGHT,buff=.15
+ ))
+
+
+
+ def get_ds(self):
+ p1= self.dots[self.index]
+ p2= self.dots[self.index+1]
+ ds_brace=Brace(VGroup(p1,p2),DL)
+ ds_brace.move_to(p1,UR)
+ ds_brace_label=ds_brace.get_text("$\Delta s_i$", buff = .05)
+ ds_brace_label.set_color(BLUE)
+ self.ds_brace=ds_brace
+ self.ds_brace_label=ds_brace_label
+ self.ds_brace_group=VGroup(ds_brace,ds_brace_label)
+
+
+ def construct_equation(self):
+ sum_up_text=TextMobject("and"," summed ", "for all i' s")
+ sum_up_text.set_color_by_tex("summed",PURPLE_A)
+ sum_up_text.next_to(self.multiply_text,DOWN,buff=MED_SMALL_BUFF)
+ sum_up_text.shift(LEFT)
+
+ sum_eqn=TextMobject("$$\\sum_i^{ } $$").set_color(PURPLE_A)
+ sum_eqn.move_to(self.graph_origin+6.5*self.X+4*self.Y)
+
+ line_integral_text=TextMobject("The Value of the"," line ","integral is").to_edge(TOP,buff=MED_SMALL_BUFF)
+ line_integral_text.set_color_by_tex("line",BLUE_C)
+ approx=TextMobject("$\\approx$",color=RED).next_to(sum_eqn,LEFT)
+ multipled=VGroup(
+ self.func_val,
+ self.dot_sym,
+ self.tangent_sym,
+ self.ds_brace_label
+ )
+
+
+ self.play(Write(sum_up_text))
+ self.show_specific_vectors(self.dots)
+ self.play(FadeIn(sum_eqn))
+ self.play(ApplyMethod(
+ multipled.next_to,sum_eqn,RIGHT
+ ))
+ self.wait()
+ self.play(FadeOut(VGroup(
+ self.dot_prod_text,
+ self.multiply_text,
+ sum_up_text
+ )))
+ self.play(Write(line_integral_text))
+ self.play(FadeIn(approx))
+
+
+
+#uploaded by Somnath Pandit.FSF2020_Line Integrals
+
+
+
--
cgit
From 9807fbcd45a04d79afcfef0f8f79d49a8626efaa Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 4 Jun 2020 03:42:07 +0530
Subject: New animation
---
.../line-integrals/README.md | 4 +-
.../line-integrals/file2_scalar_line_integral.gif | Bin 0 -> 4833220 bytes
.../line-integrals/file2_scalar_line_integral.py | 422 +++++++++++++++++++++
3 files changed, 424 insertions(+), 2 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py
(limited to 'FSF-2020')
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 bd7e520..871eeaa 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,8 +1,8 @@
**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)
-**
-![]()
+**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)
**file3_vector_line_int_as_sum**
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
new file mode 100644
index 0000000..dc4477d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif 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
new file mode 100644
index 0000000..310cac0
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.py
@@ -0,0 +1,422 @@
+from manimlib.imports import *
+
+class LineIntegrationProcess(SpecialThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": -4,
+ "x_max": 4,
+ "y_min": 0,
+ "y_max": 4,
+ "z_min": 0,
+ "z_max": 4,
+ "a":-3 ,"b": 3, "c":0 , "d":3.5,
+ "axes_shift":3*IN,
+ "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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.2,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.75,
+ },
+ "Func": lambda x,y: 1+x**2*y/15
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+
+ self.set_camera_orientation(distance=35,
+ phi=65 * DEGREES,
+ theta=-65 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=2+x^2y$").set_color(BLUE)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+
+ #get the surface
+ surface= self.get_surface(
+ lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.5,
+ fill_color=BLUE_D,
+ stroke_width=0.5,
+ stroke_color=WHITE,
+ )
+
+
+ # self.play(Write(surface))
+ self.add(surface)
+ self.get_line_of_int(fn_text)
+ self.begin_ambient_camera_rotation(rate=-0.02)
+ self.get_field_values_on_line()
+ self.wait(1.5)
+ self.area=self.get_area()
+ area_text=TextMobject("Line"," Integral in the",r" scalar field\\"," means this" ,"area")
+ area_text.set_color_by_tex_to_color_map({
+ "Line": PINK, "scalar":BLUE, "area":TEAL_A
+ })
+ area_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ self.remove(self.values_on_line_text)
+ self.add_fixed_in_frame_mobjects(area_text)
+ self.play(Write(area_text))
+ self.play(Write(self.area),run_time=2)
+ self.play(FadeOut(surface))
+ self.wait()
+
+ self.stop_ambient_camera_rotation()
+ # self.get_lines()
+
+ self.remove(axes,surface)
+ self.trasform_to_graphs()
+ self.wait(2)
+
+
+
+
+ def get_line_of_int(self,fn_text):
+ self.remove(fn_text)
+
+ line_of_int_text=TextMobject(r"Line of integration is\\","$\\vec r(t)=\cos(t)\hat x+\sin(t)\hat y$")
+ line_of_int_text[1].set_color(PINK)
+ line_of_int_text.to_edge(TOP,buff=SMALL_BUFF)
+
+
+ line_of_int=(self.get_curve(
+ self.Func,on_surface=False
+ ))
+ line_of_int.set_style(
+ stroke_width=5,
+ stroke_color=PINK,
+ )
+
+ self.add_fixed_in_frame_mobjects(line_of_int_text)
+ self.play(Write(line_of_int_text))
+ self.wait()
+ self.play(ShowCreation(line_of_int),run_time=3)
+ # self.add(line_of_int)
+
+ self.line_of_int=line_of_int
+ self.line_of_int_text=line_of_int_text
+
+ def get_field_values_on_line(self):
+ self.remove(self.line_of_int_text)
+
+ values_on_line_text=TextMobject("Values"," of"," function","on the ","line")
+ values_on_line_text.set_color_by_tex_to_color_map({
+ "Values":YELLOW, "function":BLUE,"line":PINK
+ })
+ values_on_line_text.to_edge(TOP,buff=SMALL_BUFF)
+
+ values_on_surface=(self.get_curve(
+ self.Func,on_surface=True
+ ))
+ values_on_surface.set_style(
+ stroke_width=5,
+ stroke_color=YELLOW,
+ )
+
+ self.add_fixed_in_frame_mobjects(values_on_line_text)
+ self.play(Write(values_on_line_text))
+ # self.wait()
+ self.play(ShowCreation(values_on_surface),run_time=3)
+ # self.add(values_on_surface)
+
+ self.values_on_surface=values_on_surface
+ self.values_on_line_text=values_on_line_text
+
+
+ def trasform_to_graphs(self):
+ on_surface_graph=(self.get_graph(
+ self.Func,on_surface=True
+ ))
+ on_surface_graph.set_style(
+ stroke_width=5,
+ stroke_color=YELLOW,
+ )
+
+ line_graph=(self.get_graph(
+ self.Func,on_surface=False
+ ))
+ line_graph.set_style(
+ stroke_width=5,
+ stroke_color=PINK,
+ )
+
+ self.on_surface_graph=on_surface_graph
+ self.line_graph=line_graph
+ graph_area=self.get_area(graph=True)
+
+ into_graph=[
+ ReplacementTransform(
+ self.values_on_surface,
+ on_surface_graph
+ ),
+ ReplacementTransform(
+ self.line_of_int,
+ line_graph
+ ),
+ ReplacementTransform(
+ self.area,
+ graph_area
+ ),
+ ]
+
+ self.move_camera(
+ # distance=20,
+ phi=90 * DEGREES,
+ theta=-90 * DEGREES,
+ added_anims=into_graph,
+ run_time=2
+ )
+
+ def get_area(self,graph=False):
+ axes=self.axes
+ if graph:
+ on_surface=self.on_surface_graph
+ on_base=self.line_graph
+ else:
+ on_surface=self.values_on_surface
+ on_base=self.line_of_int
+ area =Polygon(
+ *[
+ on_surface.get_point_from_function(t)
+ for t in np.arange(0,PI,0.01)
+ ],
+ *[
+ on_base.get_point_from_function(t)
+ for t in np.arange(PI,0,-0.01)
+ ],
+ stroke_width=0,
+ fill_color=TEAL_A,
+ fill_opacity=.6,
+ )
+
+ return area
+
+ def get_curve(self,func,on_surface=False ,**kwargs):
+ config = dict()
+ config.update(self.default_graph_style)
+ config.update({
+ "t_min": 0,
+ "t_max": PI,
+ })
+ config.update(kwargs)
+ r=abs(self.axes.a)
+ curve=ParametricFunction(
+ lambda t: self.axes.c2p(
+ r*np.cos(t),
+ r*np.sin(t),
+ func(r*np.cos(t), r*np.sin(t))*bool(on_surface)
+ ),
+ **config,
+ )
+ return curve
+
+
+ def get_surface(self, func, **kwargs):
+ axes=self.axes
+ config = {
+ "u_min": axes.a-.2,
+ "u_max": axes.b+.2,
+ "v_min": axes.c-.1,
+ "v_max": axes.d,
+ "resolution": (
+ 2*(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_graph(self,func,on_surface=False ,**kwargs):
+ config = dict()
+ config.update(self.default_graph_style)
+ config.update({
+ "t_min": 0,
+ "t_max": PI,
+ })
+ config.update(kwargs)
+ slice_curve=ParametricFunction(
+ lambda t: self.axes.c2p(
+ 4*np.cos(t),
+ 0,
+ 2+func(3*np.cos(t), 3*np.sin(t))*bool(on_surface)
+ ),
+ **config,
+ )
+ return slice_curve
+
+ def get_lines(self):
+ pass
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"PINK"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ # self.play(ShowCreation(lines))
+ self.add(lines)
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ 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)
+ 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),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ lambda x, t: 0
+ )
+ '''input_plane.set_style(
+ fill_opacity=0.3,
+ fill_color=PINK,
+ stroke_width=.2,
+ stroke_color=WHITE,
+ )'''
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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_Line_Integrals
--
cgit
From eaa80a0103a8f84a455c331e3a3684f5ce4382dd Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 4 Jun 2020 10:50:38 +0530
Subject: updated
---
.../line-integrals/file2_scalar_line_integral.gif | Bin 4833220 -> 5612895 bytes
.../line-integrals/file2_scalar_line_integral.py | 19 ++++++++-----------
2 files changed, 8 insertions(+), 11 deletions(-)
(limited to 'FSF-2020')
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
index dc4477d..71c97d6 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file2_scalar_line_integral.gif 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 310cac0..eb5f4ab 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
@@ -52,9 +52,7 @@ class LineIntegrationProcess(SpecialThreeDScene):
)
fn_text=TextMobject("$z=2+x^2y$").set_color(BLUE)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
+ fn_text.to_corner(UR,buff=.8).shift(DOWN)
#get the surface
surface= self.get_surface(
@@ -69,10 +67,11 @@ class LineIntegrationProcess(SpecialThreeDScene):
)
- # self.play(Write(surface))
- self.add(surface)
- self.get_line_of_int(fn_text)
- self.begin_ambient_camera_rotation(rate=-0.02)
+ # self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(fn_text)
+ self.play(Write(surface),Write(fn_text))
+ self.get_line_of_int()
+ self.begin_ambient_camera_rotation(rate=-0.035)
self.get_field_values_on_line()
self.wait(1.5)
self.area=self.get_area()
@@ -86,7 +85,7 @@ class LineIntegrationProcess(SpecialThreeDScene):
self.add_fixed_in_frame_mobjects(area_text)
self.play(Write(area_text))
self.play(Write(self.area),run_time=2)
- self.play(FadeOut(surface))
+ self.play(FadeOut(VGroup(surface,fn_text)))
self.wait()
self.stop_ambient_camera_rotation()
@@ -99,9 +98,7 @@ class LineIntegrationProcess(SpecialThreeDScene):
- def get_line_of_int(self,fn_text):
- self.remove(fn_text)
-
+ def get_line_of_int(self):
line_of_int_text=TextMobject(r"Line of integration is\\","$\\vec r(t)=\cos(t)\hat x+\sin(t)\hat y$")
line_of_int_text[1].set_color(PINK)
line_of_int_text.to_edge(TOP,buff=SMALL_BUFF)
--
cgit
From 1f5c1963da6ff76b58910063d31138f104759a1c Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 4 Jun 2020 17:35:27 +0530
Subject: new animation
---
.../line-integrals/README.md | 4 +-
.../line-integrals/file2_scalar_line_integral.py | 2 +
.../line-integrals/file4_helix.gif | Bin 0 -> 1237895 bytes
.../line-integrals/file4_helix.py | 245 +++++++++++++++++++++
4 files changed, 249 insertions(+), 2 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.py
(limited to 'FSF-2020')
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 871eeaa..17077b6 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
@@ -10,5 +10,5 @@
-**
-![]()
+**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)
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 eb5f4ab..996ead1 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
@@ -417,3 +417,5 @@ 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_helix.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif
new file mode 100644
index 0000000..ceedb1f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.gif differ
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/file4_helix.py
new file mode 100644
index 0000000..50aeb33
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/line-integrals/file4_helix.py
@@ -0,0 +1,245 @@
+from manimlib.imports import *
+
+class ParametricCurve(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 3,
+ "y_min": 0,
+ "y_max": 3,
+ "z_min": 0,
+ "z_max": 4,
+ "a":0 ,"b": 2, "c":0 , "d":2,
+ "axes_shift":2*IN+1.4*RIGHT+1.4*DOWN,
+ "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,
+ },
+ },
+
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+
+ self.set_camera_orientation(
+ distance=25,
+ phi=60 * DEGREES,
+ theta=40 * DEGREES,
+ )
+
+ label=TextMobject("Helix",color=PURPLE).scale(1.6)
+ label.to_corner(UR,buff=2)
+ self.add_fixed_in_frame_mobjects(label)
+
+ helix=self.get_helix(
+ radius=1.5,
+ t_min= 0,
+ t_max= 4*PI,
+ color=PURPLE
+ )
+ parameter_label=TextMobject(
+ "Parametric equation: ",
+ color=TEAL
+ ).next_to(label,DOWN,buff=.3
+ )
+ parametric_eqn=TextMobject(
+ "$x=\cos$ (","t",
+ r")\\$y=\sin $(","t",
+ r")\\$z$=","t"
+ ).next_to(parameter_label,DOWN,buff=.1)
+ parametric_eqn.set_color_by_tex("t",RED)
+ self.parametric_eqn=parametric_eqn
+
+ parametriztion=VGroup(
+ parameter_label,
+ parametric_eqn
+ )
+
+
+ self.play(ShowCreation(helix),run_time=2)
+ self.begin_ambient_camera_rotation(.1)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(parametriztion)
+ self.play(Write(parametriztion))
+ self.wait(1)
+ self.stop_ambient_camera_rotation()
+ self.move_camera(
+ distance=20,
+ phi=85 * DEGREES,
+ # theta=-90 * DEGREES,
+ run_time=3
+ )
+ scale_axes=VGroup(self.axes,helix).scale(1.2)
+ self.show_the_parameter()
+ self.wait(2)
+
+
+
+ def get_helix(self,radius=1, **kwargs):
+ config = {
+ "t_min": 0,
+ "t_max": 2*PI,
+ }
+ config.update(kwargs)
+ helix= ParametricFunction(
+ lambda t : self.axes.c2p(
+ radius*np.cos(t),
+ radius*np.sin(t),
+ t/4
+ ),
+ **config
+ )
+
+ self.helix=helix
+ return helix
+
+ def show_the_parameter(self):
+ t_tracker = ValueTracker(0)
+ t=t_tracker.get_value
+
+ t_label = TexMobject(
+ "t = ",color=RED
+ ).next_to(self.parametric_eqn,DL,buff=.85)
+
+ t_text = always_redraw(
+ lambda: DecimalNumber(
+ t(),
+ color=GOLD,
+ ).next_to(t_label, RIGHT, MED_SMALL_BUFF)
+ )
+ t_text.suspend_updating()
+
+ dot = Sphere(
+ radius= 1.5*DEFAULT_DOT_RADIUS,
+ stroke_width= 1,
+ fill_opacity= 1.0,
+ )
+ dot.set_color(GOLD)
+ dot.add_updater(lambda v: v.move_to(
+ self.helix.get_point_from_function(PI*t())
+ ))
+
+ pi = TexMobject(
+ "\\pi ",
+ color=GOLD,
+ ).next_to(t_text,RIGHT,buff=-.3)
+
+ group = VGroup(t_text,t_label,pi).scale(1.5)
+
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(group)
+ t_text.resume_updating()
+ self.play(FadeIn(group))
+ self.add(dot)
+ self.play(
+ t_tracker.set_value,2,
+ rate_func=linear,
+ run_time=5
+ )
+
+
+#--------------------------------------------------------
+
+ #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=1.5)
+
+ 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),
+ ]
+ 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, LEFT)
+ 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_Line_integrals
+
+
+
+
+
--
cgit
From 16dd9a4ceb110a5f8b900ed83c4a27d99464940c Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Mon, 8 Jun 2020 17:26:02 +0530
Subject: new animation
---
.../fundamental-theorem-of-line-integral/README.md | 5 +
.../file1_grad_of_scalar_function.gif | Bin 0 -> 4012467 bytes
.../grad_of_scalar_function.py | 304 +++++++++++++++++++++
3 files changed, 309 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..6fcbe68
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/README.md
@@ -0,0 +1,5 @@
+**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)
+
+**
+![](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/ .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
new file mode 100644
index 0000000..5a6e102
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
new file mode 100644
index 0000000..3a2c3f7
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
@@ -0,0 +1,304 @@
+from manimlib.imports import *
+
+class GradOfScalar(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,
+ "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": 1,
+ "delta_y": 1,
+ "x_min": -3,
+ "x_max": 3,
+ "y_min": -3,
+ "y_max": 3,
+ "min_magnitude": 0,
+ "max_magnitude": 2,
+ "colors": [TEAL,GREEN,GREEN,GREEN,YELLOW,RED],
+ "length_func": lambda norm : norm*np.exp(-.38*norm)/2,
+ "opacity": 1.0,
+ "vector_config": {
+ "stroke_width":8
+ },
+ },
+ "default_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [BLUE_E],
+ "stroke_width": .5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.75,
+ },
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+
+ self.set_camera_orientation(distance=35,
+ phi=70 * DEGREES,
+ theta=-135 * DEGREES,
+ )
+
+ scalar_fn_text=TexMobject("f(x,y,z)=","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("\\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)
+
+
+ #always generate the scalar field first
+ s_field1=self.get_scalar_field(
+ func= lambda u ,v : u*v/7
+ )
+ v_field1=self.get_vector_field(
+ lambda v: np.array([
+ v[1],
+ v[0],
+ 0,
+ ]),
+ on_surface=True,
+ )
+
+ self.add_fixed_in_frame_mobjects(scalar_fn_text)
+
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.play(Write(s_field1))
+ self.wait(1)
+ 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(2)
+
+ self.play(FadeOut(grad_text))
+ self.add_fixed_in_frame_mobjects(vector_field_text)
+ show_vec_field=[
+ 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,
+ run_time=4.5
+ )
+
+ self.wait(2)
+ self.stop_ambient_camera_rotation()
+
+ fadeout= [FadeOut(s_field1)]
+ 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,**kwargs):
+ surface= self.get_surface(
+ lambda x , y:
+ func(x,y),
+ )
+
+ self.surface_points=self.get_points(func)
+ return surface
+
+ def get_points(self,func):
+ axes=self.axes
+ dn=.5
+ 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)
+ self.vector_field=vector_field
+
+ if on_surface:
+ vector_field1=self.get_vectors_on_surface()
+
+ return vector_field1
+
+
+
+ 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)
+ 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": (
+ 2*(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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_Line_Integrals
--
cgit
From 4699b0b1a773db4376711c7d67e3d82a90d03f28 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 9 Jun 2020 12:50:17 +0530
Subject: update
---
.../fundamental-theorem-of-line-integral/README.md | 4 +-
.../file1_grad_of_scalar_function.py | 308 +++++++++++++++++++++
2 files changed, 310 insertions(+), 2 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
(limited to 'FSF-2020')
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 6fcbe68..edd176f 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,5 +1,5 @@
**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)
-**
-![](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/ .gif)
+**file2_line_int_example**
+![file2_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/file2_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.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
new file mode 100644
index 0000000..c9f479c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file1_grad_of_scalar_function.py
@@ -0,0 +1,308 @@
+from manimlib.imports import *
+
+class GradOfScalar(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,
+ "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": 1,
+ "delta_y": 1,
+ "x_min": -3,
+ "x_max": 3,
+ "y_min": -3,
+ "y_max": 3,
+ "min_magnitude": 0,
+ "max_magnitude": 2,
+ "colors": [TEAL,GREEN,GREEN,GREEN,YELLOW,RED],
+ "length_func": lambda norm : norm*np.exp(-.38*norm)/2,
+ "opacity": 1.0,
+ "vector_config": {
+ "stroke_width":8
+ },
+ },
+ "default_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [BLUE_E],
+ "stroke_width": .5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.75,
+ },
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ axes=self.axes
+
+ self.set_camera_orientation(distance=35,
+ phi=70 * DEGREES,
+ theta=-135 * DEGREES,
+ )
+
+ scalar_fn_text=TexMobject("f(x,y,z)=","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("\\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)
+
+
+ #always generate the scalar field first
+ s_field1=self.get_scalar_field(
+ func= lambda u ,v : u*v/7
+ )
+ v_field1=self.get_vector_field(
+ lambda v: np.array([
+ v[1],
+ v[0],
+ 0,
+ ]),
+ on_surface=True,
+ )
+
+ self.add_fixed_in_frame_mobjects(scalar_fn_text)
+
+ self.begin_ambient_camera_rotation(rate=.2)
+ self.play(Write(s_field1))
+ self.wait(1)
+ 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(2)
+
+ self.play(FadeOut(grad_text))
+ self.add_fixed_in_frame_mobjects(vector_field_text)
+ show_vec_field=[
+ 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,
+ run_time=4.5
+ )
+
+ self.wait(2)
+ self.stop_ambient_camera_rotation()
+
+ fadeout= [FadeOut(s_field1)]
+ 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,**kwargs):
+ surface= self.get_surface(
+ lambda x , y:
+ func(x,y),
+ )
+
+ self.surface_points=self.get_points(func)
+ return surface
+
+ def get_points(self,func):
+ axes=self.axes
+ dn=.5
+ 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)
+ self.vector_field=vector_field
+
+ if on_surface:
+ vector_field=self.get_vectors_on_surface()
+
+ return vector_field
+
+
+
+ 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)
+ 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": (
+ 2*(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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_Fundamental_Theorem_of_Line_Integrals
+
+
+
+
--
cgit
From 9928ee6cdbc0d12c3ebef22bdd509c199e5b7949 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 9 Jun 2020 12:53:32 +0530
Subject: new file
---
.../file2_line_int_example.gif | Bin 0 -> 1385308 bytes
.../file2_line_int_example.py | 159 +++++++++++
.../grad_of_scalar_function.py | 304 ---------------------
3 files changed, 159 insertions(+), 304 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif
new file mode 100644
index 0000000..20ed081
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
new file mode 100644
index 0000000..6dabe49
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
@@ -0,0 +1,159 @@
+from manimlib.imports import *
+
+
+class LineIntegration(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 2,
+ "y_min" : -1,
+ "y_max" : 2,
+ "graph_origin": ORIGIN+3*LEFT+1.5*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 10 ,
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "min_magnitude": 0,
+ "max_magnitude": .5,
+ "colors": [GREEN,BLUE,BLUE,TEAL],
+ "length_func": lambda norm : .4*sigmoid(norm),
+ "opacity": .75,
+ "vector_config": {
+ "stroke_width":2
+ },
+ },
+
+ "a": .45,"b": 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)
+
+
+
+
+ vector_field=self.get_vector_field(
+ lambda v: np.array([
+ v[1]-self.graph_origin[1],
+ v[0]-self.graph_origin[0],
+ 0,
+ ])
+ )
+ vector_field_text=TexMobject(
+ "\\vec F=y\hat i+x\hat j",
+ stroke_width=2
+ ).to_corner(UR,buff=.75).scale(1.2)
+
+ vector_field_text[0][0:3].set_color(TEAL),
+ self.add(vector_field,)
+ self.play(Write(vector_field_text))
+ self.wait()
+ self.get_endpoints_of_curve()
+ self.wait(.6)
+ self.play(
+ vector_field_text.shift,5*LEFT,
+
+ )
+ vector_field.set_fill(opacity=.2)
+ self.show_line_integral()
+ 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_points(self):
+ dn=.1
+ x_vals=np.arange(self.a,self.b,dn)
+ y_vals=np.arange(self.a,self.b,dn)
+ points=[]
+ for x_val in x_vals:
+ for y_val in y_vals:
+ points+=[self.coords_to_point(x_val,y_val)]
+ return points
+
+ def get_endpoints_of_curve(self):
+ dots=[[1,1],[0,0]]
+ dot_labels= ["(1,1)","(0,0)"]
+ for dot,label in zip(dots,dot_labels):
+ dot=Dot(self.coords_to_point(*dot)).set_color(RED)
+ dot_label=TexMobject(label)
+ dot_label.next_to(dot,DR)
+ self.add(dot,dot_label)
+ self.end_points=dots
+
+ def show_line_integral(self):
+ int_text=TexMobject(
+ "\\int_\\text{\\textbf{path}}\\vec F \\cdot d\\vec r= 1",
+ color=BLUE,
+ stroke_width=1.5
+ ).scale(1.2)
+ int_text[0][0].set_color(RED_C)
+ int_text[0][5:7].set_color(TEAL)
+ int_text.to_edge(RIGHT+UP,buff=1)
+
+ close_int=TexMobject("O").set_color(RED).scale(1.3)
+ close_int.move_to(int_text[0][0],OUT)
+ close_int_val=TexMobject("0",color=BLUE).scale(1.4)
+ close_int_val.move_to(int_text[0][-1],OUT)
+
+ self.play(Write(int_text))
+
+
+ self.show_method([[0,1]])
+ self.play(Indicate(int_text))
+ self.wait()
+
+ self.show_method([[1,0]])
+ self.play(Indicate(int_text))
+ self.wait()
+ self.remove(int_text[0][-1])
+ self.add(close_int)
+
+ for i in range(2):
+ self.play(self.paths[i].rotate,PI)
+ self.play(Indicate(close_int))
+ self.play(Write(close_int_val))
+ self.wait()
+
+
+ def show_method(self,points):
+ points=points+self.end_points
+ paths=[]
+ for i in range(-1,len(points)-2):
+ path=Arrow(
+ self.coords_to_point(*points[i]),
+ self.coords_to_point(*points[i+1]),
+ buff=0
+ ).set_color(BLUE)
+ paths+=VGroup(path)
+ self.play(GrowArrow(path),run_time=1.5)
+
+ self.paths=paths
+
+
+
+
+
+#uploaded by Somnath Pandit. FSF2020_Fundamental_Theorem_of_Line_Integrals
+
+
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
deleted file mode 100644
index 3a2c3f7..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/grad_of_scalar_function.py
+++ /dev/null
@@ -1,304 +0,0 @@
-from manimlib.imports import *
-
-class GradOfScalar(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,
- "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": 1,
- "delta_y": 1,
- "x_min": -3,
- "x_max": 3,
- "y_min": -3,
- "y_max": 3,
- "min_magnitude": 0,
- "max_magnitude": 2,
- "colors": [TEAL,GREEN,GREEN,GREEN,YELLOW,RED],
- "length_func": lambda norm : norm*np.exp(-.38*norm)/2,
- "opacity": 1.0,
- "vector_config": {
- "stroke_width":8
- },
- },
- "default_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [BLUE_E],
- "stroke_width": .5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.75,
- },
- }
-
-
- def construct(self):
-
- self.setup_axes()
- axes=self.axes
-
- self.set_camera_orientation(distance=35,
- phi=70 * DEGREES,
- theta=-135 * DEGREES,
- )
-
- scalar_fn_text=TexMobject("f(x,y,z)=","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("\\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)
-
-
- #always generate the scalar field first
- s_field1=self.get_scalar_field(
- func= lambda u ,v : u*v/7
- )
- v_field1=self.get_vector_field(
- lambda v: np.array([
- v[1],
- v[0],
- 0,
- ]),
- on_surface=True,
- )
-
- self.add_fixed_in_frame_mobjects(scalar_fn_text)
-
- self.begin_ambient_camera_rotation(rate=.2)
- self.play(Write(s_field1))
- self.wait(1)
- 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(2)
-
- self.play(FadeOut(grad_text))
- self.add_fixed_in_frame_mobjects(vector_field_text)
- show_vec_field=[
- 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,
- run_time=4.5
- )
-
- self.wait(2)
- self.stop_ambient_camera_rotation()
-
- fadeout= [FadeOut(s_field1)]
- 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,**kwargs):
- surface= self.get_surface(
- lambda x , y:
- func(x,y),
- )
-
- self.surface_points=self.get_points(func)
- return surface
-
- def get_points(self,func):
- axes=self.axes
- dn=.5
- 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)
- self.vector_field=vector_field
-
- if on_surface:
- vector_field1=self.get_vectors_on_surface()
-
- return vector_field1
-
-
-
- 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)
- 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": (
- 2*(axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (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_Line_Integrals
--
cgit
From 976d88d42dbb1bb80c2ff68f683f011b84d86503 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Tue, 9 Jun 2020 17:12:12 +0530
Subject: new file and rename
---
.../fundamental-theorem-of-line-integral/README.md | 8 +-
.../file2_line_int_example.gif | Bin 1385308 -> 0 bytes
.../file2_line_int_example.py | 159 -------------------
.../file2_line_int_independent_of_path.gif | Bin 0 -> 1403902 bytes
.../file2_line_int_independent_of_path.py | 174 +++++++++++++++++++++
.../file3_line_int_example.gif | Bin 0 -> 1385308 bytes
.../file3_line_int_example.py | 149 ++++++++++++++++++
7 files changed, 329 insertions(+), 161 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.py
(limited to 'FSF-2020')
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 edd176f..aa8c7f8 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,5 +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)
-**file2_line_int_example**
-![file2_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/file2_line_int_example.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)
+
+**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)
+
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif
deleted file mode 100644
index 20ed081..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
deleted file mode 100644
index 6dabe49..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_example.py
+++ /dev/null
@@ -1,159 +0,0 @@
-from manimlib.imports import *
-
-
-class LineIntegration(GraphScene):
- CONFIG = {
- "x_min" : -1,
- "x_max" : 2,
- "y_min" : -1,
- "y_max" : 2,
- "graph_origin": ORIGIN+3*LEFT+1.5*DOWN,
- "x_axis_width": 10,
- "y_axis_height": 10 ,
- "x_tick_frequency": 1,
- "y_tick_frequency": 1,
- "default_vector_field_config": {
- "delta_x": .5,
- "delta_y": .5,
- "min_magnitude": 0,
- "max_magnitude": .5,
- "colors": [GREEN,BLUE,BLUE,TEAL],
- "length_func": lambda norm : .4*sigmoid(norm),
- "opacity": .75,
- "vector_config": {
- "stroke_width":2
- },
- },
-
- "a": .45,"b": 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)
-
-
-
-
- vector_field=self.get_vector_field(
- lambda v: np.array([
- v[1]-self.graph_origin[1],
- v[0]-self.graph_origin[0],
- 0,
- ])
- )
- vector_field_text=TexMobject(
- "\\vec F=y\hat i+x\hat j",
- stroke_width=2
- ).to_corner(UR,buff=.75).scale(1.2)
-
- vector_field_text[0][0:3].set_color(TEAL),
- self.add(vector_field,)
- self.play(Write(vector_field_text))
- self.wait()
- self.get_endpoints_of_curve()
- self.wait(.6)
- self.play(
- vector_field_text.shift,5*LEFT,
-
- )
- vector_field.set_fill(opacity=.2)
- self.show_line_integral()
- 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_points(self):
- dn=.1
- x_vals=np.arange(self.a,self.b,dn)
- y_vals=np.arange(self.a,self.b,dn)
- points=[]
- for x_val in x_vals:
- for y_val in y_vals:
- points+=[self.coords_to_point(x_val,y_val)]
- return points
-
- def get_endpoints_of_curve(self):
- dots=[[1,1],[0,0]]
- dot_labels= ["(1,1)","(0,0)"]
- for dot,label in zip(dots,dot_labels):
- dot=Dot(self.coords_to_point(*dot)).set_color(RED)
- dot_label=TexMobject(label)
- dot_label.next_to(dot,DR)
- self.add(dot,dot_label)
- self.end_points=dots
-
- def show_line_integral(self):
- int_text=TexMobject(
- "\\int_\\text{\\textbf{path}}\\vec F \\cdot d\\vec r= 1",
- color=BLUE,
- stroke_width=1.5
- ).scale(1.2)
- int_text[0][0].set_color(RED_C)
- int_text[0][5:7].set_color(TEAL)
- int_text.to_edge(RIGHT+UP,buff=1)
-
- close_int=TexMobject("O").set_color(RED).scale(1.3)
- close_int.move_to(int_text[0][0],OUT)
- close_int_val=TexMobject("0",color=BLUE).scale(1.4)
- close_int_val.move_to(int_text[0][-1],OUT)
-
- self.play(Write(int_text))
-
-
- self.show_method([[0,1]])
- self.play(Indicate(int_text))
- self.wait()
-
- self.show_method([[1,0]])
- self.play(Indicate(int_text))
- self.wait()
- self.remove(int_text[0][-1])
- self.add(close_int)
-
- for i in range(2):
- self.play(self.paths[i].rotate,PI)
- self.play(Indicate(close_int))
- self.play(Write(close_int_val))
- self.wait()
-
-
- def show_method(self,points):
- points=points+self.end_points
- paths=[]
- for i in range(-1,len(points)-2):
- path=Arrow(
- self.coords_to_point(*points[i]),
- self.coords_to_point(*points[i+1]),
- buff=0
- ).set_color(BLUE)
- paths+=VGroup(path)
- self.play(GrowArrow(path),run_time=1.5)
-
- self.paths=paths
-
-
-
-
-
-#uploaded by Somnath Pandit. FSF2020_Fundamental_Theorem_of_Line_Integrals
-
-
-
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
new file mode 100644
index 0000000..29c6d02
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.gif 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
new file mode 100644
index 0000000..b9597b6
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file2_line_int_independent_of_path.py
@@ -0,0 +1,174 @@
+from manimlib.imports import *
+
+
+class LineIntegration(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "axes_color":BLACK,
+ "graph_origin": ORIGIN+1.2*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 10 ,
+ "x_axis_label": "",
+ "y_axis_label": "",
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_vector_field_config": {
+ "delta_x": .6,
+ "delta_y": .6,
+ "min_magnitude": 0,
+ "max_magnitude": .5,
+ "colors": [GREEN,BLUE,BLUE,TEAL],
+ "length_func": lambda norm : .45*sigmoid(norm),
+ "opacity": .75,
+ "vector_config": {
+ "stroke_width":1.5
+ },
+ },
+
+ "a": .45,"b": 2,
+ "path_color": PURPLE
+ }
+
+ 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_field=self.get_vector_field(
+ lambda v: np.array([
+ v[1]-self.graph_origin[1],
+ v[0]-self.graph_origin[0],
+ 0,
+ ])
+ )
+ vector_field_text=TexMobject(
+ "\\vec F(x,y)","=y\hat i+x\hat j",
+ stroke_width=1.5
+ ).to_edge(TOP,buff=.2)
+
+ vector_field_text[0][0:2].set_color(TEAL)
+
+ grad_f=TexMobject(
+ "\\vec\\nabla f(x,y)",
+ stroke_width=1.5
+ )
+ grad_f[0][2].set_color(LIGHT_BROWN)
+ grad_f.move_to(vector_field_text[0])
+
+ self.add(vector_field,)
+ self.play(Write(vector_field_text))
+ self.wait()
+ self.play(
+ ReplacementTransform(
+ vector_field_text[0],grad_f
+ )
+ )
+ self.get_endpoints_of_curve()
+ self.wait(.6)
+ vector_field.set_fill(opacity=.4)
+ self.show_line_integral()
+ 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_endpoints_of_curve(self):
+ points=[[-3,0],[2,2]]
+ point_labels= ["P_i","P_f"]
+ for point,label in zip(points,point_labels):
+ dot=Dot(self.coords_to_point(*point)).set_color(RED)
+ dot_label=TexMobject(label)
+ dot_label.next_to(dot,DR,buff=.2)
+ self.play(FadeIn(VGroup(dot,dot_label)))
+ self.wait(.2)
+
+ self.end_points=points
+
+ def show_line_integral(self):
+ int_text=TexMobject(
+ r"\int_{P_i}^{P_f}\vec F \cdot d\vec r",
+ stroke_width=1.5,
+ ).scale(1.2)
+ int_text[0][0].set_color(self.path_color)
+ int_text[0][5:7].set_color(TEAL)
+ int_text.to_edge(RIGHT+UP,buff=1)
+
+ int_value= TexMobject(r"=f(P_i)-f(P_f)",
+ stroke_width=1.5
+ ).next_to(int_text,DOWN)
+ VGroup(int_value[0][1],
+ int_value[0][7]
+ ).set_color(LIGHT_BROWN)
+
+ path_indepent_text=TextMobject(
+ r"Value of the Line Integral is\\ independent of Path",color=GOLD,stroke_width=2,).to_corner(DR,buff=1)
+
+ path_indepent_text[0][-4:].set_color(self.path_color)
+
+
+ self.play(Write(VGroup(
+ int_text,int_value
+ )),
+ run_time=2
+ )
+ self.wait(1.5)
+
+
+ self.show_path([[0,1],[-1,2],[1,3]])
+ self.play(Indicate(int_value))
+ self.play(Uncreate(self.path))
+
+ self.show_path([[0,1]])
+ self.play(Indicate(int_value))
+ self.play(Uncreate(self.path))
+
+ self.show_path([[-1,1],[-1,-2],[-5,0],[-2,3.5],[1,1]])
+ self.play(Indicate(int_value),run_time=2)
+ self.wait(.6)
+
+ self.play(Write(path_indepent_text))
+
+
+
+ def show_path(self,points):
+ points=[self.end_points[0]]+points+[self.end_points[1]]
+
+ path= VMobject()
+ path.set_points_smoothly([
+ self.coords_to_point(*point)
+ for point in points
+ ])
+ path.set_color(self.path_color)
+ self.play(ShowCreation(path),run_time=1.5)
+
+ self.path=path
+
+
+
+
+
+#uploaded by Somnath Pandit. FSF2020_Fundamental_Theorem_of_Line_Integrals
+
+
+
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/file3_line_int_example.gif
new file mode 100644
index 0000000..20ed081
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.py
new file mode 100644
index 0000000..71506a3
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/fundamental-theorem-of-line-integral/file3_line_int_example.py
@@ -0,0 +1,149 @@
+from manimlib.imports import *
+
+
+class LineIntegration(GraphScene):
+ CONFIG = {
+ "x_min" : -1,
+ "x_max" : 2,
+ "y_min" : -1,
+ "y_max" : 2,
+ "graph_origin": ORIGIN+3*LEFT+1.5*DOWN,
+ "x_axis_width": 10,
+ "y_axis_height": 10 ,
+ "x_tick_frequency": 1,
+ "y_tick_frequency": 1,
+ "default_vector_field_config": {
+ "delta_x": .5,
+ "delta_y": .5,
+ "min_magnitude": 0,
+ "max_magnitude": .5,
+ "colors": [GREEN,BLUE,BLUE,TEAL],
+ "length_func": lambda norm : .4*sigmoid(norm),
+ "opacity": .75,
+ "vector_config": {
+ "stroke_width":2
+ },
+ },
+
+ "a": .45,"b": 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)
+
+
+
+
+ vector_field=self.get_vector_field(
+ lambda v: np.array([
+ v[1]-self.graph_origin[1],
+ v[0]-self.graph_origin[0],
+ 0,
+ ])
+ )
+ vector_field_text=TexMobject(
+ "\\vec F=y\hat i+x\hat j",
+ stroke_width=2
+ ).to_corner(UR,buff=.75).scale(1.2)
+
+ vector_field_text[0][0:3].set_color(TEAL),
+ self.add(vector_field,)
+ self.play(Write(vector_field_text))
+ self.wait()
+ self.get_endpoints_of_curve()
+ self.wait(.6)
+ self.play(
+ vector_field_text.shift,5*LEFT,
+
+ )
+ vector_field.set_fill(opacity=.2)
+ self.show_line_integral()
+ 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_endpoints_of_curve(self):
+ points=[[1,1],[0,0]]
+ point_labels= ["(1,1)","(0,0)"]
+ for point,label in zip(points,point_labels):
+ dot=Dot(self.coords_to_point(*point)).set_color(RED)
+ dot_label=TexMobject(label)
+ dot_label.next_to(dot,DR)
+ self.add(dot,dot_label)
+ self.end_points=points
+
+ def show_line_integral(self):
+ int_text=TexMobject(
+ "\\int_\\text{\\textbf{path}}\\vec F \\cdot d\\vec r= 1",
+ color=BLUE,
+ stroke_width=1.5
+ ).scale(1.2)
+ int_text[0][0].set_color(RED_C)
+ int_text[0][5:7].set_color(TEAL)
+ int_text.to_edge(RIGHT+UP,buff=1)
+
+ close_int=TexMobject("O").set_color(RED).scale(1.3)
+ close_int.move_to(int_text[0][0],OUT)
+ close_int_val=TexMobject("0",color=BLUE).scale(1.4)
+ close_int_val.move_to(int_text[0][-1],OUT)
+
+ self.play(Write(int_text))
+
+
+ self.show_method([[0,1]])
+ self.play(Indicate(int_text))
+ self.wait()
+
+ self.show_method([[1,0]])
+ self.play(Indicate(int_text))
+ self.wait()
+ self.remove(int_text[0][-1])
+ self.add(close_int)
+
+ for i in range(2):
+ self.play(self.paths[i].rotate,PI)
+ self.play(Indicate(close_int))
+ self.play(Write(close_int_val))
+ self.wait()
+
+
+ def show_method(self,points):
+ points=points+self.end_points
+ paths=[]
+ for i in range(-1,len(points)-2):
+ path=Arrow(
+ self.coords_to_point(*points[i]),
+ self.coords_to_point(*points[i+1]),
+ buff=0
+ ).set_color(BLUE)
+ paths+=VGroup(path)
+ self.play(GrowArrow(path),run_time=1.5)
+
+ self.paths=paths
+
+
+
+
+
+#uploaded by Somnath Pandit. FSF2020_Fundamental_Theorem_of_Line_Integrals
+
+
+
--
cgit
From 5d7d773aadf04a88b3238853c60a2ea1217804b2 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Wed, 10 Jun 2020 09:05:58 +0530
Subject: Rank Nullity Theorem
---
.../The-Rank-Nullity-Theorem/file.txt | 2 +
.../The-Rank-Nullity-Theorem/file1_RN_Theorem.py | 58 ++++++++++++++++++++++
.../The-Rank-Nullity-Theorem/file2_RN_Theorem1.py | 33 ++++++++++++
3 files changed, 93 insertions(+)
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
create mode 100755 FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
new file mode 100644
index 0000000..890fe45
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
@@ -0,0 +1,2 @@
+file 'RN_Theorem.mp4'
+file 'RN_Theorem1.mp4'
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
new file mode 100755
index 0000000..31330e2
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
@@ -0,0 +1,58 @@
+from manimlib.imports import *
+class RN_Theorem(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE)
+ square.move_to(4*LEFT+4*DOWN)
+ square.scale(4)
+ self.play(ShowCreation(square))
+ predim = TextMobject("Dimension of this vector space is 2")
+ predim.move_to(DOWN+4*LEFT)
+ predim.scale(0.75)
+ self.play(Write(predim))
+ self.wait()
+ self.play(FadeOut(predim))
+ afterlt = TextMobject("After Linear transformation")
+ afterlt.move_to(DOWN+4*LEFT)
+ afterlt.scale(0.75)
+ afterlt2 = TextMobject("Dimension of the vector space","remains to be 2")
+ afterlt2[0].move_to(2*DOWN+4*LEFT)
+ afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt2.scale(0.75)
+ matrix = [[1,1],[0,1]]
+ self.apply_matrix(matrix)
+ self.play(Write(afterlt))
+ self.play(Write(afterlt2))
+ self.wait()
+ nullity = TextMobject("Hence, nullity = 0")
+ nullity.move_to(DOWN+4*LEFT)
+ self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
+ self.wait(1)
+ self.play(FadeOut(nullity))
+
+ predim = TextMobject("Let us look at another example")
+ predim.move_to(DOWN+4*LEFT)
+ predim.scale(0.75)
+ matrix = [[1,-1],[0,1]]
+ self.apply_matrix(matrix)
+ self.play(Write(predim))
+ self.wait()
+ self.play(FadeOut(predim))
+ afterlt = TextMobject("After Linear transformation")
+ afterlt.move_to(DOWN+4*LEFT)
+ afterlt.scale(0.75)
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 1")
+ afterlt2[0].move_to(2*DOWN+4*LEFT)
+ afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt2.scale(0.75)
+ matrix = [[1,1],[1,1]]
+ self.apply_matrix(matrix)
+ self.play(Write(afterlt))
+ self.play(Write(afterlt2))
+ self.wait()
+ nullity = TextMobject("Hence, nullity = 1")
+ nullity.move_to(DOWN+4*LEFT)
+ self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
+ self.wait(1)
+ self.play(FadeOut(nullity))
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
new file mode 100644
index 0000000..8f05ddd
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
@@ -0,0 +1,33 @@
+from manimlib.imports import *
+class RN_Theorem1(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE)
+ square.move_to(4*LEFT+4*DOWN)
+ square.scale(4)
+ self.play(ShowCreation(square))
+ predim = TextMobject("Another One")
+ predim.move_to(DOWN+4*LEFT)
+ predim.scale(0.75)
+ self.play(Write(predim))
+ self.wait()
+ self.play(FadeOut(predim))
+ afterlt = TextMobject("After Linear transformation")
+ afterlt.move_to(DOWN+4*LEFT)
+ afterlt.scale(0.75)
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 0")
+ afterlt2[0].move_to(2*DOWN+4*LEFT)
+ afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt2.scale(0.75)
+ matrix = [[0,0],[0,0]]
+ self.apply_matrix(matrix)
+ self.play(Write(afterlt))
+ self.play(Write(afterlt2))
+ self.wait()
+ nullity = TextMobject("Hence, nullity = 2")
+ nullity.move_to(DOWN+4*LEFT)
+ #afterlt.scale(0.75)
+ self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
+ self.wait(1)
+ self.play(FadeOut(nullity))
--
cgit
From dd85fa70fa196fac02b88b84bdac4587a76139b8 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Wed, 10 Jun 2020 22:21:44 +0530
Subject: update with upgrade
---
.../integrals-of-multivariable-functions/README.md | 4 +
.../double-integrals/file6_doing_integration.gif | Bin 6661372 -> 3349455 bytes
.../double-integrals/file6_doing_integration.py | 141 ++++++++++++---------
.../file7_int_process_of_example.gif | Bin 6100824 -> 3031924 bytes
.../file7_int_process_of_example.py | 62 +++++++--
5 files changed, 136 insertions(+), 71 deletions(-)
(limited to 'FSF-2020')
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 221e78d..4de6c1d 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
@@ -7,3 +7,7 @@ FSF2020--Somnath Pandit
## Fubini's Theorem
## Line Integrals
+
+## Fundamental Theorem of Line integrals
+
+## Vector Fields
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/file6_doing_integration.gif
index cafed44..7a9271b 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
index 34d1769..5a8cec0 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file6_doing_integration.py
@@ -5,13 +5,13 @@ class IntegrationProcess(SpecialThreeDScene):
CONFIG = {
"axes_config": {
"x_min": 0,
- "x_max": 8,
+ "x_max": 7,
"y_min": 0,
- "y_max": 8,
+ "y_max": 7,
"z_min": 0,
- "z_max": 6,
+ "z_max": 4,
"a":1 ,"b": 6, "c":2 , "d":6,
- "axes_shift":-3*OUT + 5*LEFT,
+ "axes_shift":-3*OUT,
"x_axis_config": {
"tick_frequency": 1,
# "include_tip": False,
@@ -37,7 +37,7 @@ class IntegrationProcess(SpecialThreeDScene):
"stroke_color": WHITE,
"stroke_opacity": 0.5,
},
- "Func": lambda x,y: 2+y/4+np.cos(x)
+ "Func": lambda x,y: 2+y/4+np.cos(x/1.4)
}
@@ -45,31 +45,34 @@ class IntegrationProcess(SpecialThreeDScene):
self.setup_axes()
axes=self.axes
+
+ self.camera.frame_center.shift(axes.c2p(3,4,1.7))
self.set_camera_orientation(distance=35,
- phi=85 * DEGREES,
- theta=-80 * DEGREES,
+ phi= 80 * DEGREES,
+ theta= -80 * DEGREES,
+ gamma = 0 * DEGREES
)
fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
R=TextMobject("R").set_color(BLACK).scale(3)
R.move_to(axes.input_plane,IN)
self.add(R)
- #get the surface
+ # get the surface
surface= self.get_surface(
axes, lambda x , y:
self.Func(x,y)
)
surface.set_style(
- fill_opacity=0.75,
+ fill_opacity=.65,
fill_color=PINK,
stroke_width=0.8,
stroke_color=WHITE,
)
-
+ fn_text.next_to(surface,UP,buff=MED_LARGE_BUFF)
slice_curve=(self.get_y_slice_graph(
axes,self.Func,5,color=YELLOW))
@@ -79,10 +82,10 @@ class IntegrationProcess(SpecialThreeDScene):
self.add(surface)
self.get_lines()
-
+
self.show_process(axes)
- self.wait(2)
+ self.wait(3)
@@ -90,6 +93,7 @@ class IntegrationProcess(SpecialThreeDScene):
y_tracker = ValueTracker(axes.c)
self.y_tracker=y_tracker
y=y_tracker.get_value
+
graph = always_redraw(
lambda: self.get_y_slice_graph(
axes, self.Func, y(),
@@ -107,24 +111,67 @@ class IntegrationProcess(SpecialThreeDScene):
],
*[
axes.c2p(x, y(), 0)
- for x in [ axes.b, axes.a,]
+ for x in [ axes.b, axes.a,]
],
- stroke_width=0,
+ stroke_width=2,
+ fill_color=BLUE_D,
+ fill_opacity=.4,
+ ))
+
+ plane_side1 = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(axes.a,y,self.Func(axes.a,y))
+ for y in np.arange(axes.c,y(),0.01)
+ ],
+ *[
+ axes.c2p(axes.a, y, 0)
+ for y in [ y(),axes.c, ]
+ ],
+ stroke_width=2.5,
+ fill_color=BLUE_C,
+ fill_opacity=.2,
+ ))
+ plane_side2 = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(axes.b,y,self.Func(axes.b,y))
+ for y in np.arange(axes.c,y(),0.01)
+ ],
+ *[
+ axes.c2p(axes.b, y, 0)
+ for y in [y(),axes.c,]
+ ],
+ stroke_width=2.5,
fill_color=BLUE_E,
- fill_opacity=.5,
+ fill_opacity=.45,
))
plane.suspend_updating()
+ plane_side1.suspend_updating()
+ plane_side2.suspend_updating()
+
+ self.play(Write(VGroup(graph,plane)),run_time=2)
+ self.add(plane.copy(),plane_side1,plane_side2)
+
+
+ plane_side1.resume_updating()
+ plane_side2.resume_updating()
- self.play(Write(VGroup(graph,plane)),run_time=4)
- graph.resume_updating()
- plane.resume_updating()
+ self.move_camera(
+ distance=30,
+ phi= 85 * DEGREES,
+ theta= -10 * DEGREES,
+ run_time=1.5
+ )
self.play(
ApplyMethod(
y_tracker.set_value, axes.d,
rate_func=linear,
run_time=6,
- )
+ )
)
+ plane.suspend_updating()
+ plane_side1.suspend_updating()
+ plane_side2.suspend_updating()
+
def get_y_slice_graph(self, axes, func, y, **kwargs):
@@ -142,35 +189,7 @@ class IntegrationProcess(SpecialThreeDScene):
**config,
)
return slice_curve
-
- '''def get_y_slice_plane(self, axes):
- self.y_tracker=y_tracker
- y=y_tracker.get_value()
- curve_points=[
- axes.c2p(x,y,self.Func(x,y))
- for x in np.arange(axes.a,axes.b,0.01)
- ]
- base_points=[
- axes.c2p(x, y, 0)
- for x in [ axes.b, axes.a,]
- ]
- plane_points= curve_points+base_points
- plane = always_redraw(lambda: Polygon(
- *plane_points,
- stroke_width=.4,
- fill_color=BLUE,
- fill_opacity=0.2
- ))
- plane.add_updater(lambda m: m.shift(
- axes.c2p(
- axes.a,
- y_tracker.get_value(),
- 1,
- ) - plane.points[0]
- ))
- plane.y_tracker = y_tracker
-
- return plane '''
+
def get_surface(self,axes, func, **kwargs):
config = {
@@ -195,9 +214,6 @@ class IntegrationProcess(SpecialThreeDScene):
def get_lines(self):
axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
surface_corners=[]
for x,y,z in self.region_corners:
@@ -207,13 +223,17 @@ class IntegrationProcess(SpecialThreeDScene):
for start , end in zip(surface_corners,
self.region_corners):
lines.add(self.draw_lines(start,end,"RED"))
-
+
+ labels=[
+ (axes.a,0,0),
+ (axes.b,0,0),
+ (0,axes.d,0),
+ (0,axes.c,0)
+ ]
+ self.region_corners[-1]=self.region_corners[0]
for start , end in zip(labels,
self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- # self.play(ShowCreation(lines))
+ lines.add(self.draw_lines(start,end,"WHITE"))
self.add(lines)
@@ -223,7 +243,10 @@ class IntegrationProcess(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)
config.update(kwargs)
@@ -260,7 +283,7 @@ class IntegrationProcess(SpecialThreeDScene):
axes.input_plane = input_plane
self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+ input_plane.get_corner(pos) for pos in (DL,DR,UL,UR)]
return axes
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/file7_int_process_of_example.gif
index d48656b..9fbdde8 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
index ab9337d..f733761 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file7_int_process_of_example.py
@@ -113,7 +113,35 @@ class IntegrationProcess(SpecialThreeDScene):
fill_color=BLUE_E,
fill_opacity=.65,
))
+ plane_side1 = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(axes.a,y,self.Func(axes.a,y))
+ for y in np.arange(axes.c,y(),0.01)
+ ],
+ *[
+ axes.c2p(axes.a, y, 0)
+ for y in [ y(),axes.c, ]
+ ],
+ stroke_width=2.5,
+ fill_color=BLUE_C,
+ fill_opacity=.2,
+ ))
+ plane_side2 = always_redraw(lambda: Polygon(
+ *[
+ axes.c2p(axes.b,y,self.Func(axes.b,y))
+ for y in np.arange(axes.c,y(),0.01)
+ ],
+ *[
+ axes.c2p(axes.b, y, 0)
+ for y in [y(),axes.c,]
+ ],
+ stroke_width=2.5,
+ fill_color=BLUE_E,
+ fill_opacity=.45,
+ ))
plane.suspend_updating()
+ plane_side1.suspend_updating()
+ plane_side2.suspend_updating()
first_x_text=TextMobject("First the $x$ integration..",color=YELLOW)
first_x_text.to_corner(UR,buff=1.1)
@@ -138,8 +166,11 @@ class IntegrationProcess(SpecialThreeDScene):
self.remove(first_x_text)
self.add_fixed_in_frame_mobjects(then_y_text)
self.play(Write(then_y_text))
+ self.add(plane.copy(),plane_side1,plane_side2)
graph.resume_updating()
plane.resume_updating()
+ plane_side1.resume_updating()
+ plane_side2.resume_updating()
self.play(
ApplyMethod(
y_tracker.set_value, axes.d,
@@ -148,6 +179,11 @@ class IntegrationProcess(SpecialThreeDScene):
)
)
+ graph.suspend_updating()
+ plane.suspend_updating()
+ plane_side1.suspend_updating()
+ plane_side2.suspend_updating()
+
def get_y_slice_graph(self, axes, func, y, **kwargs):
config = dict()
@@ -189,9 +225,6 @@ class IntegrationProcess(SpecialThreeDScene):
def get_lines(self):
axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
surface_corners=[]
for x,y,z in self.region_corners:
@@ -201,13 +234,17 @@ class IntegrationProcess(SpecialThreeDScene):
for start , end in zip(surface_corners,
self.region_corners):
lines.add(self.draw_lines(start,end,"RED"))
-
+
+ labels=[
+ (axes.a,0,0),
+ (axes.b,0,0),
+ (0,axes.d,0),
+ (0,axes.c,0)
+ ]
+ self.region_corners[-1]=self.region_corners[0]
for start , end in zip(labels,
self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- # self.play(ShowCreation(lines))
+ lines.add(self.draw_lines(start,end,"WHITE"))
self.add(lines)
@@ -217,9 +254,10 @@ class IntegrationProcess(SpecialThreeDScene):
line=DashedLine(start,end,color=color)
return line
-
-
- #customize 3D axes
+
+
+#------------------------------------------------------------
+ #customize 3d axes
def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
config = dict(self.axes_config)
config.update(kwargs)
@@ -256,7 +294,7 @@ class IntegrationProcess(SpecialThreeDScene):
axes.input_plane = input_plane
self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+ input_plane.get_corner(pos) for pos in (DL,DR,UL,UR)]
return axes
--
cgit
From bd056f51d28e6ca31c103cc53f43a728b81a1387 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Thu, 11 Jun 2020 01:00:25 +0530
Subject: fig 5 changed to video 3
---
.../file5_linear_transformation.py | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100755 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
new file mode 100755
index 0000000..01a0cef
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
@@ -0,0 +1,27 @@
+from manimlib.imports import *
+class LinearTrans(LinearTransformationScene,MovingCameraScene):
+ CONFIG = {
+ "basis_vector_stroke_width": 1,
+ "leave_ghost_vectors": True,
+ }
+
+ def setup(self):
+ LinearTransformationScene.setup(self)
+ MovingCameraScene.setup(self)
+
+ def construct(self):
+ self.setup()
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width, 7)
+ matrix = [[0.866,-0.5],[0.5,0.866]]
+ self.apply_matrix(matrix)
+ arc1 = Arc(radius = 0.25,angle=TAU/12)
+ arc2 = Arc(radius = 0.25,angle=TAU/12,start_angle=TAU/4)
+ text1 = TextMobject(r"$\theta$")
+ text1.scale(0.5)
+ text1.move_to(0.5*UP+0.125*LEFT)
+ text2 = TextMobject(r"$\theta$")
+ text2.scale(0.5)
+ text2.move_to(0.5*RIGHT+0.125*UP)
+ self.play(ShowCreation(arc1),ShowCreation(arc2),Write(text1),Write(text2),run_time=1)
+ self.wait()
--
cgit
From a047a2081ef749f6acc6d9505828fbfbecbcf90a Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Thu, 11 Jun 2020 15:41:39 +0530
Subject: updated Linear Transformation(Maps)
---
.../Linear-Transformations-(Linear-Maps)/file.txt | 3 +
...1_Understand_Linear_Transformations_visually.py | 193 ---------------------
.../file1_transformations.py | 45 +++++
...2_Understand_Linear_Transformations_visually.py | 193 +++++++++++++++++++++
.../file2_Uniform_Scaling.py | 91 ----------
.../file3_Horizontal_Shear.py | 53 ------
.../file3_Horizontal_Shear_gif.gif | Bin 1566999 -> 0 bytes
.../file3_Uniform_Scaling.py | 91 ++++++++++
.../file4_Horizontal_Shear.py | 53 ++++++
.../file4_Horizontal_Shear_gif.gif | Bin 0 -> 1566999 bytes
.../file4_Vertical_Shear.py | 52 ------
.../file4_Vertical_Shear_gif.gif | Bin 1347079 -> 0 bytes
.../file5_Vertical_Shear.py | 52 ++++++
.../file5_Vertical_Shear_gif.gif | Bin 0 -> 1347079 bytes
.../file5_linear_transformation.py | 27 ---
.../file6_linear_transformation.py | 27 +++
16 files changed, 464 insertions(+), 416 deletions(-)
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif
delete mode 100755 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
create mode 100755 FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt
new file mode 100644
index 0000000..cae98ce
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt
@@ -0,0 +1,3 @@
+file 'text.mp4'
+file 'LinearTransformation.mp4'
+file 'NonLinearTransformation.mp4'
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
deleted file mode 100644
index 577032d..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_Understand_Linear_Transformations_visually.py
+++ /dev/null
@@ -1,193 +0,0 @@
-from manimlib.imports import *
-
-class Rotation(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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)
-
- introText = TextMobject("Understanding Linear Transformations")
- self.play(Write(introText))
- self.wait(1)
-
- introText1 = TextMobject("Visually ... ")
- introText1.move_to(DOWN)
- self.play(Write(introText1))
- self.wait(1)
- self.play(FadeOut(introText), FadeOut(introText1))
-
- Text1 = TextMobject("Let $\overrightarrow{v}$ be $2\hat{i}+3\hat{j}$")
- Text2 = TextMobject("$\overrightarrow{v} = 2\hat{i}+3\hat{j}$")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
- self.play(Write(Text1))
- self.wait()
- self.play(Transform(Text1,Text2))
-
- self.setup_axes(animate=True)
- arrow_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*LEFT + 0.25*DOWN, end = self.graph_origin+2*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.25*UP)
- self.play(ShowCreation(arrow_v))
-
- Text_i = TextMobject("$\hat{i}$")
- Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
- Text_i.scale(0.75)
- Text_j = TextMobject("$\hat{j}$")
- Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
- Text_j.scale(0.75)
-
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
- self.play(ShowCreation(arrow_i), ShowCreation(arrow_j), Write(Text_i), Write(Text_j))
-
- Text_2i = TextMobject("$2\hat{i}$")
- Text_2i.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
- Text_3j = TextMobject("$3\hat{j}$")
- Text_3j.move_to(self.graph_origin+1*XTD*LEFT+1.5*YTD*UP)
-
- arrow_2i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+2*XTD*RIGHT+ 0.25*RIGHT)
- arrow_2i.set_color(YELLOW)
- arrow_3j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+3*YTD*UP+0.25*UP)
- arrow_3j.set_color(RED)
- self.wait(0.5)
- self.play(Transform(arrow_i,arrow_2i), Transform(arrow_j,arrow_3j), Transform(Text_i,Text_2i), Transform(Text_j,Text_3j))
- self.play(ApplyMethod(arrow_j.move_to,self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP) , ApplyMethod(Text_j.move_to,self.graph_origin+2.5*XTD*RIGHT+1.5*YTD*UP+ 0.15*RIGHT + 0.25*UP))
-
- new_Text_v = TextMobject("$\overrightarrow{v}$")
- new_Text_v.move_to(self.graph_origin+0.5*XTD*RIGHT+1.5*YTD*UP)
- self.play(Write(new_Text_v))
-
- new_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- new_arrow_i.set_color(YELLOW)
- new_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
- new_arrow_j.set_color(RED)
-
- new_Text_i = TextMobject("$\hat{i}$")
- new_Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
- new_Text_i.scale(0.75)
- new_Text_j = TextMobject("$\hat{j}$")
- new_Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
- new_Text_j.scale(0.75)
-
- self.wait(1)
-
- self.play(FadeOut(Text_i),
- FadeOut(Text_j),
- FadeOut(arrow_i),
- FadeOut(arrow_j),
- ShowCreation(new_arrow_i),
- ShowCreation(new_arrow_j),
- Write(new_Text_i),
- Write(new_Text_j))
-
- self.play(ApplyMethod(Text1.move_to,4*RIGHT))
- Text3 = TextMobject("Let the be a linear transformation function")
- Text3.scale(0.5)
- Text4 = TextMobject("$T$ which rotates the vectors by angle of $90^{\circ}$")
- Text4.scale(0.5)
- Text3.move_to(4*RIGHT+3*UP)
- Text4.move_to(4*RIGHT+2.5*UP)
- self.play(Write(Text3), Write(Text4))
- self.wait(2)
-
- Text6 = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- Text6.scale(0.75)
- Text6.set_color(YELLOW)
- Text6.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
- Text7 = TextMobject(r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
- Text7.scale(0.75)
- Text7.set_color(RED)
- Text7.move_to(self.graph_origin+1*XTD*LEFT+1*YTD*UP)
-
- self.play(Transform(new_Text_i,Text6))
- self.play(Transform(new_Text_j,Text7))
-
- Text5 = TextMobject(r"$\overrightarrow{v} = 2 $", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
- Text5[1].set_color(YELLOW)
- Text5[3].set_color(RED)
- Text5.move_to(4*RIGHT)
-
- self.play(Transform(Text1, Text5))
- self.wait()
-
- arrow_modified_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*UP, end = self.graph_origin-(1*YTD*UP+0.25*UP))
- arrow_modified_i.set_color(YELLOW)
- arrow_modified_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_modified_j.set_color(RED)
-
- yellow_i = TextMobject(r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$")
- yellow_i.set_color(YELLOW).scale(0.75)
- yellow_i.move_to(self.graph_origin + 1*XTD*DOWN + 1*YTD*LEFT)
-
- red_j = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- red_j.set_color(RED).scale(0.75)
- red_j.move_to(self.graph_origin + 1*XTD*UP + 1*YTD*RIGHT)
-
- Text8 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
- Text8[1].set_color(YELLOW)
- Text8[3].set_color(RED)
- Text8.move_to(4*RIGHT+1.5*DOWN)
- Text8.scale(0.75)
-
- new_Text__v = TextMobject("$\overrightarrow{v}_{transformed}$")
- new_Text__v.scale(0.75)
- arrow_modified_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT + 0.15*UP, end = self.graph_origin+2*XTD*DOWN+3*YTD*RIGHT+ 0.15*DOWN + 0.25*RIGHT)
- self.play(Transform(arrow_v, arrow_modified_v),
- Transform(new_arrow_i, arrow_modified_i),
- Transform(new_arrow_j, arrow_modified_j),
- Transform(new_Text_i,yellow_i),
- Transform(new_Text_j,red_j),
- FadeOut(new_Text_v),
- ApplyMethod(new_Text__v.move_to,self.graph_origin+3*XTD*RIGHT+0.5*YTD*DOWN),
- Write(Text8))
-
- self.play(FadeOut(Text1), FadeOut(Text3), FadeOut(Text4), ApplyMethod(Text8.move_to,4*RIGHT+3*UP))
-
- Text9 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\hat{i}_{transformed}$", r"+3", r"$\hat{j}_{transformed}$")
- Text9[1].set_color(YELLOW)
- Text9[3].set_color(RED)
- Text9.move_to(4*RIGHT+2*UP)
- Text9.scale(0.5)
-
- self.play(Write(Text9))
-
- v_transformed = TextMobject(r"$\overrightarrow{v}_{transformed} \equiv T(\overrightarrow{v})$")
- v_transformed.scale(0.75).move_to(4*RIGHT+UP)
- i_transformed = TextMobject(r"$\hat{i}_{transformed} \equiv T(\hat{i})$")
- i_transformed.set_color(YELLOW).scale(0.75).move_to(4*RIGHT)
- j_transformed = TextMobject(r"$\hat{v}_{transformed} \equiv T(\hat{j})$")
- j_transformed.set_color(RED).scale(0.75).move_to(4*RIGHT+DOWN)
-
- self.play(Write(v_transformed), Write(i_transformed), Write(j_transformed))
- self.wait(3)
-
- Text10 = TextMobject(r"$T(\overrightarrow{v}) = $", r"$\begin{pmatrix} 3 \\ -2 \end{pmatrix}$")
- Text10[1].set_color(BLUE_E)
- Text10.move_to(4*RIGHT+1*UP)
- Text10.scale(0.75)
-
- self.play(Write(Text10), ApplyMethod(v_transformed.move_to,4*RIGHT+2*UP), FadeOut(i_transformed), FadeOut(j_transformed), FadeOut(Text9))
- self.wait(1)
-
- self.play(FadeOut(self.axes),
- FadeOut(arrow_v),
- FadeOut(new_arrow_i),
- FadeOut(new_arrow_j),
- FadeOut(new_Text_i),
- FadeOut(new_Text_i),
- FadeOut(new_Text_j),
- FadeOut(new_Text__v),
- FadeOut(Text10),
- FadeOut(v_transformed),
- FadeOut(Text8))
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py
new file mode 100644
index 0000000..677f890
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py
@@ -0,0 +1,45 @@
+from manimlib.imports import *
+
+class text(Scene):
+ def construct(self):
+ text1 = TextMobject("For a grid, undergoing a linear transformation, all it's straight lines")
+ text1.scale(0.9)
+ text2 = TextMobject("must either remain straight lines or sends to a point in the grid formed")
+ text2.scale(0.9)
+ text1.move_to(ORIGIN+UP)
+ text2.move_to(ORIGIN)
+ self.play(Write(text1))
+ self.play(Write(text2))
+ self.wait()
+ self.play(FadeOut(text1),FadeOut(text2))
+
+class LinearTransformation(LinearTransformationScene):
+ CONFIG = {
+ "basis_vector_stroke_width": 3,
+ "leave_ghost_vectors": True,
+ }
+
+ def construct(self):
+ self.setup()
+ matrix = [[0.866,-0.5],[0.5,0.866]]
+ self.apply_matrix(matrix)
+ text = TextMobject("This is a Linear","Trasformation")
+ text[0].move_to(DOWN+4*LEFT)
+ text[1].move_to(1.5*DOWN+4*LEFT)
+ text.add_background_rectangle()
+ self.play(Write(text))
+ self.wait()
+
+class NonLinearTransformation(Scene):
+ def construct(self):
+ grid = NumberPlane()
+ self.play(ShowCreation(grid),run_time =2)
+ NonLinearTrans = lambda coordinates : coordinates + np.array([np.sin(coordinates[1]),np.sin(coordinates[0]),0,])
+ grid.prepare_for_nonlinear_transform()
+ self.play(grid.apply_function,NonLinearTrans)
+ text = TextMobject("While, this is not a","Linear Trasformation")
+ text[0].move_to(DOWN+4*LEFT)
+ text[1].move_to(1.5*DOWN+4*LEFT)
+ text.add_background_rectangle()
+ self.play(Write(text))
+ self.wait()
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py
new file mode 100644
index 0000000..577032d
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py
@@ -0,0 +1,193 @@
+from manimlib.imports import *
+
+class Rotation(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Understanding Linear Transformations")
+ self.play(Write(introText))
+ self.wait(1)
+
+ introText1 = TextMobject("Visually ... ")
+ introText1.move_to(DOWN)
+ self.play(Write(introText1))
+ self.wait(1)
+ self.play(FadeOut(introText), FadeOut(introText1))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $2\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 2\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*LEFT + 0.25*DOWN, end = self.graph_origin+2*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.25*UP)
+ self.play(ShowCreation(arrow_v))
+
+ Text_i = TextMobject("$\hat{i}$")
+ Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ Text_i.scale(0.75)
+ Text_j = TextMobject("$\hat{j}$")
+ Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ Text_j.scale(0.75)
+
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ self.play(ShowCreation(arrow_i), ShowCreation(arrow_j), Write(Text_i), Write(Text_j))
+
+ Text_2i = TextMobject("$2\hat{i}$")
+ Text_2i.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text_3j = TextMobject("$3\hat{j}$")
+ Text_3j.move_to(self.graph_origin+1*XTD*LEFT+1.5*YTD*UP)
+
+ arrow_2i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+2*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_2i.set_color(YELLOW)
+ arrow_3j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+3*YTD*UP+0.25*UP)
+ arrow_3j.set_color(RED)
+ self.wait(0.5)
+ self.play(Transform(arrow_i,arrow_2i), Transform(arrow_j,arrow_3j), Transform(Text_i,Text_2i), Transform(Text_j,Text_3j))
+ self.play(ApplyMethod(arrow_j.move_to,self.graph_origin+2*XTD*RIGHT+1.5*YTD*UP) , ApplyMethod(Text_j.move_to,self.graph_origin+2.5*XTD*RIGHT+1.5*YTD*UP+ 0.15*RIGHT + 0.25*UP))
+
+ new_Text_v = TextMobject("$\overrightarrow{v}$")
+ new_Text_v.move_to(self.graph_origin+0.5*XTD*RIGHT+1.5*YTD*UP)
+ self.play(Write(new_Text_v))
+
+ new_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ new_arrow_i.set_color(YELLOW)
+ new_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*YTD*UP+0.25*UP)
+ new_arrow_j.set_color(RED)
+
+ new_Text_i = TextMobject("$\hat{i}$")
+ new_Text_i.move_to(self.graph_origin+0.5*XTD*RIGHT+0.5*YTD*DOWN)
+ new_Text_i.scale(0.75)
+ new_Text_j = TextMobject("$\hat{j}$")
+ new_Text_j.move_to(self.graph_origin+0.5*XTD*LEFT+0.5*YTD*UP)
+ new_Text_j.scale(0.75)
+
+ self.wait(1)
+
+ self.play(FadeOut(Text_i),
+ FadeOut(Text_j),
+ FadeOut(arrow_i),
+ FadeOut(arrow_j),
+ ShowCreation(new_arrow_i),
+ ShowCreation(new_arrow_j),
+ Write(new_Text_i),
+ Write(new_Text_j))
+
+ self.play(ApplyMethod(Text1.move_to,4*RIGHT))
+ Text3 = TextMobject("Let the be a linear transformation function")
+ Text3.scale(0.5)
+ Text4 = TextMobject("$T$ which rotates the vectors by angle of $90^{\circ}$")
+ Text4.scale(0.5)
+ Text3.move_to(4*RIGHT+3*UP)
+ Text4.move_to(4*RIGHT+2.5*UP)
+ self.play(Write(Text3), Write(Text4))
+ self.wait(2)
+
+ Text6 = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text6.scale(0.75)
+ Text6.set_color(YELLOW)
+ Text6.move_to(self.graph_origin+1*XTD*RIGHT+1*YTD*DOWN)
+ Text7 = TextMobject(r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text7.scale(0.75)
+ Text7.set_color(RED)
+ Text7.move_to(self.graph_origin+1*XTD*LEFT+1*YTD*UP)
+
+ self.play(Transform(new_Text_i,Text6))
+ self.play(Transform(new_Text_j,Text7))
+
+ Text5 = TextMobject(r"$\overrightarrow{v} = 2 $", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 0 \\ 1 \end{pmatrix}$")
+ Text5[1].set_color(YELLOW)
+ Text5[3].set_color(RED)
+ Text5.move_to(4*RIGHT)
+
+ self.play(Transform(Text1, Text5))
+ self.wait()
+
+ arrow_modified_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*UP, end = self.graph_origin-(1*YTD*UP+0.25*UP))
+ arrow_modified_i.set_color(YELLOW)
+ arrow_modified_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_modified_j.set_color(RED)
+
+ yellow_i = TextMobject(r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$")
+ yellow_i.set_color(YELLOW).scale(0.75)
+ yellow_i.move_to(self.graph_origin + 1*XTD*DOWN + 1*YTD*LEFT)
+
+ red_j = TextMobject(r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ red_j.set_color(RED).scale(0.75)
+ red_j.move_to(self.graph_origin + 1*XTD*UP + 1*YTD*RIGHT)
+
+ Text8 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\begin{pmatrix} 0 \\ -1 \end{pmatrix}$", r"+3", r"$\begin{pmatrix} 1 \\ 0 \end{pmatrix}$")
+ Text8[1].set_color(YELLOW)
+ Text8[3].set_color(RED)
+ Text8.move_to(4*RIGHT+1.5*DOWN)
+ Text8.scale(0.75)
+
+ new_Text__v = TextMobject("$\overrightarrow{v}_{transformed}$")
+ new_Text__v.scale(0.75)
+ arrow_modified_v = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT + 0.15*UP, end = self.graph_origin+2*XTD*DOWN+3*YTD*RIGHT+ 0.15*DOWN + 0.25*RIGHT)
+ self.play(Transform(arrow_v, arrow_modified_v),
+ Transform(new_arrow_i, arrow_modified_i),
+ Transform(new_arrow_j, arrow_modified_j),
+ Transform(new_Text_i,yellow_i),
+ Transform(new_Text_j,red_j),
+ FadeOut(new_Text_v),
+ ApplyMethod(new_Text__v.move_to,self.graph_origin+3*XTD*RIGHT+0.5*YTD*DOWN),
+ Write(Text8))
+
+ self.play(FadeOut(Text1), FadeOut(Text3), FadeOut(Text4), ApplyMethod(Text8.move_to,4*RIGHT+3*UP))
+
+ Text9 = TextMobject(r"$\overrightarrow{v}_{transformed} = 2 $", r"$\hat{i}_{transformed}$", r"+3", r"$\hat{j}_{transformed}$")
+ Text9[1].set_color(YELLOW)
+ Text9[3].set_color(RED)
+ Text9.move_to(4*RIGHT+2*UP)
+ Text9.scale(0.5)
+
+ self.play(Write(Text9))
+
+ v_transformed = TextMobject(r"$\overrightarrow{v}_{transformed} \equiv T(\overrightarrow{v})$")
+ v_transformed.scale(0.75).move_to(4*RIGHT+UP)
+ i_transformed = TextMobject(r"$\hat{i}_{transformed} \equiv T(\hat{i})$")
+ i_transformed.set_color(YELLOW).scale(0.75).move_to(4*RIGHT)
+ j_transformed = TextMobject(r"$\hat{v}_{transformed} \equiv T(\hat{j})$")
+ j_transformed.set_color(RED).scale(0.75).move_to(4*RIGHT+DOWN)
+
+ self.play(Write(v_transformed), Write(i_transformed), Write(j_transformed))
+ self.wait(3)
+
+ Text10 = TextMobject(r"$T(\overrightarrow{v}) = $", r"$\begin{pmatrix} 3 \\ -2 \end{pmatrix}$")
+ Text10[1].set_color(BLUE_E)
+ Text10.move_to(4*RIGHT+1*UP)
+ Text10.scale(0.75)
+
+ self.play(Write(Text10), ApplyMethod(v_transformed.move_to,4*RIGHT+2*UP), FadeOut(i_transformed), FadeOut(j_transformed), FadeOut(Text9))
+ self.wait(1)
+
+ self.play(FadeOut(self.axes),
+ FadeOut(arrow_v),
+ FadeOut(new_arrow_i),
+ FadeOut(new_arrow_j),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_i),
+ FadeOut(new_Text_j),
+ FadeOut(new_Text__v),
+ FadeOut(Text10),
+ FadeOut(v_transformed),
+ FadeOut(Text8))
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
deleted file mode 100644
index a7856a5..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Uniform_Scaling.py
+++ /dev/null
@@ -1,91 +0,0 @@
-from manimlib.imports import *
-
-class Scaling(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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)
-
- introText = TextMobject("Scaling")
- self.play(Write(introText))
- self.wait(1)
- self.play(FadeOut(introText))
-
- introText = TextMobject("Uniform Scaling")
- self.play(Write(introText))
- self.wait(1)
- self.play(FadeOut(introText))
-
- Text1 = TextMobject("Let $\overrightarrow{v}$ be $3\hat{i}+3\hat{j}$")
- Text2 = TextMobject("$\overrightarrow{v} = 3\hat{i}+3\hat{j}$")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
- self.play(Write(Text1))
- self.wait()
- self.play(Transform(Text1,Text2))
-
- self.setup_axes(animate=True)
- arrow_v = Arrow(stroke_width = 4, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+3*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.15*UP)
- vector_v = TextMobject(r"$\vec{v}$")
- vector_v.move_to(self.graph_origin + 1*XTD*RIGHT + 2*YTD*UP )
- self.play(ShowCreation(arrow_v),Write(vector_v))
- scaling_factor = TextMobject(r"Scaling Factor = $\frac{4}{3}$")
- scaling_factor.scale(0.75)
- scaled_vector = TextMobject(r"$T(\vec{v}) = \frac{4}{3} \left[ \begin{array} {c} 3 \\ 3 \end{array} \right] = \left[ \begin{array} {c} 4 \\ 4 \end{array} \right]$")
- scaled_vector.set_color(DARK_BLUE)
- scaled_vector.scale(0.75)
- scaling_factor.move_to(4*RIGHT)
- scaled_vector.move_to(4*RIGHT+DOWN)
- self.play(Write(scaling_factor))
- self.wait()
- self.play(Write(scaled_vector))
-
- transformed_arrow_v = Arrow(stroke_width = 2, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+4*XTD*RIGHT+4*YTD*UP+ 0.15*RIGHT + 0.15*UP)
- transformed_arrow_v.set_color(DARK_BLUE)
- transformed_vector_v = TextMobject(r"$T(\vec{v})$")
- transformed_vector_v.move_to(self.graph_origin + 4.5*XTD*RIGHT + 4.5*YTD*UP )
- transformed_vector_v.set_color(DARK_BLUE)
- self.play(ShowCreation(transformed_arrow_v), Write(transformed_vector_v))
-
- self.wait()
-
- represent_text1 = TextMobject("Representation of scaling")
- represent_text2 = TextMobject("of vectors in point form")
- represent_text1.move_to(4*RIGHT+3*UP)
- represent_text2.move_to(4*RIGHT+2*UP)
- self.play(Write(represent_text1), Write(represent_text2))
-
- dot_init = Dot(self.graph_origin+3*XTD*RIGHT+3*YTD*UP)
- dot_trans = Dot(self.graph_origin+4*XTD*RIGHT+4*YTD*UP)
-
- self.play(ApplyMethod(vector_v.move_to,self.graph_origin+2.5*XTD*RIGHT+2.5*YTD*UP),
- ApplyMethod(transformed_vector_v.move_to,self.graph_origin+4.5*XTD*RIGHT+4.5*YTD*UP),
- ShowCreation(dot_init),
- Transform(arrow_v,dot_init),
- Transform(transformed_arrow_v,dot_trans))
-
- self.wait(2)
-
- self.play(FadeOut(dot_init),
- FadeOut(arrow_v),
- FadeOut(transformed_arrow_v),
- FadeOut(represent_text1),
- FadeOut(represent_text2),
- FadeOut(self.axes),
- FadeOut(scaling_factor),
- FadeOut(scaled_vector),
- FadeOut(transformed_vector_v),
- FadeOut(vector_v),
- FadeOut(Text1))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
deleted file mode 100644
index 91f098e..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from manimlib.imports import *
-
-class Hori_Shear(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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("Before"," Horizontal")
- Text1[0].set_color(YELLOW)
- Text2 = TextMobject("Shear Transformation")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
-
- self.setup_axes(animate=False)
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
- arrow_i.set_color(YELLOW)
- arrow_j.set_color(YELLOW)
-
- square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
- self.wait(1)
-
- Text3 = TextMobject("After"," Horizontal")
- Text3[0].set_color(RED)
- Text4 = TextMobject("Shear Transformation")
-
- Text3.move_to(4*RIGHT+2*UP)
- Text4.move_to(4*RIGHT+1*UP)
-
- trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
- trans_arrow_i.set_color(RED)
- trans_arrow_j.set_color(RED)
-
- rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+4*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), Transform(square,rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
- self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif
deleted file mode 100644
index 9bef1b6..0000000
Binary files a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Horizontal_Shear_gif.gif and /dev/null differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py
new file mode 100644
index 0000000..a7856a5
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class Scaling(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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)
+
+ introText = TextMobject("Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ introText = TextMobject("Uniform Scaling")
+ self.play(Write(introText))
+ self.wait(1)
+ self.play(FadeOut(introText))
+
+ Text1 = TextMobject("Let $\overrightarrow{v}$ be $3\hat{i}+3\hat{j}$")
+ Text2 = TextMobject("$\overrightarrow{v} = 3\hat{i}+3\hat{j}$")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+ self.play(Write(Text1))
+ self.wait()
+ self.play(Transform(Text1,Text2))
+
+ self.setup_axes(animate=True)
+ arrow_v = Arrow(stroke_width = 4, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+3*XTD*RIGHT+3*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ vector_v = TextMobject(r"$\vec{v}$")
+ vector_v.move_to(self.graph_origin + 1*XTD*RIGHT + 2*YTD*UP )
+ self.play(ShowCreation(arrow_v),Write(vector_v))
+ scaling_factor = TextMobject(r"Scaling Factor = $\frac{4}{3}$")
+ scaling_factor.scale(0.75)
+ scaled_vector = TextMobject(r"$T(\vec{v}) = \frac{4}{3} \left[ \begin{array} {c} 3 \\ 3 \end{array} \right] = \left[ \begin{array} {c} 4 \\ 4 \end{array} \right]$")
+ scaled_vector.set_color(DARK_BLUE)
+ scaled_vector.scale(0.75)
+ scaling_factor.move_to(4*RIGHT)
+ scaled_vector.move_to(4*RIGHT+DOWN)
+ self.play(Write(scaling_factor))
+ self.wait()
+ self.play(Write(scaled_vector))
+
+ transformed_arrow_v = Arrow(stroke_width = 2, start = self.graph_origin + 0.15*LEFT + 0.15*DOWN, end = self.graph_origin+4*XTD*RIGHT+4*YTD*UP+ 0.15*RIGHT + 0.15*UP)
+ transformed_arrow_v.set_color(DARK_BLUE)
+ transformed_vector_v = TextMobject(r"$T(\vec{v})$")
+ transformed_vector_v.move_to(self.graph_origin + 4.5*XTD*RIGHT + 4.5*YTD*UP )
+ transformed_vector_v.set_color(DARK_BLUE)
+ self.play(ShowCreation(transformed_arrow_v), Write(transformed_vector_v))
+
+ self.wait()
+
+ represent_text1 = TextMobject("Representation of scaling")
+ represent_text2 = TextMobject("of vectors in point form")
+ represent_text1.move_to(4*RIGHT+3*UP)
+ represent_text2.move_to(4*RIGHT+2*UP)
+ self.play(Write(represent_text1), Write(represent_text2))
+
+ dot_init = Dot(self.graph_origin+3*XTD*RIGHT+3*YTD*UP)
+ dot_trans = Dot(self.graph_origin+4*XTD*RIGHT+4*YTD*UP)
+
+ self.play(ApplyMethod(vector_v.move_to,self.graph_origin+2.5*XTD*RIGHT+2.5*YTD*UP),
+ ApplyMethod(transformed_vector_v.move_to,self.graph_origin+4.5*XTD*RIGHT+4.5*YTD*UP),
+ ShowCreation(dot_init),
+ Transform(arrow_v,dot_init),
+ Transform(transformed_arrow_v,dot_trans))
+
+ self.wait(2)
+
+ self.play(FadeOut(dot_init),
+ FadeOut(arrow_v),
+ FadeOut(transformed_arrow_v),
+ FadeOut(represent_text1),
+ FadeOut(represent_text2),
+ FadeOut(self.axes),
+ FadeOut(scaling_factor),
+ FadeOut(scaled_vector),
+ FadeOut(transformed_vector_v),
+ FadeOut(vector_v),
+ FadeOut(Text1))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py
new file mode 100644
index 0000000..91f098e
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py
@@ -0,0 +1,53 @@
+from manimlib.imports import *
+
+class Hori_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Horizontal")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Horizontal")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+4*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), Transform(square,rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif
new file mode 100644
index 0000000..9bef1b6
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
deleted file mode 100644
index 718e4e0..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear.py
+++ /dev/null
@@ -1,52 +0,0 @@
-from manimlib.imports import *
-
-class Ver_Shear(GraphScene):
- CONFIG = {
- "x_min" : -5,
- "x_max" : 5,
- "y_min" : -5,
- "y_max" : 5,
- "graph_origin" : ORIGIN+3.5*LEFT,
- "x_axis_width" : 7,
- "y_axis_height" : 7
- #"x_labeled_nums" : list(range(-5,6)),
- #"y_labeled_nums" : list(range(-5,6)),
- }
-
- 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("Before"," Vertical")
- Text1[0].set_color(YELLOW)
- Text2 = TextMobject("Shear Transformation")
-
- Text1.move_to(4*RIGHT+2*UP)
- Text2.move_to(4*RIGHT+1*UP)
-
- self.setup_axes(animate=False)
- arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
- arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
- arrow_i.set_color(YELLOW)
- arrow_j.set_color(YELLOW)
-
- square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
- square.set_color(DARK_BLUE)
- self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
- self.wait(1)
-
- Text3 = TextMobject("After"," Vertical")
- Text3[0].set_color(RED)
- Text4 = TextMobject("Shear Transformation")
-
- Text3.move_to(4*RIGHT+2*UP)
- Text4.move_to(4*RIGHT+1*UP)
-
- trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
- trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+ 0.25*UP)
- trans_arrow_i.set_color(RED)
- trans_arrow_j.set_color(RED)
-
- rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*UP, self.graph_origin+2*XTD*RIGHT+4*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
- self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), FadeOut(square), ShowCreation(rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
- self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif
deleted file mode 100644
index 7ca323f..0000000
Binary files a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Vertical_Shear_gif.gif and /dev/null differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py
new file mode 100644
index 0000000..718e4e0
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py
@@ -0,0 +1,52 @@
+from manimlib.imports import *
+
+class Ver_Shear(GraphScene):
+ CONFIG = {
+ "x_min" : -5,
+ "x_max" : 5,
+ "y_min" : -5,
+ "y_max" : 5,
+ "graph_origin" : ORIGIN+3.5*LEFT,
+ "x_axis_width" : 7,
+ "y_axis_height" : 7
+ #"x_labeled_nums" : list(range(-5,6)),
+ #"y_labeled_nums" : list(range(-5,6)),
+ }
+
+ 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("Before"," Vertical")
+ Text1[0].set_color(YELLOW)
+ Text2 = TextMobject("Shear Transformation")
+
+ Text1.move_to(4*RIGHT+2*UP)
+ Text2.move_to(4*RIGHT+1*UP)
+
+ self.setup_axes(animate=False)
+ arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*LEFT, end = self.graph_origin+1*XTD*RIGHT+ 0.25*RIGHT)
+ arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+0.25*UP)
+ arrow_i.set_color(YELLOW)
+ arrow_j.set_color(YELLOW)
+
+ square = Polygon(self.graph_origin,self.graph_origin+2*XTD*RIGHT, self.graph_origin+2*XTD*RIGHT+2*YTD*UP, self.graph_origin+2*YTD*UP)
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(square), Write(Text1), Write(Text2), ShowCreation(arrow_i), ShowCreation(arrow_j))
+ self.wait(1)
+
+ Text3 = TextMobject("After"," Vertical")
+ Text3[0].set_color(RED)
+ Text4 = TextMobject("Shear Transformation")
+
+ Text3.move_to(4*RIGHT+2*UP)
+ Text4.move_to(4*RIGHT+1*UP)
+
+ trans_arrow_i = Arrow(stroke_width = 3, start = self.graph_origin + 0.15*DOWN + 0.15*LEFT, end = self.graph_origin+1*XTD*UP+1*YTD*RIGHT+0.25*UP+0.25*RIGHT)
+ trans_arrow_j = Arrow(stroke_width = 3, start = self.graph_origin + 0.25*DOWN, end = self.graph_origin+1*XTD*UP+ 0.25*UP)
+ trans_arrow_i.set_color(RED)
+ trans_arrow_j.set_color(RED)
+
+ rhombus = Polygon(self.graph_origin,self.graph_origin+2*XTD*UP, self.graph_origin+2*XTD*RIGHT+4*YTD*UP, self.graph_origin+2*XTD*RIGHT+2*YTD*UP)
+ self.play(Transform(arrow_i,trans_arrow_i), Transform(arrow_j,trans_arrow_j), FadeOut(square), ShowCreation(rhombus), Transform(Text1,Text3), Transform(Text2,Text4))
+ self.wait(1)
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif
new file mode 100644
index 0000000..7ca323f
Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
deleted file mode 100755
index 01a0cef..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_linear_transformation.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from manimlib.imports import *
-class LinearTrans(LinearTransformationScene,MovingCameraScene):
- CONFIG = {
- "basis_vector_stroke_width": 1,
- "leave_ghost_vectors": True,
- }
-
- def setup(self):
- LinearTransformationScene.setup(self)
- MovingCameraScene.setup(self)
-
- def construct(self):
- self.setup()
- self.camera_frame.save_state()
- self.play(self.camera_frame.set_width, 7)
- matrix = [[0.866,-0.5],[0.5,0.866]]
- self.apply_matrix(matrix)
- arc1 = Arc(radius = 0.25,angle=TAU/12)
- arc2 = Arc(radius = 0.25,angle=TAU/12,start_angle=TAU/4)
- text1 = TextMobject(r"$\theta$")
- text1.scale(0.5)
- text1.move_to(0.5*UP+0.125*LEFT)
- text2 = TextMobject(r"$\theta$")
- text2.scale(0.5)
- text2.move_to(0.5*RIGHT+0.125*UP)
- self.play(ShowCreation(arc1),ShowCreation(arc2),Write(text1),Write(text2),run_time=1)
- self.wait()
diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py
new file mode 100755
index 0000000..01a0cef
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py
@@ -0,0 +1,27 @@
+from manimlib.imports import *
+class LinearTrans(LinearTransformationScene,MovingCameraScene):
+ CONFIG = {
+ "basis_vector_stroke_width": 1,
+ "leave_ghost_vectors": True,
+ }
+
+ def setup(self):
+ LinearTransformationScene.setup(self)
+ MovingCameraScene.setup(self)
+
+ def construct(self):
+ self.setup()
+ self.camera_frame.save_state()
+ self.play(self.camera_frame.set_width, 7)
+ matrix = [[0.866,-0.5],[0.5,0.866]]
+ self.apply_matrix(matrix)
+ arc1 = Arc(radius = 0.25,angle=TAU/12)
+ arc2 = Arc(radius = 0.25,angle=TAU/12,start_angle=TAU/4)
+ text1 = TextMobject(r"$\theta$")
+ text1.scale(0.5)
+ text1.move_to(0.5*UP+0.125*LEFT)
+ text2 = TextMobject(r"$\theta$")
+ text2.scale(0.5)
+ text2.move_to(0.5*RIGHT+0.125*UP)
+ self.play(ShowCreation(arc1),ShowCreation(arc2),Write(text1),Write(text2),run_time=1)
+ self.wait()
--
cgit
From d66b55d33c7a26f7e73ada356294bee9b9b6fef9 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Thu, 11 Jun 2020 17:08:27 +0530
Subject: Updated codes for video in RN theorem
---
.../The-Rank-Nullity-Theorem/file.txt | 5 +-
.../The-Rank-Nullity-Theorem/file1_RN_Theorem.py | 75 ++++++++++++++++------
.../The-Rank-Nullity-Theorem/file2_RN_Theorem1.py | 33 ----------
3 files changed, 60 insertions(+), 53 deletions(-)
delete mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
index 890fe45..5c48a13 100644
--- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file.txt
@@ -1,2 +1,3 @@
-file 'RN_Theorem.mp4'
-file 'RN_Theorem1.mp4'
+file 'RN_Line.mp4'
+file 'RN_Point.mp4'
+file 'RN_SameDim.mp4'
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
index 31330e2..e54276c 100755
--- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file1_RN_Theorem.py
@@ -1,58 +1,97 @@
from manimlib.imports import *
-class RN_Theorem(LinearTransformationScene):
+class RN_Line(LinearTransformationScene):
def construct(self):
+
self.setup()
self.wait()
- square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE)
- square.move_to(4*LEFT+4*DOWN)
- square.scale(4)
- self.play(ShowCreation(square))
+
predim = TextMobject("Dimension of this vector space is 2")
predim.move_to(DOWN+4*LEFT)
predim.scale(0.75)
+ predim.add_background_rectangle()
self.play(Write(predim))
self.wait()
self.play(FadeOut(predim))
+
afterlt = TextMobject("After Linear transformation")
afterlt.move_to(DOWN+4*LEFT)
afterlt.scale(0.75)
- afterlt2 = TextMobject("Dimension of the vector space","remains to be 2")
- afterlt2[0].move_to(2*DOWN+4*LEFT)
- afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt.add_background_rectangle()
+
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 1")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
afterlt2.scale(0.75)
- matrix = [[1,1],[0,1]]
+ afterlt2.add_background_rectangle()
+ matrix = [[1,1],[1,1]]
self.apply_matrix(matrix)
self.play(Write(afterlt))
self.play(Write(afterlt2))
self.wait()
- nullity = TextMobject("Hence, nullity = 0")
+ nullity = TextMobject("Hence, nullity = 1")
nullity.move_to(DOWN+4*LEFT)
self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
self.wait(1)
self.play(FadeOut(nullity))
- predim = TextMobject("Let us look at another example")
+class RN_Point(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ predim = TextMobject("Another One")
predim.move_to(DOWN+4*LEFT)
predim.scale(0.75)
- matrix = [[1,-1],[0,1]]
- self.apply_matrix(matrix)
+ predim.add_background_rectangle()
self.play(Write(predim))
self.wait()
self.play(FadeOut(predim))
afterlt = TextMobject("After Linear transformation")
afterlt.move_to(DOWN+4*LEFT)
afterlt.scale(0.75)
- afterlt2 = TextMobject("Dimension of the vector space","changes to 1")
- afterlt2[0].move_to(2*DOWN+4*LEFT)
- afterlt2[1].move_to(3*DOWN+4*LEFT)
+ afterlt.add_background_rectangle()
+ afterlt2 = TextMobject("Dimension of the vector space","changes to 0")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
afterlt2.scale(0.75)
- matrix = [[1,1],[1,1]]
+ afterlt2.add_background_rectangle()
+ matrix = [[0,0],[0,0]]
self.apply_matrix(matrix)
self.play(Write(afterlt))
self.play(Write(afterlt2))
self.wait()
- nullity = TextMobject("Hence, nullity = 1")
+ nullity = TextMobject("Hence, nullity = 2")
nullity.move_to(DOWN+4*LEFT)
self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
self.wait(1)
self.play(FadeOut(nullity))
+
+class RN_SameDim(LinearTransformationScene):
+ def construct(self):
+ self.setup()
+ self.wait()
+ predim = TextMobject("Let us look at another example")
+ predim.add_background_rectangle()
+ predim.move_to(DOWN+4*LEFT)
+ predim.scale(0.75)
+ self.play(Write(predim))
+ self.wait()
+ self.play(FadeOut(predim))
+ afterlt = TextMobject("After Linear transformation")
+ afterlt.move_to(DOWN+4*LEFT)
+ afterlt.scale(0.75)
+ afterlt.add_background_rectangle()
+ afterlt2 = TextMobject("Dimension of the vector space","remains to be 2")
+ afterlt2[0].move_to(1.5*DOWN+4*LEFT)
+ afterlt2[1].move_to(2*DOWN+4*LEFT)
+ afterlt2.scale(0.75)
+ afterlt2.add_background_rectangle()
+ matrix = [[1,1],[0,1]]
+ self.apply_matrix(matrix)
+ self.play(Write(afterlt))
+ self.play(Write(afterlt2))
+ self.wait()
+ nullity = TextMobject("Hence, nullity = 0")
+ nullity.move_to(DOWN+4*LEFT)
+ self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
+ self.wait(1)
+ self.play(FadeOut(nullity))
\ No newline at end of file
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
deleted file mode 100644
index 8f05ddd..0000000
--- a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2_RN_Theorem1.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from manimlib.imports import *
-class RN_Theorem1(LinearTransformationScene):
- def construct(self):
- self.setup()
- self.wait()
- square = Square(fill_color=BLACK, fill_opacity=1,color = BLUE)
- square.move_to(4*LEFT+4*DOWN)
- square.scale(4)
- self.play(ShowCreation(square))
- predim = TextMobject("Another One")
- predim.move_to(DOWN+4*LEFT)
- predim.scale(0.75)
- self.play(Write(predim))
- self.wait()
- self.play(FadeOut(predim))
- afterlt = TextMobject("After Linear transformation")
- afterlt.move_to(DOWN+4*LEFT)
- afterlt.scale(0.75)
- afterlt2 = TextMobject("Dimension of the vector space","changes to 0")
- afterlt2[0].move_to(2*DOWN+4*LEFT)
- afterlt2[1].move_to(3*DOWN+4*LEFT)
- afterlt2.scale(0.75)
- matrix = [[0,0],[0,0]]
- self.apply_matrix(matrix)
- self.play(Write(afterlt))
- self.play(Write(afterlt2))
- self.wait()
- nullity = TextMobject("Hence, nullity = 2")
- nullity.move_to(DOWN+4*LEFT)
- #afterlt.scale(0.75)
- self.play(FadeOut(afterlt),FadeOut(afterlt2),Write(nullity))
- self.wait(1)
- self.play(FadeOut(nullity))
--
cgit
From 1c8492c83d0b953c2e9f62f0ddb761c33b52b943 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Thu, 11 Jun 2020 17:43:42 +0530
Subject: updated after review
---
.../double-integrals/README.md | 8 +-
.../double-integrals/file1_area_under_func.gif | Bin 0 -> 1277788 bytes
.../double-integrals/file1_area_under_func.py | 73 +++++
.../double-integrals/file1_surface.gif | Bin 3365528 -> 0 bytes
.../double-integrals/file1_surface.py | 236 ----------------
.../double-integrals/file2_area_under_func.gif | Bin 1277788 -> 0 bytes
.../double-integrals/file2_area_under_func.py | 73 -----
.../file2_volume_under_surface.gif | Bin 0 -> 5460831 bytes
.../double-integrals/file2_volume_under_surface.py | 314 +++++++++++++++++++++
9 files changed, 391 insertions(+), 313 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif
delete mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif
create mode 100644 FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
(limited to 'FSF-2020')
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 fe4d73a..5fa2146 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,8 +1,8 @@
-**file1_surface**
-![file1_surface](https://github.com/panditsomnath10016git/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif)
+**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)
-**file2_area_under_func**
-![file2_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/file2_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)
**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)
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/file1_area_under_func.gif
new file mode 100644
index 0000000..223218b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.py
new file mode 100644
index 0000000..773840c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_area_under_func.py
@@ -0,0 +1,73 @@
+from manimlib.imports import *
+
+
+class AreaUnderIntegral(GraphScene):
+ CONFIG = {
+ "x_min" : 0,
+ "x_max" : 5,
+ "y_min" : 0,
+ "y_max" : 6,
+ "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
+
+ int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
+ area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
+
+ opening_text=VGroup(*[int_area_sym,area_mean_text])
+ self.play(Write(opening_text),run_time=4)
+ self.wait(2)
+ self.play(FadeOut(opening_text))
+
+ self.setup_axes(animate=True)
+ func= self.get_graph(self.Func, x_min=0,x_max=5)
+ self.curve=func
+
+ func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
+ min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
+ tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
+ max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
+ tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
+
+ # area = self.get_area(func,1,4)
+
+ self.play(ShowCreation(func), ShowCreation(func_text))
+
+ self.wait(2)
+ self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
+
+
+ approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
+ self.play(Write(approx_text))
+
+ rect_list = self.get_riemann_rectangles_list(
+ self.curve, 5,
+ max_dx = 0.25,
+ x_min = 1,
+ x_max = 4,
+ )
+ flat_graph = self.get_graph(lambda t : 0)
+ rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
+ for new_rects in rect_list:
+ new_rects.set_fill(opacity = 0.8)
+ rects.align_submobjects(new_rects)
+ for alt_rect in rects[::2]:
+ alt_rect.set_fill(opacity = 0)
+ self.play(Transform(
+ rects, new_rects,
+ run_time = 1.5,
+ lag_ratio = 0.5
+ ))
+ conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
+ self.play(Transform(approx_text,conclude_text))
+ self.wait(3)
+ int_area_sym.next_to(self.curve,IN)
+ self.play(Transform(conclude_text,int_area_sym))
+
+ # self.play(ShowCreation(area))
+ self.wait(3)
+
+#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif
deleted file mode 100644
index ae23a7b..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
deleted file mode 100644
index a794f46..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file1_surface.py
+++ /dev/null
@@ -1,236 +0,0 @@
-from manimlib.imports import *
-
-class SurfacesAnimation(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 8,
- "y_min": 0,
- "y_max": 8,
- "z_min": 0,
- "z_max": 6,
- "a":1 ,"b": 6, "c":2 , "d":6,
- "axes_shift":-3*OUT + 5*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_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 2+y/4+np.sin(x)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(distance=35,
- phi=80 * DEGREES,
- theta=-80 * DEGREES,
- )
-
- fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- R=TextMobject("R").set_color(BLACK).scale(3)
- R.move_to(self.axes.input_plane,IN)
- self.add(R)
-
- #get the surface
- surface= self.get_surface(
- self.axes, lambda x , y:
- self.Func(x,y)
- )
- surface.set_style(
- fill_opacity=0.8,
- fill_color=PINK,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.07)
- self.play(Write(surface))
- # self.play(LaggedStart(ShowCreation(surface)))
-
- self.get_lines()
- # self.play(FadeIn(self.axes.input_plane))
- self.wait(3)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.a,
- "u_max": axes.b,
- "v_min": axes.c,
- "v_max": axes.d,
- "resolution": (
- (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (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
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"RED"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- 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, RIGHT,
- about_point=axes.c2p(0, 0, 0),
- )
- axes.y_axis.rotate(
- 90 * DEGREES, UP,
- about_point=axes.c2p(0, 0, 0),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 0
- )
- input_plane.set_style(
- fill_opacity=0.5,
- fill_color=TEAL,
- stroke_width=0,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- 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 = [
- ("a", axes.a),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c),
- ("d", 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)
- 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.5)
- 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(), RIGHT)
- axes.z_axis.label = z_label
- for axis in axes:
- axis.add(axis.label)
- return axes
-
-
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif
deleted file mode 100644
index 223218b..0000000
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.gif and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
deleted file mode 100644
index 773840c..0000000
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_area_under_func.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from manimlib.imports import *
-
-
-class AreaUnderIntegral(GraphScene):
- CONFIG = {
- "x_min" : 0,
- "x_max" : 5,
- "y_min" : 0,
- "y_max" : 6,
- "Func":lambda x : 1+x**2*np.exp(-.15*x**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)
-
- int_area_sym=TextMobject("$$\int_{a}^b f(x)dx$$").shift(2*UP)
- area_mean_text = TextMobject(r"means area under the curve of $f(x)$ \\ in the region $a\leq x\leq b$").next_to(int_area_sym,DOWN)
-
- opening_text=VGroup(*[int_area_sym,area_mean_text])
- self.play(Write(opening_text),run_time=4)
- self.wait(2)
- self.play(FadeOut(opening_text))
-
- self.setup_axes(animate=True)
- func= self.get_graph(self.Func, x_min=0,x_max=5)
- self.curve=func
-
- func_text = TextMobject(r"$y = f(x)$").next_to(func,UP)
- min_lim = self.get_vertical_line_to_graph(1,func,DashedLine,color=YELLOW)
- tick_a=TextMobject(r"$a$").next_to(min_lim,DOWN)
- max_lim = self.get_vertical_line_to_graph(4,func,DashedLine,color=YELLOW)
- tick_b=TextMobject(r"$b$").next_to(max_lim,DOWN)
-
- # area = self.get_area(func,1,4)
-
- self.play(ShowCreation(func), ShowCreation(func_text))
-
- self.wait(2)
- self.play(ShowCreation(min_lim),Write(tick_a), ShowCreation(max_lim),Write(tick_b),run_time=0.5)
-
-
- approx_text=TextMobject(r"The area can be approximated as \\ sum of small rectangles").next_to(func,4*Y)
- self.play(Write(approx_text))
-
- rect_list = self.get_riemann_rectangles_list(
- self.curve, 5,
- max_dx = 0.25,
- x_min = 1,
- x_max = 4,
- )
- flat_graph = self.get_graph(lambda t : 0)
- rects = self.get_riemann_rectangles( flat_graph, x_min = 1, x_max = 4, dx = 0.5)
- for new_rects in rect_list:
- new_rects.set_fill(opacity = 0.8)
- rects.align_submobjects(new_rects)
- for alt_rect in rects[::2]:
- alt_rect.set_fill(opacity = 0)
- self.play(Transform(
- rects, new_rects,
- run_time = 1.5,
- lag_ratio = 0.5
- ))
- conclude_text=TextMobject(r"Making the rectangles infinitesimally thin \\ we get the real area under the curve.").next_to(func,4*Y)
- self.play(Transform(approx_text,conclude_text))
- self.wait(3)
- int_area_sym.next_to(self.curve,IN)
- self.play(Transform(conclude_text,int_area_sym))
-
- # self.play(ShowCreation(area))
- self.wait(3)
-
-#uploaded by Somnath Pandit.FSF2020_Double_Integral
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/file2_volume_under_surface.gif
new file mode 100644
index 0000000..74c306d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
new file mode 100644
index 0000000..cd4060b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
@@ -0,0 +1,314 @@
+from manimlib.imports import *
+
+class SurfacesAnimation(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 7,
+ "y_min": 0,
+ "y_max": 7,
+ "z_min": 0,
+ "z_max": 5,
+ "a":1 ,"b": 6, "c":2 , "d":6,
+ "axes_shift":-3*OUT + 5*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_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-100 * DEGREES,
+ )
+
+ fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ riemann_sum_text=TextMobject(r"The volume approximated as\\ sum of cuboids",color=BLUE)
+ riemann_sum_text.to_corner(UR,buff=.2)
+
+ R=TextMobject("R").set_color(BLACK).scale(3)
+ R.move_to(self.axes.input_plane,IN)
+ self.add(R)
+
+ #get the surface
+ surface= self.get_surface(
+ self.axes, lambda x , y:
+ self.Func(x,y)
+ )
+ surface.set_style(
+ fill_opacity=0.8,
+ fill_color=PINK,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.08)
+ self.play(Write(surface))
+ # self.add(surface)
+
+ self.get_lines()
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(riemann_sum_text)
+ self.play(Write(riemann_sum_text))
+ self.show_the_riemmann_sum(
+ lambda x,y : np.array([x,y,self.Func(x,y)]),
+ fill_opacity=1,
+ dl=.5,
+ start_color=BLUE,
+ end_color=BLUE_E,
+ )
+ self.play(FadeOut(surface))
+ self.wait(3)
+
+
+
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.a,
+ "u_max": axes.b,
+ "v_min": axes.c,
+ "v_max": axes.d,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (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
+ )
+
+ def get_lines(self):
+ axes = self.axes
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"#9CDCEB"))
+
+ labels=[
+ (axes.a,0,0),
+ (axes.b,0,0),
+ (0,axes.d,0),
+ (0,axes.c,0)
+ ]
+ self.region_corners[-1]=self.region_corners[0]
+ for start , end in zip(labels,self.region_corners):
+ lines.add(self.draw_lines(start,end,"WHITE"))
+
+ # self.add(lines)
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+
+ def show_the_riemmann_sum(
+ self,
+ surface,
+ x_min=None,
+ x_max=None,
+ y_min=None,
+ y_max=None,
+ dl=.5,
+ stroke_width=.5,
+ stroke_color=BLACK,
+ fill_opacity=1,
+ start_color=None,
+ end_color=None,
+ ):
+ x_min = x_min if x_min is not None else self.axes.a
+ x_max = x_max if x_max is not None else self.axes.b
+ y_min = y_min if y_min is not None else self.axes.c
+ y_max = y_max if y_max is not None else self.axes.d
+
+ if start_color is None:
+ start_color = BLUE
+ if end_color is None:
+ end_color = BLUE
+
+ cuboids = VGroup()
+ x_range = np.arange(x_min, x_max, dl)
+ y_range = np.arange(y_min, y_max, dl)
+ colors = color_gradient([start_color, end_color], len(x_range))
+ for x, color in zip(x_range, colors):
+ for y in y_range:
+ sample_base = np.array([x ,y ,0])
+ sample_base_dl = np.array([x + dl, y + dl,0])
+ sample_input = np.array([x +0.5*dl, y +0.5*dl,0])
+
+ base_point = self.axes.c2p(*sample_base)
+ base_dx_point = self.axes.c2p(*sample_base_dl)
+
+ surface_val= surface(*sample_input[:2])
+ surface_point = self.axes.c2p(*surface_val)
+
+ points = VGroup(*list(map(VectorizedPoint, [
+ base_point,
+ surface_point,
+ base_dx_point
+ ])))
+
+ # self.add(points)
+ cuboid = Prism(dimensions=[dl,dl,surface_val[-1]])
+ cuboid.replace(points, stretch=True)
+
+ cuboid.set_fill(color, opacity=fill_opacity)
+ cuboid.set_stroke(stroke_color, width=stroke_width)
+ cuboids.add(cuboid)
+
+ self.play(ShowCreation(cuboids),run_time=6)
+ # self.add(cuboids)
+
+
+#-------------------------------------------------------
+ #customize 3d axes
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ 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, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 0
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UL,UR)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ 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 = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", 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)
+ 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.5)
+ 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(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+
+
--
cgit
From 70f35b9f0b2f01ca60416fb24e8f4618cdd93735 Mon Sep 17 00:00:00 2001
From: Somnath Pandit
Date: Fri, 12 Jun 2020 18:41:59 +0530
Subject: more upgrade
---
.../file2_volume_under_surface.gif | Bin 5460831 -> 6614909 bytes
.../double-integrals/file2_volume_under_surface.py | 47 ++++++++++++++++++---
2 files changed, 41 insertions(+), 6 deletions(-)
(limited to 'FSF-2020')
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/file2_volume_under_surface.gif
index 74c306d..1455573 100644
Binary files a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif and b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
index cd4060b..38d41c6 100644
--- a/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
+++ b/FSF-2020/calculus-of-several-variables/integrals-of-multivariable-functions/double-integrals/file2_volume_under_surface.py
@@ -49,11 +49,19 @@ class SurfacesAnimation(ThreeDScene):
theta=-100 * DEGREES,
)
- fn_text=TextMobject("$z=f(x,y)$").set_color(PINK)
+ fn_text=TextMobject(
+ "$z=f(x,y)$",
+ color=PINK,
+ stroke_width=1.5
+ )
self.add_fixed_in_frame_mobjects(fn_text)
fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
- riemann_sum_text=TextMobject(r"The volume approximated as\\ sum of cuboids",color=BLUE)
+ riemann_sum_text=TextMobject(
+ r"The volume approximated as\\ sum of cuboids",
+ color=BLUE,
+ stroke_width=1.5
+ )
riemann_sum_text.to_corner(UR,buff=.2)
R=TextMobject("R").set_color(BLACK).scale(3)
@@ -73,7 +81,7 @@ class SurfacesAnimation(ThreeDScene):
)
- self.begin_ambient_camera_rotation(rate=0.08)
+ self.begin_ambient_camera_rotation(rate=0.06)
self.play(Write(surface))
# self.add(surface)
@@ -81,14 +89,42 @@ class SurfacesAnimation(ThreeDScene):
self.wait(1)
self.add_fixed_in_frame_mobjects(riemann_sum_text)
self.play(Write(riemann_sum_text))
- self.show_the_riemmann_sum(
+
+ cuboids1=self.show_the_riemmann_sum(
lambda x,y : np.array([x,y,self.Func(x,y)]),
fill_opacity=1,
dl=.5,
start_color=BLUE,
end_color=BLUE_E,
)
+ self.play(ShowCreation(cuboids1),run_time=5)
self.play(FadeOut(surface))
+
+ cuboids2=self.show_the_riemmann_sum(
+ lambda x,y : np.array([x,y,self.Func(x,y)]),
+ fill_opacity=1,
+ dl=.25,
+ start_color=BLUE,
+ end_color=BLUE_E,
+ )
+ self.play(ReplacementTransform(
+ cuboids1,
+ cuboids2
+ ))
+
+ cuboids3=self.show_the_riemmann_sum(
+ lambda x,y : np.array([x,y,self.Func(x,y)]),
+ fill_opacity=1,
+ dl=.1,
+ start_color=BLUE,
+ end_color=BLUE_E,
+ stroke_width=.1,
+ )
+ self.play(
+ FadeOut(cuboids2),
+ ShowCreation(cuboids3),
+ )
+
self.wait(3)
@@ -203,8 +239,7 @@ class SurfacesAnimation(ThreeDScene):
cuboid.set_stroke(stroke_color, width=stroke_width)
cuboids.add(cuboid)
- self.play(ShowCreation(cuboids),run_time=6)
- # self.add(cuboids)
+ return cuboids
#-------------------------------------------------------
--
cgit
From b8e2998bed20b074ccf0c4a35c9e4c97b1665361 Mon Sep 17 00:00:00 2001
From: Purusharth S
Date: Mon, 15 Jun 2020 18:57:05 +0530
Subject: add subfolder for surface/triple integrals
---
.../triple-and-surface-integrals/divergence-gauss-theorem/README.md | 0
.../triple-and-surface-integrals/flux/README.md | 0
.../triple-and-surface-integrals/strokes-theorem/README.md | 0
.../triple-and-surface-integrals/surface-integrals/README.md | 0
.../triple-and-surface-integrals/triple-integrals/README.md | 0
5 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/divergence-gauss-theorem/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..e69de29
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
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/strokes-theorem/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
new file mode 100644
index 0000000..e69de29
--
cgit
From 86deb2accb9645005fcf1ce078221bd265803ecb Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Mon, 15 Jun 2020 20:47:08 +0530
Subject: Create file1_projection.py
---
.../surface-integrals/file1_projection.py | 95 ++++++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
new file mode 100644
index 0000000..ec6e9a6
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
@@ -0,0 +1,95 @@
+from manimlib.imports import *
+
+class Surface(ThreeDScene):
+
+ def construct(self):
+ axes=ThreeDAxes()
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+
+ para_hyp = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2+u/4+np.sin(v)
+ ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
+ resolution=(15, 32)).scale(1)
+ para_hyp.scale(0.3)
+ para_hyp.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
+ para_hyp.rotate(PI,axis=RIGHT)
+ para_hyp.scale(2.5)
+ # para_hyp.rotate(PI/3.2,axis=OUT)
+ para_hyp2= ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2+u/4+np.sin(v)
+ ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
+ resolution=(15, 32)).scale(1)
+ para_hyp2.scale(0.3)
+ para_hyp2.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
+ para_hyp2.rotate(PI,axis=RIGHT)
+ para_hyp2.scale(2.5)
+
+ rec=Rectangle(height=2.11, width=1.58, color=RED, fill_opacity=0.66)
+ rec.shift(1.3*RIGHT + 2.295*DOWN)
+ # rec.scale(2.5)
+
+
+ l1=DashedLine(start=0.5*RIGHT+1.1*DOWN+1.55*OUT,end=0.5*RIGHT+1.1*DOWN)
+ l2=DashedLine(start=2.1*RIGHT+1.1*DOWN+1.25*OUT,end=2.1*RIGHT+1.1*DOWN)
+ l3=DashedLine(start=2.1*RIGHT+3.4*DOWN+1.6*OUT,end=2.1*RIGHT+3.4*DOWN)
+ l4=DashedLine(start=0.5*RIGHT+3.4*DOWN+2*OUT,end=0.5*RIGHT+3.4*DOWN)
+ l=VGroup(l1,l2,l3,l4)
+
+
+
+ s=TextMobject("S",tex_to_color_map={"S": YELLOW})
+ s.rotate(PI/4,axis=RIGHT)
+ s.rotate(PI/15,axis=OUT)
+ s.shift(RIGHT + 2*OUT + 1.5*DOWN)
+ d=TextMobject("D",tex_to_color_map={"D": YELLOW})
+ d.scale(0.85)
+ d.shift(1.26*RIGHT + 2.45*DOWN)
+
+
+
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-60*DEGREES)
+ # self.set_camera_orientation(phi=90 * DEGREES,theta=-82.7*DEGREES)
+ self.begin_ambient_camera_rotation(rate=-0.02)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.wait(1.3)
+ self.play(ShowCreation(para_hyp))
+ self.play(ShowCreation(s))
+ self.add(para_hyp2)
+ # self.play(ShowCreation(l))
+ self.play(Transform(para_hyp,rec),run_time=2)
+ # self.play(ShowCreation(rec))
+ # self.wait(0.7)
+
+ # # self.stop_ambient_camera_rotation()
+ # self.wait(1.2)
+ self.play(ShowCreation(d))
+
+ self.wait(3)
+
+
--
cgit
From 98dc4c2c1afd70cd2ebba867b5d238ebd2a3c5a2 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 09:58:34 +0530
Subject: Delete file1_projection.py
---
.../surface-integrals/file1_projection.py | 95 ----------------------
1 file changed, 95 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
deleted file mode 100644
index ec6e9a6..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
+++ /dev/null
@@ -1,95 +0,0 @@
-from manimlib.imports import *
-
-class Surface(ThreeDScene):
-
- def construct(self):
- axes=ThreeDAxes()
- x=TextMobject("X")
- y=TextMobject("Y")
- z=TextMobject("Z")
-
- x.rotate(PI/2, axis=RIGHT)
- x.rotate(PI/4,axis=OUT)
- x.shift(5.8*DOWN)
-
- y.rotate(PI/2, axis=RIGHT)
- y.rotate(PI/8,axis=OUT)
- y.shift(5.8*RIGHT)
-
- z.rotate(PI/2, axis=RIGHT)
- z.rotate(PI/5,axis=OUT)
- z.shift(3.2*OUT+0.4*LEFT)
- axis_label=VGroup(x,y,z)
-
-
-
-
-
- para_hyp = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 2+u/4+np.sin(v)
- ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
- resolution=(15, 32)).scale(1)
- para_hyp.scale(0.3)
- para_hyp.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
- para_hyp.rotate(PI,axis=RIGHT)
- para_hyp.scale(2.5)
- # para_hyp.rotate(PI/3.2,axis=OUT)
- para_hyp2= ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 2+u/4+np.sin(v)
- ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
- resolution=(15, 32)).scale(1)
- para_hyp2.scale(0.3)
- para_hyp2.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
- para_hyp2.rotate(PI,axis=RIGHT)
- para_hyp2.scale(2.5)
-
- rec=Rectangle(height=2.11, width=1.58, color=RED, fill_opacity=0.66)
- rec.shift(1.3*RIGHT + 2.295*DOWN)
- # rec.scale(2.5)
-
-
- l1=DashedLine(start=0.5*RIGHT+1.1*DOWN+1.55*OUT,end=0.5*RIGHT+1.1*DOWN)
- l2=DashedLine(start=2.1*RIGHT+1.1*DOWN+1.25*OUT,end=2.1*RIGHT+1.1*DOWN)
- l3=DashedLine(start=2.1*RIGHT+3.4*DOWN+1.6*OUT,end=2.1*RIGHT+3.4*DOWN)
- l4=DashedLine(start=0.5*RIGHT+3.4*DOWN+2*OUT,end=0.5*RIGHT+3.4*DOWN)
- l=VGroup(l1,l2,l3,l4)
-
-
-
- s=TextMobject("S",tex_to_color_map={"S": YELLOW})
- s.rotate(PI/4,axis=RIGHT)
- s.rotate(PI/15,axis=OUT)
- s.shift(RIGHT + 2*OUT + 1.5*DOWN)
- d=TextMobject("D",tex_to_color_map={"D": YELLOW})
- d.scale(0.85)
- d.shift(1.26*RIGHT + 2.45*DOWN)
-
-
-
-
- self.set_camera_orientation(phi=75 * DEGREES,theta=-60*DEGREES)
- # self.set_camera_orientation(phi=90 * DEGREES,theta=-82.7*DEGREES)
- self.begin_ambient_camera_rotation(rate=-0.02)
- self.play(ShowCreation(axes),ShowCreation(axis_label))
- self.wait(1.3)
- self.play(ShowCreation(para_hyp))
- self.play(ShowCreation(s))
- self.add(para_hyp2)
- # self.play(ShowCreation(l))
- self.play(Transform(para_hyp,rec),run_time=2)
- # self.play(ShowCreation(rec))
- # self.wait(0.7)
-
- # # self.stop_ambient_camera_rotation()
- # self.wait(1.2)
- self.play(ShowCreation(d))
-
- self.wait(3)
-
-
--
cgit
From 2c839dd7c15ee71ede8dd2cff5d65ff4cf047940 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 10:00:41 +0530
Subject: Create file1_projection.py
---
.../surface-integrals/file1_projection.py | 89 ++++++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
new file mode 100644
index 0000000..2d6f067
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file1_projection.py
@@ -0,0 +1,89 @@
+from manimlib.imports import *
+
+class Surface(ThreeDScene):
+
+ def construct(self):
+ axes=ThreeDAxes()
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+
+ para_hyp = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2+u/4+np.sin(v)
+ ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
+ resolution=(15, 32)).scale(1)
+ para_hyp.scale(0.3)
+ para_hyp.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
+ para_hyp.rotate(PI,axis=RIGHT)
+ para_hyp.scale(2.5)
+ # para_hyp.rotate(PI/3.2,axis=OUT)
+ para_hyp2= ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2+u/4+np.sin(v)
+ ]),v_min=-3,v_max=-0.4,u_min=-1,u_max=1,
+ resolution=(15, 32)).scale(1)
+ para_hyp2.scale(0.3)
+ para_hyp2.shift(1.2*RIGHT + 0.2*OUT + 0.4*DOWN)
+ para_hyp2.rotate(PI,axis=RIGHT)
+ para_hyp2.scale(2.5)
+
+ rec=Rectangle(height=2.11, width=1.58, color=RED, fill_opacity=0.66)
+ rec.shift(1.3*RIGHT + 2.295*DOWN)
+ # rec.scale(2.5)
+
+
+ l1=DashedLine(start=0.5*RIGHT+1.1*DOWN+1.55*OUT,end=0.5*RIGHT+1.1*DOWN)
+ l2=DashedLine(start=2.1*RIGHT+1.1*DOWN+1.25*OUT,end=2.1*RIGHT+1.1*DOWN)
+ l3=DashedLine(start=2.1*RIGHT+3.4*DOWN+1.6*OUT,end=2.1*RIGHT+3.4*DOWN)
+ l4=DashedLine(start=0.5*RIGHT+3.4*DOWN+2*OUT,end=0.5*RIGHT+3.4*DOWN)
+ l=VGroup(l1,l2,l3,l4)
+
+
+
+ s=TextMobject("S",tex_to_color_map={"S": YELLOW})
+ s.rotate(PI/4,axis=RIGHT)
+ s.rotate(PI/15,axis=OUT)
+ s.shift(RIGHT + 2*OUT + 1.5*DOWN)
+ d=TextMobject("D",tex_to_color_map={"D": YELLOW})
+ d.scale(0.85)
+ d.shift(1.26*RIGHT + 2.45*DOWN)
+
+
+
+
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-60*DEGREES)
+ self.begin_ambient_camera_rotation(rate=-0.02)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.wait(1.3)
+ self.play(ShowCreation(para_hyp))
+ self.play(ShowCreation(s))
+ self.add(para_hyp2)
+ self.play(Transform(para_hyp,rec),run_time=2)
+ self.play(ShowCreation(d))
+
+ self.wait(3)
+
+
--
cgit
From b7948a8f28bd0d0f3e1c9672bc4203667be6a7e8 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 10:14:23 +0530
Subject: projection
---
.../surface-integrals/Surface.gif | Bin 0 -> 14952521 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif
new file mode 100644
index 0000000..3516e33
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif differ
--
cgit
From 424365f9f93d086e869f55a3bd2598fe853db8aa Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 10:15:29 +0530
Subject: Delete Surface.gif
---
.../surface-integrals/Surface.gif | Bin 14952521 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif
deleted file mode 100644
index 3516e33..0000000
Binary files a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/Surface.gif and /dev/null differ
--
cgit
From 7a80a45a4989bd67133ac80c3c4748fceee66b40 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 10:24:27 +0530
Subject: file1_projection.gif
---
.../surface-integrals/projection.gif | Bin 0 -> 4142689 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif
new file mode 100644
index 0000000..c0ca611
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/projection.gif differ
--
cgit
From 0bd7ea716ac382cacb0be32ac1446303bf2de51d Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 12:57:36 +0530
Subject: Create file2_cube.py
---
.../surface-integrals/file2_cube.py | 75 ++++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py
new file mode 100644
index 0000000..2a094c8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file2_cube.py
@@ -0,0 +1,75 @@
+from manimlib.imports import*
+class cuber(ThreeDScene):
+
+ def construct(self):
+
+ axes=ThreeDAxes()
+ cube=Cube(color=RED)
+ # cube.scale(1)
+ cube.shift(RIGHT+DOWN+OUT)
+
+ sq1=Square(side_length=2,color=RED, fill_opacity=0.5)
+ sq1.shift(RIGHT+DOWN)
+ # sq1.scale(1.2)
+ sq2=Square(color=YELLOW, fill_opacity=0.5)
+ sq2.rotate(PI/2,axis=RIGHT)
+ sq2.shift(RIGHT+OUT)
+
+ sq3=Square(color=GREEN , fill_opacity=0.5)
+ sq3.rotate(PI/2, axis=UP)
+ sq3.shift(DOWN+OUT)
+
+ a=TextMobject("side A",tex_to_color_map={"side A": BLACK})
+ b=TextMobject("side B",tex_to_color_map={"side B": BLACK})
+ c=TextMobject("side C",tex_to_color_map={"side C": BLACK})
+ a.rotate(PI/2, axis=RIGHT)
+ a.shift(RIGHT+OUT+2*DOWN)
+ b.rotate(PI/2, axis=OUT)
+ b.rotate(PI/2, axis=UP)
+ b.shift(2*RIGHT+DOWN+OUT)
+ c.shift(RIGHT+DOWN+2*OUT)
+ c.rotate(PI/4, axis=OUT)
+
+
+ axes=ThreeDAxes()
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-67*DEGREES)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.play(ShowCreation(cube))
+ self.begin_ambient_camera_rotation(rate=0.04)
+ self.wait(0.7)
+ self.play(ShowCreation(sq1))
+ self.play(ShowCreation(sq2))
+
+ self.play(ShowCreation(sq3))
+ self.wait(0.6)
+ self.play(ShowCreation(a))
+
+ self.play(ShowCreation(b))
+ self.move_camera(phi=60*DEGREES,run_time=1)
+ self.play(ShowCreation(c))
+ self.wait(1)
+ self.wait(2)
+
+
--
cgit
From aa007ee624cdfc8c59d9ef04f8aeabff5b8fa540 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:00:11 +0530
Subject: Add files via upload
---
.../surface-integrals/cube.gif | Bin 0 -> 4624266 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif
new file mode 100644
index 0000000..2035d7a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/cube.gif differ
--
cgit
From c625cf88c4a32810bf6b87594f302ed8ec45edcc Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:03:26 +0530
Subject: Create file3_cube_sideC.py
---
.../surface-integrals/file3_cube_sideC.py | 96 ++++++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py
new file mode 100644
index 0000000..0e6fdaa
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file3_cube_sideC.py
@@ -0,0 +1,96 @@
+from manimlib.imports import*
+
+
+
+class cuber(ThreeDScene):
+
+ def construct(self):
+
+ axes=ThreeDAxes()
+ cube=Cube(color=RED)
+ # cube.scale(1)
+ cube.shift(RIGHT+DOWN+OUT)
+
+ sq1=Square(side_length=1.95,color=BLUE, fill_opacity=1)
+ sq1.shift(RIGHT+DOWN+2*OUT)
+ # sq1.scale(1.2)
+
+ sq12=Square(side_length=1.95,color=BLUE, fill_opacity=1)
+ sq12.shift(RIGHT+DOWN+2*OUT)
+
+ sq2=Square(side_length=1.95,color=RED, fill_opacity=0.6)
+ sq2.shift(RIGHT+DOWN)
+
+ sq2w=Square(side_length=1.95,color=WHITE, fill_opacity=0.9)
+ sq2w.shift(RIGHT+DOWN)
+
+
+ c=TextMobject("side C",tex_to_color_map={"side C": BLACK})
+
+ dxdy=TextMobject(r"$dxdy$",tex_to_color_map={r"$dxdy$": WHITE})
+ dxdy.scale(0.7)
+ dxdy.rotate(PI/2, axis=RIGHT)
+ dxdy.rotate(PI/7, axis=OUT)
+ dxdy.shift(0.85*RIGHT+0.65*DOWN)
+
+
+
+ c.shift(RIGHT+DOWN+2*OUT)
+ c.rotate(PI/4, axis=OUT)
+
+
+
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+ v=Vector(color=YELLOW)
+ # v.scale(2)
+ v.rotate(PI/2,axis=DOWN)
+ v.shift(0.4*RIGHT+0.9*DOWN+2.5*OUT)
+
+
+
+
+
+
+ self.set_camera_orientation(phi=60 * DEGREES,theta=-67*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.008)
+ self.add(axes)
+ self.add(axis_label)
+
+ self.add(cube)
+ # self.move_camera(phi=150*DEGREES,theta=-45*DEGREES, run_time=3)
+ self.wait(1.2)
+ self.add(sq1)
+ self.add(sq12)
+ self.play(ShowCreation(c))
+ self.wait(0.7)
+ self.play(FadeOut(cube))
+ self.wait(0.7)
+ # self.move_camera(phi=75*DEGREES,run_time=2)
+ self.play(ShowCreation(v))
+ self.wait(1)
+ self.play(Transform(sq1,sq2))
+ self.wait(0.7)
+ self.play(ApplyMethod(sq2w.scale, 0.08))
+ self.play(ShowCreation(dxdy))
+ self.wait(2)
+
+
+
+
+
--
cgit
From e9ef5b0d74c46ac33b48b435dc750ae11758334d Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:04:53 +0530
Subject: Add files via upload
---
.../surface-integrals/sideC.gif | Bin 0 -> 3483849 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif
new file mode 100644
index 0000000..17b72ff
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/sideC.gif differ
--
cgit
From 2cf9ea3801b9b0233a428a679f4274006b2ea472 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:07:41 +0530
Subject: Create file4_pauseandponder.py
---
.../surface-integrals/file4_pauseandponder.py | 77 ++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py
new file mode 100644
index 0000000..a8b5070
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_pauseandponder.py
@@ -0,0 +1,77 @@
+from manimlib.imports import *
+
+class Surface(ThreeDScene):
+ def construct(self):
+ axes=ThreeDAxes()
+ cylinder = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ v,
+ u
+ ]),
+ resolution=(6, 32)).fade(0.5) #Resolution of the surfaces
+
+
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+ cylinder.rotate(PI/2, axis=RIGHT)
+ cylinder.shift(2*RIGHT+OUT+DOWN)
+ cylinder.scale(1.5)
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-85*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.1)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.play(ShowCreation(cylinder))
+ # self.wait(0.7)
+
+
+
+ self.wait(2)
+ self.stop_ambient_camera_rotation()
+ self.wait(0.7)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--
cgit
From 92ea2d74d0d0d37e81a918857741c1daacede823 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:09:47 +0530
Subject: Add files via upload
---
.../surface-integrals/pauseandponder.gif | Bin 0 -> 1477023 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif
new file mode 100644
index 0000000..4308c60
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/pauseandponder.gif differ
--
cgit
From 93971fcabe8b15fbb124947c8322df4c3151a4a7 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:15:39 +0530
Subject: Create file1_flux_through_sphere.py
---
.../flux/file1_flux_through_sphere.py | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..e07715e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.py
@@ -0,0 +1,50 @@
+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
--
cgit
From 510a0387a035d5b9d8908c6db2dbf531568f1b6e Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:17:16 +0530
Subject: Add files via upload
---
.../flux/file1_flux_through_sphere.gif | Bin 0 -> 7695314 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..43327bf
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file1_flux_through_sphere.gif differ
--
cgit
From 52e633214992ecf0145815d8518e1acf5028c2de Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:19:53 +0530
Subject: Create file2_mobius_strip.py
---
.../flux/file2_mobius_strip.py | 81 ++++++++++++++++++++++
1 file changed, 81 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..31b1990
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.py
@@ -0,0 +1,81 @@
+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)
+
+
+
+
+
+
--
cgit
From 0d0ad18b69f002d27e34e90da4be1e80577d4293 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:23:08 +0530
Subject: Add files via upload
---
.../flux/file2_mobius_strip.gif | Bin 0 -> 20725583 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..9623046
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file2_mobius_strip.gif differ
--
cgit
From 8fbe4b485ce66790ba0e9e470617825e312cfea3 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:25:09 +0530
Subject: Create file3_normal_vector.py
---
.../flux/file3_normal_vector.py | 47 ++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py
new file mode 100644
index 0000000..a959210
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.py
@@ -0,0 +1,47 @@
+from manimlib.imports import *
+class S(ThreeDScene):
+ def construct(self):
+ axes=ThreeDAxes()
+
+ sphere=Sphere(radius=2,checkerboard_colors=[BLUE_C,BLUE_B],fill_opacity=0.75)
+
+
+ v1=Vector(color=YELLOW,buff=5)
+ v1.rotate(PI/4,axis=DOWN)
+ v1.shift(1.5*RIGHT+1.5*OUT)
+
+ v2=Vector(color=RED,buff=5)
+ v2.rotate(PI/4,axis=DOWN)
+ v2.rotate(PI,axis=DOWN)
+ v2.shift(0.77*RIGHT+0.77*OUT)
+
+
+
+
+ n1=TextMobject(r"$\vec{n}$",color=YELLOW)
+ n2=TextMobject(r"$-\vec{n}$",color= RED)
+ n1.rotate(PI/2,axis=RIGHT)
+ n1.shift(2*RIGHT+2*OUT)
+ n2.rotate(PI/2,axis=RIGHT)
+ n2.shift(0.42*RIGHT+0.42*OUT)
+
+
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-45*DEGREES)
+ # self.add(mobius)
+ # self.play(ShowCreation(axes))
+ self.play(ShowCreation(axes))
+ # self.play(ShowCreation(vg))
+ self.play(ShowCreation(sphere))
+ self.wait(0.7)
+ self.play(ShowCreation(v1, run_time=2))
+ self.play(ShowCreation(n1))
+ self.wait(1)
+ self.begin_ambient_camera_rotation(rate=0.65)
+ self.wait(2)
+ self.play(ShowCreation(v2, run_time=3))
+ self.wait(3)
+ self.play(ShowCreation(n2))
+
+ self.stop_ambient_camera_rotation()
+ self.wait(1.2)
--
cgit
From 89ea1c747bacfc073a052c36081bd1d2f2f0c199 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:28:59 +0530
Subject: Add files via upload
---
.../flux/file3_normal_vector.gif | Bin 0 -> 24776215 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif
new file mode 100644
index 0000000..a8f2990
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file3_normal_vector.gif differ
--
cgit
From 24a759834626921654aba1fbae74c70e3a3d7b1c Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:30:10 +0530
Subject: Add files via upload
---
.../flux/file4_cube_surface.gif | Bin 0 -> 3620201 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..c6101cf
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.gif differ
--
cgit
From 7f39c6fcf7990fafe53fe2aeb2c2f7bfd429b970 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 13:30:58 +0530
Subject: Create file4_cube_surface.py
---
.../flux/file4_cube_surface.py | 71 ++++++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..5963996
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
@@ -0,0 +1,71 @@
+from manimlib.imports import*
+
+
+
+class cuber(ThreeDScene):
+ def construct(self):
+
+ axes=ThreeDAxes()
+ cube=Cube()
+ # cube.scale(1)
+ cube.shift(RIGHT+DOWN+OUT)
+
+
+
+ sq3=Square(color=RED, fill_opacity=0.85)
+ sq3.rotate(PI/2, axis=UP)
+ sq3.shift(DOWN+OUT+2*RIGHT)
+
+ x=TextMobject("x")
+ y=TextMobject("y")
+ z=TextMobject("z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+ v1=Vector(color=YELLOW,buff=15)
+ v1.rotate(PI/4,axis=RIGHT)
+ v1.shift(2*RIGHT+1*DOWN+1*OUT)
+
+
+ n1=TextMobject(r"$\vec{n}$",color=YELLOW)
+ n1.scale(0.8)
+ n1.rotate(PI/2,axis=RIGHT)
+ n1.shift(3*RIGHT+1.3*OUT+DOWN)
+
+
+
+ self.set_camera_orientation(phi=75 * DEGREES,theta=-15*DEGREES)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.play(ShowCreation(cube, run_time=3))
+ self.begin_ambient_camera_rotation(rate=-0.2)
+ # self.move_camera(phi=150*DEGREES,theta=-45*DEGREES, run_time=3)
+ self.wait(1)
+ self.play(ShowCreation(sq3))
+
+ self.wait(1)
+ self.play(ShowCreation(v1),ShowCreation(n1))
+ self.wait(1)
+ self.stop_ambient_camera_rotation()
+ self.wait(2)
+
+
+ # self.play(Write(t1))
+ # self.play(Transform(vg,t1))
+ # self.wait(3)
+ # self.play(ReplacementTransform(t1,t2))
+ # self.wait(3)
+ # # self.move_camera(phi=50*DEGREES,theta=-45*DEGREES,run_time=3)
+ # self.wait(8)
+ # self.move_camera(phi=75 * DEGREES, run_time=3)
+ # self.wait(3)
--
cgit
From e864f0df8c444adc6b8bca088270c7d3dbe9fe4f Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:05:53 +0530
Subject: Create file1_3D_crossproduct.py
---
.../triple-integrals/file1_3D_crossproduct.py | 120 +++++++++++++++++++++
1 file changed, 120 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py
new file mode 100644
index 0000000..6720e7e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.py
@@ -0,0 +1,120 @@
+from manimlib.imports import*
+
+
+
+class TripleBox(ThreeDScene):
+
+ def construct(self):
+
+ axes=ThreeDAxes()
+ cube=Cube(fill_color=RED,fill_opacity=0.5)
+ cube.scale(0.5)
+ cube.shift(0.5*RIGHT+0.5*DOWN+0.5*OUT)
+ cube.shift(2*RIGHT+2*DOWN+1*OUT)
+
+
+
+ x=TextMobject("x")
+ y=TextMobject("y")
+ z=TextMobject("z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+ a=TextMobject("a")
+ b=TextMobject("b")
+ c=TextMobject("c")
+ d=TextMobject("d")
+ e=TextMobject("e")
+ f=TextMobject("f")
+
+
+
+ a.rotate(PI/2, axis=RIGHT)
+ a.rotate(PI/2, axis=OUT)
+ a.shift(2*DOWN+0.3*OUT+0.3*LEFT)
+
+ b.rotate(PI/2, axis=RIGHT)
+ b.rotate(PI/2, axis=OUT)
+ b.shift(3*DOWN+0.3*OUT+0.3*LEFT)
+
+
+ c.rotate(PI/2, axis=RIGHT)
+ c.shift(2*RIGHT+0.3*OUT)
+
+ d.rotate(PI/2, axis=RIGHT)
+ d.shift(3*RIGHT+0.3*OUT)
+
+
+ e.rotate(PI/2, axis=RIGHT)
+ e.rotate(PI/4, axis=OUT)
+ e.shift(1*OUT+0.3*DOWN+0.2*LEFT)
+
+
+ f.rotate(PI/2, axis=RIGHT)
+ f.rotate(PI/4, axis=OUT)
+ f.shift(2*OUT+0.3*DOWN+0.2*LEFT)
+
+
+
+ rec1=Rectangle(height=1, width=8,color=RED, fill_color=RED_C, fill_opacity=0.40)
+ rec1.shift(2.5*DOWN+4*RIGHT)
+
+ rec2=Rectangle(height=1, width=14,color=RED, fill_color=RED_C, fill_opacity=0.40)
+ rec2.rotate(PI/2, axis=OUT)
+ rec2.shift(7*DOWN+2.5*RIGHT)
+
+
+ sq=Square(color=RED,fill_opacity=60,side_length=1)
+ sq.shift(2.5*RIGHT+2.5*DOWN)
+
+
+
+ self.set_camera_orientation(phi=70 * DEGREES,theta=-70*DEGREES)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.begin_ambient_camera_rotation(rate=0.04)
+ self.play(ShowCreation(a),ShowCreation(b))
+ self.wait(0.5)
+ self.play(ShowCreation(rec1))
+ self.play(ShowCreation(c),ShowCreation(d))
+ self.play(ShowCreation(rec2))
+ self.add(sq)
+ self.wait(0.5)
+
+ self.play(FadeOut(rec1),FadeOut(rec2))
+ self.wait(1)
+
+ self.play(ShowCreation(e),ShowCreation(f))
+ self.wait(0.5)
+ self.play(ApplyMethod(sq.shift, 1*OUT))
+ self.wait(0.5)
+ self.play(Transform(sq,cube))
+
+
+ self.wait(0.5)
+
+
+
+ self.wait(0.5)
+
+
+
+
+ self.wait(3)
+ self.stop_ambient_camera_rotation()
+ self.wait(1.5)
+
+
--
cgit
From 77b42f3b1d14f810ffc7f3b836aa430707c41585 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:07:30 +0530
Subject: Add files via upload
---
.../triple-integrals/file1_3D_crossproduct.gif | Bin 0 -> 9073424 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif
new file mode 100644
index 0000000..9bde5a1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file1_3D_crossproduct.gif differ
--
cgit
From 0121373ea6a4f866838d94b864b2f9da27d0b8b5 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:09:59 +0530
Subject: Create file2_cylindrical_coordinates.py
---
.../file2_cylindrical_coordinates.py | 164 +++++++++++++++++++++
1 file changed, 164 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py
new file mode 100644
index 0000000..d441dc0
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.py
@@ -0,0 +1,164 @@
+from manimlib.imports import*
+class Cy(ThreeDScene):
+
+ def construct(self):
+
+ axes=ThreeDAxes()
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+
+
+
+ x1=TextMobject("$x_{1}$")
+ y1=TextMobject("$y_{1}$")
+ z1=TextMobject("$z_{1}$")
+
+
+
+
+ x1.rotate(PI/2, axis=RIGHT)
+ x1.rotate(PI/2, axis=OUT)
+ x1.shift(2*DOWN+0.3*OUT+0.3*LEFT)
+
+ y1.rotate(PI/2, axis=RIGHT)
+ y1.shift(2*RIGHT+0.3*OUT)
+
+ z1.rotate(PI/2, axis=RIGHT)
+ z1.rotate(PI/4, axis=OUT)
+ z1.shift(2*OUT+0.3*DOWN+0.2*LEFT)
+
+
+ d1=Dot(color=RED,radius=0.05)
+ d2=Dot(color=RED,radius=0.05)
+ d3=Dot(color=RED,radius=0.05)
+
+
+ d1.shift(2*DOWN)
+ d1.rotate(PI/2,axis=UP)
+
+ d2.rotate(PI/2, axis=RIGHT)
+ d2.shift(2*RIGHT)
+
+ d3.rotate(PI/2, axis=RIGHT)
+ d3.rotate(PI/4, axis=OUT)
+ d3.shift(2*OUT)
+
+
+
+ l1=DashedLine(color=RED)
+ l1.scale(5)
+ l1.shift(2*DOWN+5*RIGHT)
+
+ l2=DashedLine(color=RED)
+ l2.scale(5)
+ l2.rotate(PI/2, axis=IN)
+ l2.shift(2*RIGHT+5*DOWN)
+
+ l3=DashedLine(color=RED)
+ l3.scale(5)
+ l3.rotate(PI/4,axis=IN)
+ l3.shift(2*OUT+4*RIGHT+4*DOWN)
+
+ point=Sphere(radius=0.02, checkerboard_colors=[BLUE,BLUE])
+ point.shift(2*RIGHT+2*DOWN)
+
+ proj=Line()
+ proj.scale(1.414)
+ proj.rotate(PI/4,axis=IN)
+ proj.shift(1*RIGHT+1*DOWN)
+
+
+ projl=DashedLine()
+ projl.rotate(PI/2, axis=DOWN)
+ projl.shift(1*OUT+2*RIGHT+2*DOWN)
+
+ p=TextMobject("$P(x,y,z)$")
+ p.scale(0.6)
+ p.rotate(PI/2, axis=RIGHT)
+ p.rotate(PI/9, axis=OUT)
+ p.shift(2.9*RIGHT+2.5*DOWN+2.3*OUT)
+
+ rho=TextMobject(r"$\rho$",tex_to_color_map={r"$\rho$": YELLOW})
+ rho.rotate(PI/2, axis=RIGHT)
+ rho.shift(1.5*RIGHT+1.36*DOWN+0.2*OUT)
+
+
+
+
+ carrow=CurvedArrow(start_point=1*DOWN, end_point=0.5*RIGHT+0.5*DOWN)
+
+
+ phi=TextMobject(r"$\phi$",tex_to_color_map={"$\phi$": YELLOW})
+ phi.scale(0.93)
+ phi.rotate(PI/2, axis=RIGHT)
+ phi.shift(0.3*RIGHT+1.3*DOWN)
+
+
+
+
+
+
+
+
+
+
+ self.set_camera_orientation(phi=70 * DEGREES,theta=-15*DEGREES)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.begin_ambient_camera_rotation(rate=-0.1)
+
+ self.play(ShowCreation(x1),ShowCreation(d1))
+ self.wait(0.5)
+ self.play(ShowCreation(l1))
+ self.wait(1)
+ self.play(ShowCreation(y1),ShowCreation(d2))
+ self.wait(0.5)
+ self.play(ShowCreation(l2))
+ self.wait(1)
+ self.add(point)
+ self.wait(0.5)
+ self.play(FadeOut(l1),FadeOut(l2))
+ self.wait(0.5)
+ self.play(ShowCreation(proj))
+ self.wait(0.64)
+ self.stop_ambient_camera_rotation()
+ self.play(ShowCreation(rho))
+ self.wait(1)
+
+ self.play(ShowCreation(z1),ShowCreation(d3))
+ self.wait(0.5)
+ self.play(ShowCreation(l3))
+ self.wait(1)
+ self.play(ApplyMethod(point.shift, 2*OUT), ShowCreation(projl))
+ self.play(FadeOut(l3))
+ self.play(ShowCreation(p),FadeOut(projl))
+ self.wait(0.5)
+ # self.play(ShowCreation(vec))
+
+
+
+
+
+ self.wait(1)
+ self.play(ShowCreation(carrow),ShowCreation(phi))
+
+ self.wait(5)
+
+
--
cgit
From 733599437e0f743b4d40c2d48fe797c6d0fe0ab1 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:11:18 +0530
Subject: Add files via upload
---
.../file2_cylindrical_coordinates.gif | Bin 0 -> 6912988 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif
new file mode 100644
index 0000000..e913750
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif differ
--
cgit
From 7dc1cb63c5cb7eb67d121784ae261d2b1160ca53 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:12:38 +0530
Subject: Create file2_spherical_coordinates.py
---
.../file2_spherical_coordinates.py | 159 +++++++++++++++++++++
1 file changed, 159 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py
new file mode 100644
index 0000000..7dcc81a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.py
@@ -0,0 +1,159 @@
+from manimlib.imports import*
+class Sp(ThreeDScene):
+
+ def construct(self):
+
+ axes=ThreeDAxes()
+ x=TextMobject("X")
+ y=TextMobject("Y")
+ z=TextMobject("Z")
+
+ x.rotate(PI/2, axis=RIGHT)
+ x.rotate(PI/4,axis=OUT)
+ x.shift(5.8*DOWN)
+
+ y.rotate(PI/2, axis=RIGHT)
+ y.rotate(PI/8,axis=OUT)
+ y.shift(5.8*RIGHT)
+
+ z.rotate(PI/2, axis=RIGHT)
+ z.rotate(PI/5,axis=OUT)
+ z.shift(3.2*OUT+0.4*LEFT)
+ axis_label=VGroup(x,y,z)
+
+
+
+
+
+
+
+ x1=TextMobject("$x_{1}$")
+ y1=TextMobject("$y_{1}$")
+ z1=TextMobject("$z_{1}$")
+
+
+
+
+ x1.rotate(PI/2, axis=RIGHT)
+ x1.rotate(PI/2, axis=OUT)
+ x1.shift(2*DOWN+0.3*OUT+0.3*LEFT)
+
+ y1.rotate(PI/2, axis=RIGHT)
+ y1.shift(2*RIGHT+0.3*OUT)
+
+ z1.rotate(PI/2, axis=RIGHT)
+ z1.rotate(PI/4, axis=OUT)
+ z1.shift(2*OUT+0.3*DOWN+0.2*LEFT)
+
+
+ d1=Dot(color=RED,radius=0.05)
+ d2=Dot(color=RED,radius=0.05)
+ d3=Dot(color=RED,radius=0.05)
+
+
+ d1.shift(2*DOWN)
+ d1.rotate(PI/2,axis=UP)
+
+ d2.rotate(PI/2, axis=RIGHT)
+ d2.shift(2*RIGHT)
+
+ d3.rotate(PI/2, axis=RIGHT)
+ d3.rotate(PI/4, axis=OUT)
+ d3.shift(2*OUT)
+
+
+
+ l1=DashedLine(color=RED)
+ l1.scale(5)
+ l1.shift(2*DOWN+5*RIGHT)
+
+ l2=DashedLine(color=RED)
+ l2.scale(5)
+ l2.rotate(PI/2, axis=IN)
+ l2.shift(2*RIGHT+5*DOWN)
+
+ l3=DashedLine(color=RED)
+ l3.scale(5)
+ l3.rotate(PI/4,axis=IN)
+ l3.shift(2*OUT+4*RIGHT+4*DOWN)
+
+ point=Sphere(radius=0.02, checkerboard_colors=[RED,RED])
+
+
+ proj=DashedLine(color=RED_C)
+ proj.scale(1.414)
+ proj.rotate(PI/4,axis=IN)
+ proj.shift(1*RIGHT+1*DOWN)
+
+
+ projl=DashedLine()
+ projl.rotate(PI/2, axis=UP)
+ projl.shift(1*OUT+2*RIGHT+2*DOWN)
+
+ p=TextMobject("$P(x,y,z)$")
+ p.scale(0.6)
+ p.rotate(PI/2, axis=RIGHT)
+ p.rotate(PI/9, axis=OUT)
+ p.shift(2.65*RIGHT+2.5*DOWN+2.3*OUT)
+
+ rho=TextMobject(r"$\rho$",tex_to_color_map={r"$\rho$": YELLOW})
+ rho.rotate(PI/2, axis=RIGHT)
+ rho.shift(1.45*RIGHT+1.9*DOWN+1.94*OUT)
+
+
+
+
+
+ carrow=ArcBetweenPoints(start=1*DOWN, end=0.5*RIGHT+0.5*DOWN)
+ carrow2=ArcBetweenPoints(start=0.5*RIGHT+0.5*DOWN+0.5*OUT, end=0.4*OUT)
+ # carrow2.rotate(PI/2, axis=LEFT)
+ # carrow2.rotate(PI/2, axis=UP)
+
+ theta=TextMobject(r"$\theta$",tex_to_color_map={r"$\theta$": YELLOW})
+ theta.shift((0.75*OUT+0.2*RIGHT))
+ theta.rotate(PI/2,axis=RIGHT)
+ theta.scale(0.9)
+
+
+
+
+ phi=TextMobject(r"$\phi$",tex_to_color_map={"$\phi$": YELLOW})
+ phi.scale(0.93)
+ phi.rotate(PI/2, axis=RIGHT)
+ phi.shift(0.42*RIGHT+1.3*DOWN)
+
+
+
+
+
+
+
+
+
+
+ self.set_camera_orientation(phi=70 * DEGREES,theta=-85*DEGREES)
+ self.play(ShowCreation(axes),ShowCreation(axis_label))
+ self.begin_ambient_camera_rotation(rate=0.009)
+ self.wait(1)
+ self.add(point)
+ self.play(ApplyMethod(point.shift, 2*RIGHT+2*DOWN+2*OUT))
+ self.wait(0.5)
+ self.play(ShowCreation(p))
+ self.wait(0.5)
+ self.play(ShowCreation(vec),ShowCreation(rho))
+ self.wait(1.5)
+ self.play(ApplyMethod(point.shift,2*IN), ShowCreation(projl))
+ self.wait(1)
+ self.play(ShowCreation(proj))
+ self.wait(1.2)
+ self.play(ShowCreation(carrow))
+ self.wait(0.64)
+ self.play(ShowCreation(phi))
+ self.wait(1.3)
+ self.play(ShowCreation(carrow2))
+ self.wait(0.5)
+ self.play(ShowCreation(theta))
+ self.wait(3)
+
+
+
--
cgit
From 9b47c1d47127fcec2796fb2ba1ece09cc967f327 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Tue, 16 Jun 2020 16:14:26 +0530
Subject: Add files via upload
---
.../file2_cylindrical_coordinates.gif | Bin 6912988 -> 7158240 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif
index e913750..6dc8b17 100644
Binary files a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif differ
--
cgit
From 37df72d2560c94ca34bb480d65d86ca78f90bbb8 Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Wed, 17 Jun 2020 16:17:50 +0530
Subject: Orthonormal basis
---
.../Orthonormal Basis/file1_orthogonal.py | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py
new file mode 100755
index 0000000..b400f93
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py
@@ -0,0 +1,34 @@
+from manimlib.imports import *
+
+class Orthogonal(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.play(ShowCreation(axes))
+ self.move_camera(phi=30*DEGREES,theta=-45*DEGREES,run_time=3)
+ line1 = Line(start = ORIGIN,end = -3*LEFT)
+ line1.set_color(DARK_BLUE)
+ tip1 = Polygon(-LEFT,-0.8*LEFT-0.2*DOWN,-0.8*LEFT-0.2*UP)
+ tip1.move_to(-3*LEFT)
+ tip1.set_opacity(1)
+ tip1.set_fill(DARK_BLUE)
+ tip1.set_color(DARK_BLUE)
+
+ arrow2 = Line(start = ORIGIN,end = -3*UP)
+ arrow2.set_color(DARK_BLUE)
+ tip2 = Polygon(DOWN,0.8*DOWN-0.2*RIGHT,0.8*DOWN-0.2*LEFT)
+ tip2.move_to(3*DOWN)
+ tip2.set_opacity(1)
+ tip2.set_fill(DARK_BLUE)
+ tip2.set_color(DARK_BLUE)
+ arrow2.set_color(DARK_BLUE)
+
+ arrow3 = Line(start = ORIGIN,end = [0,0,3])
+ arrow3.set_color(DARK_BLUE)
+ tip3 = Polygon([0,0,3],[0,0,2.8]-0.2*RIGHT,[0,0,2.8]-0.2*LEFT)
+ tip3.set_opacity(1)
+ tip3.set_fill(DARK_BLUE)
+ tip3.set_color(DARK_BLUE)
+
+ self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), ShowCreation(arrow3), ShowCreation(tip3))
+
+ self.wait()
\ No newline at end of file
--
cgit
From 86d4b8658d61c2823187b1353bb06c0daebec7ae Mon Sep 17 00:00:00 2001
From: Archit Sangal
Date: Thu, 18 Jun 2020 00:26:37 +0530
Subject: Second File added
---
.../Orthonormal Basis/file2_OrthonormalBasis.py | 82 ++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_OrthonormalBasis.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_OrthonormalBasis.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_OrthonormalBasis.py
new file mode 100644
index 0000000..0a28f22
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_OrthonormalBasis.py
@@ -0,0 +1,82 @@
+from manimlib.imports import *
+class OrthonormalBasis(GraphScene):
+ CONFIG = {
+ "x_min" : -6,
+ "x_max" : 6,
+ "y_min" : -4,
+ "y_max" : 4,
+ "graph_origin" : ORIGIN ,
+}
+
+ def construct(self):
+ self.setup_axes(animate=True)
+
+ XTD = self.x_axis_width/(self.x_max-self.x_min)
+ YTD = self.y_axis_height/(self.y_max-self.y_min)
+
+ arrow1 = Arrow(start = ORIGIN,end = 0.707*YTD*UP+0.707*XTD*RIGHT)
+ arrow1.scale(2.25)
+ arrow1.set_color(DARK_BLUE)
+
+ arrow2 = Arrow(start = ORIGIN,end = 0.707*YTD*UP+0.707*XTD*LEFT)
+ arrow2.scale(2.25)
+ arrow2.set_color(DARK_BLUE)
+
+ square = Polygon(UP*0.4*YTD,0.2*(YTD*UP+XTD*RIGHT),ORIGIN,0.2*(YTD*UP+XTD*LEFT))
+ square.set_color(DARK_BLUE)
+ self.play(ShowCreation(arrow2), ShowCreation(arrow1), ShowCreation(square))
+
+ ortho = TextMobject("Orthonormal Vectors")
+ ortho.scale(0.75)
+ ortho.move_to(DOWN+3*RIGHT)
+ self.play(Write(ortho))
+ self.wait()
+ self.play(FadeOut(ortho))
+
+ arrow3 = Arrow(start = ORIGIN,end = YTD*3*UP+XTD*LEFT)
+ arrow3.scale(1.25)
+ arrow3.set_color(GOLD_E)
+ self.play(ShowCreation(arrow3))
+
+ arrow4 = Arrow(start = ORIGIN,end = YTD*UP+XTD*RIGHT)
+ arrow4.scale(1.8)
+ arrow4.set_color(GOLD_A)
+
+ arrow5 = Arrow(start = ORIGIN,end = 2*YTD*UP-2*XTD*RIGHT)
+ arrow5.scale(1.3)
+ arrow5.set_color(GOLD_A)
+
+ self.play(ShowCreation(arrow5), ShowCreation(arrow4))
+
+ self.wait()
+
+ self.play(FadeOut(arrow1), FadeOut(arrow2), FadeOut(square))
+
+ self.wait()
+
+ text1 = TextMobject(r"$ v_1$")
+ text1.move_to(UP+2*RIGHT)
+ text1.scale(0.75)
+ text2 = TextMobject(r"$ v_2$")
+ text2.move_to(UP+3*LEFT)
+ text2.scale(0.75)
+
+ text3 = TextMobject("v")
+ text3.move_to(YTD*3.5*UP+XTD*1.5*LEFT)
+
+ self.play(Write(text1), Write(text2), Write(text3))
+ self.wait()
+
+ line1 = DashedLine(start = YTD*UP+XTD*RIGHT, end = YTD*3*UP+XTD*1*LEFT)
+ line2 = DashedLine(start = YTD*2*UP+XTD*2*LEFT, end = YTD*3*UP+XTD*1*LEFT)
+ self.play(ShowCreation(line1),ShowCreation(line2))
+
+ self.wait()
+
+ text = TextMobject(r"$v$ is the sum of projections","on the orthonormal vectors")
+ text[0].move_to(DOWN+3.2*RIGHT)
+ text[1].move_to(1.5*DOWN+3.2*RIGHT)
+ self.play(Write(text))
+ self.wait(2)
+ self.play(FadeOut(arrow3), FadeOut(arrow4), FadeOut(arrow5), FadeOut(text1), FadeOut(text2), FadeOut(text3), FadeOut(self.axes), FadeOut(line1), FadeOut(line2))
+ self.play(FadeOut(text))
--
cgit
From c6da725924409e6a92cff4f51d6ce17ce256b078 Mon Sep 17 00:00:00 2001
From: Purusharth Saxena
Date: Thu, 18 Jun 2020 19:58:03 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
index e69de29..df307cd 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
@@ -0,0 +1,2 @@
+**Test**
+![Cube](cube.gif)
--
cgit
From dc011b107053e153125cbbec7b552b11fb8f6eac Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:39:52 +0530
Subject: Create README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
new file mode 100644
index 0000000..21a651d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
@@ -0,0 +1,2 @@
+**Test**
+![Cube](cube.gif)
--
cgit
From 67c15fdb095642f7c15350ea44dc21be41ec23e1 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:41:32 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
index 21a651d..cd0229d 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
@@ -1,2 +1,4 @@
**Test**
![Cube](cube.gif)
+**file1_projection**
+![file1_projection](projection.gif)
--
cgit
From b1bdec60ab1d23d2d122c2fe048885e6da91bc60 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:41:57 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
index cd0229d..0b0c49a 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
@@ -1,4 +1,4 @@
**Test**
![Cube](cube.gif)
-**file1_projection**
+**file1_projection.py**
![file1_projection](projection.gif)
--
cgit
From 78876d4144dbdab44c0465e7e7bdb9f45ea6b03c Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:44:19 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
index 0b0c49a..a4a1c84 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
@@ -1,4 +1,8 @@
-**Test**
-![Cube](cube.gif)
**file1_projection.py**
![file1_projection](projection.gif)
+**file2_cube.py**
+![file2_cube](cube.gif)
+**file3_cube_sideC.py**
+![file3_cube_sideC](sideC.gif)
+**file4_pauseandponder.py**
+![file4_pauseandponder](pauseandponder.gif)
--
cgit
From cfda5496fd6cfdb9362e7fae7f1f6e33a5722ebe Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:53:19 +0530
Subject: Create README.md
---
.../triple-and-surface-integrals/triple-integrals/README.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
new file mode 100644
index 0000000..0cebf40
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
@@ -0,0 +1,4 @@
+**file1_3D_crossproduct.py**
+![file1_3D_crossproduct](file1_3D_crossproduct.gif)
+**file2_cylindrical_coordinates.py**
+![file2_cylindrical_coordinates](file2_cylindrical_coordinates.gif)
--
cgit
From 54fe05a46a6bb3804bcffbcc33736495f0bf6777 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:57:51 +0530
Subject: Add files via upload
---
.../triple-integrals/file2_spherical_coordinates.gif | Bin 0 -> 7158240 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif
new file mode 100644
index 0000000..6dc8b17
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_spherical_coordinates.gif differ
--
cgit
From d428459e270e679332c959d145887633c4995933 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 11:59:05 +0530
Subject: Add files via upload
---
.../file2_cylindrical_coordinates.gif | Bin 7158240 -> 6912988 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif
index 6dc8b17..e913750 100644
Binary files a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/file2_cylindrical_coordinates.gif differ
--
cgit
From de57f920feba53b088da52ed61999ea25fd74206 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 12:01:50 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/triple-integrals/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
index 0cebf40..2166a79 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/triple-integrals/README.md
@@ -2,3 +2,5 @@
![file1_3D_crossproduct](file1_3D_crossproduct.gif)
**file2_cylindrical_coordinates.py**
![file2_cylindrical_coordinates](file2_cylindrical_coordinates.gif)
+**file2_spherical_coordinates.py**
+![file2_spherical_coordinates](file2_spherical_coordinates.gif)
--
cgit
From a896e8b74b1b4864f24d860ea82e4de46d2ff2c7 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Fri, 19 Jun 2020 12:05:35 +0530
Subject: Create README.md
---
.../triple-and-surface-integrals/flux/README.md | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
(limited to 'FSF-2020')
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
new file mode 100644
index 0000000..0af7aa1
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/README.md
@@ -0,0 +1,8 @@
+**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)
+**file3_normal_vector.py**
+![file3_normal_vector](file3_normal_vector.gif)
+**file4_cube_surface.py**
+![file4_cube_surface](file4_cube_surface.gif)
--
cgit
From c8177571dd518e95dfbaab70ab06f2584a42b9ce Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Fri, 19 Jun 2020 15:33:32 +0530
Subject: post-review updates
---
.../geometry-of-planes-and-curves/README.md | 9 ++
.../file1_simple_visualization.py | 51 ++++++++++++
.../file2_circle_curvature.py | 27 ++++++
.../file3_curvature_intuition.gif | Bin 0 -> 271189 bytes
.../__pycache__/file1_line_eqn.cpython-38.pyc | Bin 0 -> 1541 bytes
.../file4_point_normal_form_plane.cpython-38.pyc | Bin 0 -> 2225 bytes
.../file1_line_eqn.py | 26 ++++++
.../file2_point_normal_form_plane.py | 39 +++++++++
.../file3_intercept_form_plane.gif | Bin 0 -> 2884416 bytes
.../file3_intercept_form_plane.py | 29 +++++++
.../file4_3d_plane.gif | Bin 0 -> 2037923 bytes
.../file4_3d_plane.py | 49 +++++++++++
.../file5_vector_form_line.py | 47 +++++++++++
.../file1_parametric_circle.cpython-38.pyc | Bin 0 -> 3089 bytes
.../file4_helix_visualization.cpython-38.pyc | Bin 0 -> 1506 bytes
.../file1_parametric_circle.py | 78 ++++++++++++++++++
.../general-parametric-curves/file2_cycloid.gif | Bin 0 -> 13674 bytes
.../file2_cycloid_manim.gif | Bin 0 -> 1313411 bytes
.../file2_cycloid_manim.py | 46 +++++++++++
.../file3_brachistochrone.gif | Bin 0 -> 122838 bytes
.../file3_brachistochrone.py | 13 +++
.../file4_helix_visualization.py | 31 +++++++
.../file1_parametric_ellipse.cpython-38.pyc | Bin 0 -> 3102 bytes
.../file2_parametric_helix.cpython-38.pyc | Bin 0 -> 3575 bytes
.../file3_circletosphere.cpython-38.pyc | Bin 0 -> 1843 bytes
.../__pycache__/file3_cone.cpython-38.pyc | Bin 0 -> 1499 bytes
.../space-curves/file1_parametric_ellipse.py | 78 ++++++++++++++++++
.../space-curves/file2_parametric_helix.py | 91 +++++++++++++++++++++
.../space-curves/file3_circletosphere.py | 45 ++++++++++
.../space-curves/file4_cone.py | 33 ++++++++
.../file1_prescribed_plane.gif | Bin 0 -> 163202 bytes
.../file2_TNB_frame.gif | Bin 0 -> 150050 bytes
.../file2_tangent_spaceCurve.cpython-38.pyc | Bin 0 -> 1429 bytes
.../file1_smooth_curves.gif | Bin 0 -> 1541515 bytes
.../file2_tangent_space_curve.py | 22 +++++
35 files changed, 714 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
index e69de29..c3db80a 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
@@ -0,0 +1,9 @@
+This repository contains the codes written by [Saarth Deshpande](https://github.com/saarthdeshpande) during the course of FOSSEE Summer Fellowship 2020 under the Floss: Mathematics using Python.
+
+__Sub-topics covered__:
+* Equations of Planes and Lines
+* General Parametric Curves
+* Space Curves (an Intro to Coordinates in 3D)
+* Velocity and Differentiability
+* Finding Arc Length and Curvature
+* TNB Frame and Serret-Frenet Formulae
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
new file mode 100644
index 0000000..0ae283a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
@@ -0,0 +1,51 @@
+from manimlib.imports import *
+
+class randomcurve(GraphScene):
+ CONFIG = {
+ "x_min": -4,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 10,
+ "graph_origin": ORIGIN
+ }
+ def construct(self):
+ intro = TextMobject('Consider the following curve.')
+ mid = TextMobject(r'Notice how the direction of the unit tangent vectors\\changes with respect to the arc length.')
+ outro = TextMobject(r'This is called curvature.\\Mathematically, curvature $ = k = \left|{\frac{dT}{ds}}\right|$')
+
+ 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(hideaxes=True)
+ graphobj = self.get_graph(self.curve)
+ self.play(FadeIn(intro))
+ self.wait(2)
+ self.play(FadeOut(intro))
+ self.setup_axes(hideaxes=False)
+ self.play(ShowCreation(graphobj))
+ self.wait(1)
+ self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid))
+ self.wait(2)
+ self.play(FadeOut(mid))
+ self.play(FadeIn(self.axes), FadeIn(graphobj))
+
+ tgt1 = Arrow((-2.2*XTD,-0.5*YTD,0),(-1*XTD,1,0))
+ tgt2 = Arrow((-1.2*XTD, 1.93*YTD,0),(0*XTD,1.6,0)).scale(1.2)
+ tgt3 = Arrow((-0.3*XTD,3*YTD, 0), (1.5*XTD, 3*YTD,0))
+ tgt4 = Arrow((1.4*XTD, 2*YTD,0),(2.4*XTD, 1*YTD,0)).scale(2.8)
+
+ tangents = [tgt1, tgt2, tgt3, tgt4]
+ for tangent in tangents:
+ self.play(ShowCreation(tangent))
+ self.wait(1)
+ tangents = VGroup(*tangents)
+ self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents))
+ self.wait(1)
+ self.play(FadeIn(outro))
+ self.wait(2)
+ self.play(FadeOut(outro))
+ self.wait(1)
+
+
+ def curve(self, x):
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
new file mode 100644
index 0000000..232ac41
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
@@ -0,0 +1,27 @@
+from manimlib.imports import *
+
+class circleC(GraphScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 6,
+ "graph_origin": ORIGIN,
+ "x_axis_width": 12,
+ "y_axis_height": 12
+ }
+ def construct(self):
+ epiphany = TextMobject(r'Driving a vehicle on which of \\ the two paths would be easier?').scale(0.6).shift(3.5*LEFT + 3*UP)
+ outro = TextMobject(r'The larger path, due to its \\ smaller curvature, since $k = \frac{1}{R}$.').scale(0.6).shift(3.7*LEFT + 3*UP)
+ XTD = self.x_axis_width/(self.x_max- self.x_min)
+ YTD = self.y_axis_height/(self.y_max- self.y_min)
+
+ circle = Circle(radius = 2, color = BLUE)
+ circle2 = Circle(radius = 3, color = GREEN_E)
+
+ self.setup_axes(hideaxes=True)
+ self.play(FadeIn(self.axes), Write(circle, run_time = 2), FadeIn(epiphany))
+ self.play(Write(circle2, run_time = 3))
+ self.play(ReplacementTransform(epiphany, outro))
+ self.wait(2)
+ self.play(FadeOut(VGroup(*[self.axes, circle, circle2, epiphany, outro])))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif
new file mode 100644
index 0000000..0d6fdcf
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc
new file mode 100644
index 0000000..e129d1d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc
new file mode 100644
index 0000000..88377bb
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.py
new file mode 100644
index 0000000..402775b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.py
@@ -0,0 +1,26 @@
+from manimlib.imports import *
+
+class three(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.set_camera_orientation(phi=14.25* DEGREES,theta=0*DEGREES,distance=8)
+ self.play(FadeIn(axes))
+
+ plane = ParametricSurface(
+ lambda u,v: np.array([
+ 6,
+ 8*v,
+ 3*u
+ ]), u_min = -0.8, u_max = 0.8, fill_opacity = 0.4).rotate(45*DEGREES).move_to(ORIGIN).shift(RIGHT+UP)
+ d2text = TextMobject(r'$\mathbb{R}^{2}: y = mx + c$').shift(3*LEFT + 2*UP).rotate(np.pi/2)
+ d3text = TextMobject(r'$\mathbb{R}^{3}: y = mx + c$').shift(4*RIGHT+3*UP)
+ self.play(FadeIn(plane), FadeIn(d2text))
+ self.wait(3)
+ self.play(FadeOut(d2text))
+ self.move_camera(phi = 60*DEGREES, theta=45*DEGREES,run_time=3)
+ self.begin_ambient_camera_rotation(rate=0.02)
+ self.add_fixed_in_frame_mobjects(d3text)
+ self.play(FadeIn(d3text))
+ self.wait(3)
+ self.play(FadeOut(d3text), FadeOut(plane), FadeOut(axes))
+ self.wait()
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.py
new file mode 100644
index 0000000..122a9ff
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.py
@@ -0,0 +1,39 @@
+from manimlib.imports import *
+
+class pointnormal(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+ normal = Arrow((0,-0.15,-0.25), (-3,0,3), color = YELLOW)
+ plane1 = Polygon(np.array([1,0,2]),np.array([-1,2.5,1]),np.array([-3,2,1]),np.array([-1,-1,2]), color = GREEN_E, fill_color = WHITE, fill_opacity=0.5)
+ plane2 = Polygon(np.array([1,0,2]),np.array([-1,2.5,1]),np.array([-3,2,1]),np.array([-1,-1,2]), color = BLUE, fill_color = WHITE, fill_opacity=0.3)
+ normalLabel = TextMobject(r'$\overrightarrow{n}$').shift((2,2.5,0))
+ pointLabel = TextMobject(r'$P$').shift((2,1.2,0))
+ xlabel = TextMobject(r'$x$').shift(4.5*LEFT + 1.7*DOWN)
+ ylabel = TextMobject(r'$y$').shift(4.5*RIGHT + 1.8*DOWN)
+ zlabel = TextMobject(r'$z$').shift(3.3*UP+0.5*RIGHT)
+
+ normaltext = TextMobject(r'Consider an arbitrary \\ normal vector $\overrightarrow{n}$').scale(0.6).shift(2*UP + 2.5*LEFT)
+ planetext = TextMobject(r'A single vector is normal \\ to infinitely many planes.').scale(0.6).shift(2*UP + 2.5*LEFT)
+ pointtext = TextMobject(r'Given a fixed point $P$, \\ a plane is obtained as:').scale(0.6).shift(2*UP + 2.5*LEFT)
+
+ point = Dot(color = RED).shift((1.6,1.3,0))
+ self.play(FadeIn(axes))
+ self.add_fixed_in_frame_mobjects(xlabel, ylabel, zlabel)
+ self.wait(1)
+ self.play(FadeIn(normal))
+ self.add_fixed_in_frame_mobjects(normalLabel, normaltext)
+ self.play(FadeIn(normaltext))
+ self.wait(2)
+ self.add_fixed_in_frame_mobjects(planetext)
+ self.play(ReplacementTransform(normaltext, planetext), run_time=0.01)
+ self.play(MoveAlongPath(plane1, normal), run_time = 6)
+ self.add_fixed_in_frame_mobjects(pointtext)
+ self.play(ReplacementTransform(planetext, pointtext))
+ self.add_fixed_in_frame_mobjects(point, pointLabel)
+ self.wait(1)
+ self.play(Transform(plane1, plane2))
+ self.wait(2)
+ self.play(FadeOut(axes), FadeOut(plane2), FadeOut(plane1), FadeOut(point), FadeOut(pointLabel), FadeOut(normal), FadeOut(normalLabel), FadeOut(planetext), FadeOut(pointtext), FadeOut(normaltext), FadeOut(VGroup(*[xlabel, ylabel, zlabel])))
+ self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif
new file mode 100644
index 0000000..a8b7d75
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.py
new file mode 100644
index 0000000..258ac3c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.py
@@ -0,0 +1,29 @@
+from manimlib.imports import *
+
+class pointnormal(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes(x_min = 0, y_min = 0, z_min = 0)
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+
+ plane1 = Polygon(np.array([2,-3,2.5]),np.array([-1.45,2,2.5]),np.array([-0.5,4.5,-0.1]),np.array([3.5,-1,-0.2]), fill_color = WHITE, fill_opacity=0.3)
+
+ xlabel = TextMobject(r'$x$').shift(5*LEFT + 1.5*DOWN)
+ ylabel = TextMobject(r'$y$').shift(5*RIGHT + 1.5*DOWN)
+ zlabel = TextMobject(r'$z$').shift(3.3*UP + 0.5*LEFT)
+
+ zintercept = Dot().shift(2.5*UP)
+ zinterceptlabel = TextMobject(r'$(0,0,c\prime)$').shift(2.8*UP + RIGHT).scale(0.7)
+
+ yintercept = Dot().shift(3.7*RIGHT + 0.925*DOWN)
+ yinterceptlabel = TextMobject(r'$(0,b\prime ,0)$').shift(3.7*RIGHT+1.5*DOWN).scale(0.7)
+
+ xintercept = Dot().shift(2.9*LEFT + 0.75*DOWN)
+ xinterceptlabel = TextMobject(r'$(a\prime ,0,0)$').shift(3*LEFT+1.3*DOWN).scale(0.7)
+
+ self.play(FadeIn(axes), FadeIn(plane1))
+ self.add_fixed_in_frame_mobjects(xlabel, ylabel, zlabel, zintercept, zinterceptlabel, yintercept, yinterceptlabel, xintercept, xinterceptlabel)
+ self.wait(2)
+ self.remove(zintercept, zinterceptlabel, yintercept, yinterceptlabel, xintercept, xinterceptlabel, xlabel, ylabel, zlabel)
+ self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait(5)
+ self.play(FadeOut(axes), FadeOut(plane1))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif
new file mode 100644
index 0000000..b4c259e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.py
new file mode 100644
index 0000000..26ad825
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.py
@@ -0,0 +1,49 @@
+from manimlib.imports import *
+
+class pointnormal(ThreeDScene):
+ CONFIG = {
+ 'x_axis_label': '$x$',
+ 'y_axis_label': '$y$'
+ }
+ def construct(self):
+ axes = ThreeDAxes()
+ axes.add(axes.get_axis_labels())
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+
+ plane = Polygon(
+ np.array([2,0,2.7]),
+ np.array([0,0,0.4]),
+ np.array([-3.2,0,0.55]),
+ np.array([-3,-2,2.5]),
+ fill_color = WHITE, fill_opacity = 0.25)
+
+ normal = Arrow((0.25,2,0), (1.5,3.5,0))
+ normalLabel = TextMobject(r'$\overrightarrow{n}$').shift((1.5,2.8,0))
+
+ point = Dot(color = RED).shift((1.6,1.3,0))
+ pointLabel = TextMobject(r'$P_{0}$').shift((2,1.2,0))
+
+ point2 = Dot(color = RED).shift((-0.2,1.8,0))
+ point2Label = TextMobject(r'$P$').shift((-0.3,2,0))
+
+ arrow1 = Arrow((0,-0.25,-0.2), (-2.55,0,1), color = YELLOW).set_stroke(width=3)
+ arrow2 = Arrow((0,0,-0.25), (0.3,0,2), color = YELLOW).set_stroke(width=3)
+ res = Arrow((1.8,1.23,0),(-0.35,1.85,0), color = BLUE).set_stroke(width=3)
+
+ arrow1label = TextMobject(r'$\overrightarrow{r_{0}}$').next_to(arrow2, UP).shift(RIGHT + 0.16*DOWN).scale(0.7)
+ arrow2label = TextMobject(r'$\overrightarrow{r}$').next_to(arrow2, UP).shift(0.7*LEFT).scale(0.7)
+ reslabel = TextMobject(r'$\overrightarrow{r} - \overrightarrow{r_{0}}$').next_to(arrow2, UP).shift(0.7*RIGHT + 1.2*UP).scale(0.7)
+
+ self.play(FadeIn(axes), FadeIn(plane))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(normal, normalLabel)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(point, pointLabel)
+ self.add_fixed_in_frame_mobjects(point2, point2Label)
+ self.play(Write(arrow1), Write(arrow2))
+ self.add_fixed_in_frame_mobjects(arrow2label, arrow1label)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(res, reslabel)
+ self.play(Write(res), FadeIn(reslabel))
+ self.wait(1)
+ self.play(FadeOut(axes), FadeOut(plane), FadeOut(point), FadeOut(pointLabel), FadeOut(normal), FadeOut(normalLabel), FadeOut(point2), FadeOut(point2Label), FadeOut(arrow1label), FadeOut(arrow2label), FadeOut(reslabel), FadeOut(arrow1), FadeOut(arrow2), FadeOut(res))
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.py
new file mode 100644
index 0000000..e25c4eb
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.py
@@ -0,0 +1,47 @@
+from manimlib.imports import *
+
+class line_(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ xlabel = TextMobject(r'$x$').shift(4.5*LEFT + 1.7*DOWN)
+ ylabel = TextMobject(r'$y$').shift(4.5*RIGHT + 1.8*DOWN)
+ zlabel = TextMobject(r'$z$').shift(3.3*UP+0.5*RIGHT)
+
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+ pointLabel = TextMobject(r'$P$').shift((2.28,2.12,0)).scale(0.7)
+ point = Dot(color = RED).shift((1.95,1.9,0))
+
+ vlabel = TextMobject(r'$\overrightarrow{v}$').shift((0.5,1.3,0)).scale(0.7)
+
+ inf_text = TextMobject(r'Infinitely many lines pass \\ through a single point.').scale(0.6).shift(2*UP + 2.5*LEFT)
+ pointtext = TextMobject(r'Given a direction vector $\overrightarrow{v}$, \\ a line is obtained as:').scale(0.6).shift(2*UP + 2.5*LEFT)
+
+
+ line = Line((0.7,0.7,0), (2,3,0)).shift(0.06*UP+0.6*RIGHT)
+ v = Vector((0.8,1,0), color = GREEN_E)
+ #finalLine = Line((-1.56,0,0.5),(-4,0,2.42), color = YELLOW)
+ finalLine = Line((1,0.8,0),(3,3,0), color = YELLOW).shift(0.05*LEFT)
+ self.play(FadeIn(axes))
+ self.add_fixed_in_frame_mobjects(zlabel, ylabel, xlabel)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(point, pointLabel)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(inf_text)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(line)
+
+ for i in range(9):
+ self.play(ApplyMethod(line.rotate, -np.pi/12), run_time = 0.7)
+ if i == 8:
+ self.add_fixed_in_frame_mobjects(pointtext)
+ self.play(ReplacementTransform(inf_text, pointtext))
+ self.add_fixed_in_frame_mobjects(v, vlabel)
+ # if i == 13:
+ # self.add_fixed_in_frame_mobjects(pointtext)
+
+ self.add_fixed_in_frame_mobjects(finalLine)
+ self.play(FadeIn(finalLine))
+ self.play(Transform(line, finalLine), run_time = 4)
+ #self.play(FadeOut(line), FadeIn(finalLine))
+ self.wait(1.5)
+ self.play(FadeOut(VGroup(*[axes, xlabel, ylabel, zlabel, finalLine, v, vlabel, point, pointLabel, pointtext, line])))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc
new file mode 100644
index 0000000..ad30b2a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc
new file mode 100644
index 0000000..144d78d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py
new file mode 100644
index 0000000..40b5150
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py
@@ -0,0 +1,78 @@
+from manimlib.imports import *
+
+class parametricCircle(ThreeDScene, GraphScene):
+ def construct(self):
+ self.x_min = -5
+ self.y_min = -5
+ self.graph_origin = ORIGIN
+ self.x_max = 5
+ self.y_max = 5
+ self.x_axis_label = ""
+ self.y_axis_label = ""
+ self.x_axis_width = 10
+ self.y_axis_height = 10
+
+ axes = []
+
+ self.setup_axes()
+ self.axes.scale(0.5).shift(3*LEFT)
+ axes.append(self.axes)
+ self.setup_axes()
+ self.axes.scale(0.3).shift(3*RIGHT + 2*UP)
+ axes.append(self.axes)
+ self.setup_axes()
+ self.axes.scale(0.3).shift(3*RIGHT + 2*DOWN)
+ axes.append(self.axes)
+
+ axes = VGroup(*axes)
+ t_value = ValueTracker(-3.14)
+ t_tex = DecimalNumber(t_value.get_value()).add_updater(lambda v: v.set_value(t_value.get_value()))
+ t_label = TexMobject("t = ")
+ group = VGroup(t_tex,t_label).shift(3*DOWN)
+ t_label.next_to(t_tex,LEFT, buff=0.2,aligned_edge=t_label.get_bottom())
+
+ asint_text = TextMobject(r'$x = a\sin{t}$').scale(0.7).shift(4*RIGHT + 3*UP)
+ xlabel1 = TextMobject(r'$x$').shift(3.3*RIGHT + 3.7*UP).scale(0.7)
+ tlabel1 = TextMobject(r'$t$').shift(4.8*RIGHT + 2*UP).scale(0.7)
+ up_text = VGroup(*[asint_text, xlabel1, tlabel1])
+ asint = ParametricFunction(
+ lambda t: np.array([
+ t,
+ np.sin(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = GREEN_E
+ ).shift(3*RIGHT + 2*UP).scale(0.4)
+
+ acost_text = TextMobject(r'$y = a\cos{t}$').scale(0.7).shift(4*RIGHT + DOWN)
+ ylabel1 = TextMobject(r'$y$').shift(3.3*RIGHT+0.3*DOWN).scale(0.7)
+ tlabel2 = TextMobject(r'$t$').shift(4.8*RIGHT + 2*DOWN).scale(0.7)
+ down_text = VGroup(*[acost_text, ylabel1, tlabel2])
+ acost = ParametricFunction(
+ lambda t: np.array([
+ t,
+ np.cos(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = BLUE
+ ).shift(3*RIGHT + 2*DOWN).scale(0.4)
+
+ up_dot = Dot(color = RED)
+ down_dot = Dot(color = RED)
+ circle_dot = Dot(color = RED)
+
+ ylabel2 = TextMobject(r'$y$').scale(0.7).shift(3*UP + 3*LEFT)
+ xlabel2 = TextMobject(r'$x$').scale(0.7)
+ ellipse_text = TextMobject(r'$x = a\sin{t}$ \\ $y = a\cos{t}$').scale(0.7).shift(2*UP + 1.3*LEFT)
+ main_text = VGroup(*[xlabel2, ylabel2, ellipse_text])
+ circle = ParametricFunction(
+ lambda t: np.array([
+ np.cos(t),
+ np.sin(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = WHITE
+ ).shift(3*LEFT)
+ self.play(FadeIn(axes), FadeIn(asint), FadeIn(acost), FadeIn(circle), FadeIn(up_text), FadeIn(down_text), FadeIn(main_text), FadeIn(group))
+ self.wait(1)
+ self.play(MoveAlongPath(up_dot, asint, run_time = 7), MoveAlongPath(down_dot, acost, run_time = 7), MoveAlongPath(circle_dot, circle, run_time = 7), t_value.set_value,3.14, rate_func=linear, run_time=7)
+ self.wait(1)
+ self.play(FadeOut(VGroup(*[axes, asint, acost, circle, up_text, down_text, main_text, up_dot, down_dot, circle_dot, group])))
+ self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid.gif
new file mode 100644
index 0000000..39656de
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif
new file mode 100644
index 0000000..e68b841
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.py
new file mode 100644
index 0000000..7b6c0d1
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.py
@@ -0,0 +1,46 @@
+from manimlib.imports import *
+
+t_offset = 0
+c_t = 0
+
+class cycloid(Scene):
+ def construct(self):
+
+ cycl = ParametricFunction(
+ lambda t: np.array([
+ t - np.sin(t),
+ 1 - np.cos(t),
+ 0
+ ]), t_min = -2.75*np.pi, t_max = 3*np.pi, color = BLUE
+ ).shift(0.73*RIGHT)
+ wheel_radius = 1
+ wheel_function_path = lambda x : 0 + wheel_radius
+
+ line = FunctionGraph(lambda x : 0, color = BLACK)
+ wheel_path = FunctionGraph(wheel_function_path)
+
+ velocity_factor = 0.25
+ frame_rate = self.camera.frame_rate
+ self.dt = 1 / frame_rate
+
+ wheel = Circle(color = BLACK, radius = 1)
+ dot = Dot(radius = 0.16, color = RED)
+ #dot.move_to(wheel.get_arc_center() + np.array([0,2,0]))
+
+ def update_dot(mob,dt):
+ global t_offset,c_t
+ if dt == 0 and c_t == 0:
+ rate= - velocity_factor * self.dt
+ c_t += 1
+ else:
+ rate = - dt*velocity_factor
+ if dt > 0:
+ c_t = 0
+ mob.move_to(wheel.point_from_proportion(((t_offset + rate))%1))
+ t_offset += rate
+ #self.add(mob.copy())
+
+ #dot.move_to(wheel.get_arc_center() + np.array([0,2,0]))
+ dot.add_updater(update_dot)
+ self.add(wheel,dot, line, cycl)
+ self.play(MoveAlongPath(wheel, wheel_path, run_time = 9, rate_func = linear))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif
new file mode 100644
index 0000000..8daf4c0
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
new file mode 100644
index 0000000..633e500
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
@@ -0,0 +1,13 @@
+from manimlib.imports import *
+
+class brachistochrone(Scene):
+ def construct(self):
+ curve = ParametricFunction(
+ lambda t: np.array([
+ 0.5*(t - np.sin(t)),
+ 0.5*(1 - np.cos(t)),
+ 0
+ ]), t_max = np.pi
+ ).scale(5).rotate(540*DEGREES)
+ dot = Dot(color = RED, radius = 0.2)
+ self.play(FadeIn(curve), MoveAlongPath(dot, curve, run_time = 2))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.py
new file mode 100644
index 0000000..eddd3fe
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.py
@@ -0,0 +1,31 @@
+from manimlib.imports import *
+
+class helix_(ThreeDScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 6,
+ "graph_origin": ORIGIN
+ }
+ def construct(self):
+ axes = ThreeDAxes()
+ helix = ParametricFunction(
+ lambda t: np.array([
+ 1.5*np.cos(TAU*t),
+ 1.5*np.sin(TAU*t),
+ 2*t
+ ]), t_min = -1, t_max = 2, color = RED
+ )
+ cylinder = ParametricSurface(
+ lambda u, v: np.array([
+ 1.5*np.cos(TAU*v),
+ 1.5*np.sin(TAU*v),
+ 2*u
+ ]), u_min = -1, u_max = 2, fill_opacity = -.4, fill_color = WHITE, color = WHITE
+ )
+ self.set_camera_orientation(phi=60* DEGREES,theta=45*DEGREES)
+ self.play(FadeIn(axes), FadeIn(cylinder), ShowCreation(helix, run_time = 4))
+ self.begin_ambient_camera_rotation(rate=0.5)
+ self.wait(5)
+ self.play(FadeOut(axes),FadeOut(helix), FadeOut(cylinder))
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc
new file mode 100644
index 0000000..a732643
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc
new file mode 100644
index 0000000..c8e3e2a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc
new file mode 100644
index 0000000..bca0d91
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc
new file mode 100644
index 0000000..ae954c3
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.py
new file mode 100644
index 0000000..1ce29d7
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.py
@@ -0,0 +1,78 @@
+from manimlib.imports import *
+
+class parametricEllipse(ThreeDScene, GraphScene):
+ def construct(self):
+ self.x_min = -5
+ self.y_min = -5
+ self.graph_origin = ORIGIN
+ self.x_max = 5
+ self.y_max = 5
+ self.x_axis_label = ""
+ self.y_axis_label = ""
+ self.x_axis_width = 10
+ self.y_axis_height = 10
+
+ axes = []
+
+ self.setup_axes()
+ self.axes.scale(0.5).shift(3*LEFT)
+ axes.append(self.axes)
+ self.setup_axes()
+ self.axes.scale(0.3).shift(3*RIGHT + 2*UP)
+ axes.append(self.axes)
+ self.setup_axes()
+ self.axes.scale(0.3).shift(3*RIGHT + 2*DOWN)
+ axes.append(self.axes)
+
+ axes = VGroup(*axes)
+ t_value = ValueTracker(-3.14)
+ t_tex = DecimalNumber(t_value.get_value()).add_updater(lambda v: v.set_value(t_value.get_value()))
+ t_label = TexMobject("t = ")
+ group = VGroup(t_tex,t_label).shift(3*DOWN)
+ t_label.next_to(t_tex,LEFT, buff=0.2,aligned_edge=t_label.get_bottom())
+
+ asint_text = TextMobject(r'$x = a\sin{t}$').scale(0.7).shift(4*RIGHT + 3*UP)
+ xlabel1 = TextMobject(r'$x$').shift(3.3*RIGHT + 3.7*UP).scale(0.7)
+ tlabel1 = TextMobject(r'$t$').shift(4.8*RIGHT + 2*UP).scale(0.7)
+ up_text = VGroup(*[asint_text, xlabel1, tlabel1])
+ asint = ParametricFunction(
+ lambda t: np.array([
+ t,
+ np.sin(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = GREEN_E
+ ).shift(3*RIGHT + 2*UP).scale(0.4)
+
+ bcost_text = TextMobject(r'$y = b\cos{t}$').scale(0.7).shift(4*RIGHT + DOWN)
+ ylabel1 = TextMobject(r'$y$').shift(3.3*RIGHT+0.3*DOWN).scale(0.7)
+ tlabel2 = TextMobject(r'$t$').shift(4.8*RIGHT + 2*DOWN).scale(0.7)
+ down_text = VGroup(*[bcost_text, ylabel1, tlabel2])
+ bcost = ParametricFunction(
+ lambda t: np.array([
+ t,
+ 1.5*np.cos(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = BLUE
+ ).shift(3*RIGHT + 2*DOWN).scale(0.4)
+
+ up_dot = Dot(color = RED)
+ down_dot = Dot(color = RED)
+ ellipse_dot = Dot(color = RED)
+
+ ylabel2 = TextMobject(r'$y$').scale(0.7).shift(3*UP + 3*LEFT)
+ xlabel2 = TextMobject(r'$x$').scale(0.7)
+ ellipse_text = TextMobject(r'$x = a\sin{t}$ \\ $y = b\cos{t}$').scale(0.7).shift(2*UP + 1.3*LEFT)
+ main_text = VGroup(*[xlabel2, ylabel2, ellipse_text])
+ ellipse = ParametricFunction(
+ lambda t: np.array([
+ 1.5*np.cos(t),
+ np.sin(t),
+ 0
+ ]), t_min = -np.pi, t_max = np.pi, color = WHITE
+ ).shift(3*LEFT)
+ self.play(FadeIn(axes), FadeIn(asint), FadeIn(bcost), FadeIn(ellipse), FadeIn(up_text), FadeIn(down_text), FadeIn(main_text), FadeIn(group))
+ self.wait(1)
+ self.play(MoveAlongPath(up_dot, asint, run_time = 7), MoveAlongPath(down_dot, bcost, run_time = 7), MoveAlongPath(ellipse_dot, ellipse, run_time = 7), t_value.set_value,3.14, rate_func=linear, run_time=7)
+ self.wait(1)
+ self.play(FadeOut(VGroup(*[axes, asint, bcost, ellipse, up_text, down_text, main_text, up_dot, down_dot, ellipse_dot, group])))
+ self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.py
new file mode 100644
index 0000000..3791752
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.py
@@ -0,0 +1,91 @@
+from manimlib.imports import *
+
+class parametricHelix(ThreeDScene, GraphScene):
+ def construct(self):
+ self.x_min = -5
+ self.y_min = -4
+ self.graph_origin = ORIGIN
+ self.x_max = 5
+ self.y_max = 4
+ self.x_axis_label = ""
+ self.y_axis_label = ""
+ self.x_axis_width = 10
+ self.y_axis_height = 7.5
+ ax1 = ThreeDAxes().scale(0.65).shift(2.6*RIGHT+DOWN+np.array([0,0,0.5]))
+ axes_group = []
+
+ self.setup_axes()
+ self.axes.shift(3*RIGHT + 2*UP).scale(0.3)
+ axes_group.append(self.axes)
+
+ self.setup_axes()
+ self.axes.shift(3*RIGHT + 2*DOWN).scale(0.3)
+ axes_group.append(self.axes)
+
+ axes_group = VGroup(*axes_group)
+
+ asint_text = TextMobject(r'$x = a\sin{t}$').scale(0.7).shift(4*RIGHT + 3*UP)
+ xlabel1 = TextMobject(r'$x$').shift(3.3*RIGHT + 3.7*UP).scale(0.7)
+ tlabel1 = TextMobject(r'$t$').shift(5*RIGHT + 2*UP).scale(0.7)
+ up_text = VGroup(*[asint_text, xlabel1, tlabel1])
+ asint = ParametricFunction(
+ lambda t: np.array([
+ t,
+ np.sin(t),
+ 0
+ ]), t_min = -4*np.pi, t_max = 4*np.pi, color = GREEN_E
+ ).shift(3*RIGHT + 2*UP).scale(0.12)
+
+ acost_text = TextMobject(r'$y = a\cos{t}$').scale(0.7).shift(4*RIGHT + DOWN)
+ ylabel1 = TextMobject(r'$y$').shift(3.3*RIGHT+0.3*DOWN).scale(0.7)
+ tlabel2 = TextMobject(r'$t$').shift(5*RIGHT + 2*DOWN).scale(0.7)
+ down_text = VGroup(*[acost_text, ylabel1, tlabel2])
+ acost = ParametricFunction(
+ lambda t: np.array([
+ t,
+ np.cos(t),
+ 0
+ ]), t_min = -4*np.pi, t_max = 4*np.pi, color = BLUE
+ ).shift(3*RIGHT + 2*DOWN).scale(0.12)
+
+ up_dot = Dot(color = RED).scale(0.6)
+ down_dot = Dot(color = RED).scale(0.6)
+ helix_dot = Dot(radius = 0.16, color = RED)
+
+ zlabel = TextMobject(r'$z$').scale(0.7).shift(3*UP + 2.8*LEFT)
+ ylabel2 = TextMobject(r'$y$').scale(0.7).shift(0.3*DOWN+0.15*RIGHT)
+ xlabel2 = TextMobject(r'$x$').scale(0.7).shift(0.5*DOWN + 6.4*LEFT)
+ helix_text = TextMobject(r'$x = a\sin{t}$ \\ $y = a\cos{t}$ \\ $z = ct$').scale(0.7).shift(2.3*UP + 1.3*LEFT)
+ main_text = VGroup(*[xlabel2, ylabel2, zlabel, helix_text])
+ helix = ParametricFunction(
+ lambda t: np.array([
+ np.cos(TAU*t),
+ np.sin(TAU*t),
+ 0.4*t
+ ]), t_min = -2*np.pi/3, t_max = 1.8*np.pi/3, color = WHITE
+ ).shift(ax1.get_center())
+
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+
+ t_tracker = ValueTracker(-12.56)
+ t=t_tracker.get_value
+
+ t_label = TexMobject(
+ "t = ",color=WHITE
+ ).next_to(helix_text,DOWN, buff=0.2).scale(0.6)
+
+ t_text = always_redraw(
+ lambda: DecimalNumber(
+ t(),
+ color=WHITE,
+ ).next_to(t_label, RIGHT, buff=0.2)
+ ).scale(0.6)
+
+ group = VGroup(t_text,t_label).scale(1.5).move_to(ORIGIN).shift(2*DOWN)
+ self.add_fixed_in_frame_mobjects(axes_group, main_text, up_text, down_text, acost, asint)
+ self.play(FadeIn(ax1), FadeIn(axes_group), FadeIn(asint), FadeIn(acost), FadeIn(helix), FadeIn(up_text), FadeIn(down_text), FadeIn(main_text))
+ #self.begin_ambient_camera_rotation(rate = 0.06)
+ self.add_fixed_in_frame_mobjects(up_dot, down_dot, group)
+ self.play(MoveAlongPath(up_dot, asint, run_time = 8), MoveAlongPath(down_dot, acost, run_time = 8), MoveAlongPath(helix_dot, helix, run_time = 8), t_tracker.set_value,12.56, rate_func=linear, run_time=8)
+ self.play(FadeOut(VGroup(*[ax1, axes_group, asint, acost, helix, up_text, down_text, main_text, up_dot, down_dot, helix_dot, group])))
+ self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.py
new file mode 100644
index 0000000..6c0e810
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.py
@@ -0,0 +1,45 @@
+from manimlib.imports import *
+
+class sphere(GraphScene, ThreeDScene):
+ CONFIG = {
+ 'x_min': -10,
+ 'x_max': 10,
+ 'y_min': -10,
+ 'y_max': 10,
+ 'graph_origin': ORIGIN,
+ "x_axis_width": 10,
+ "y_axis_height": 10,
+ }
+ 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)
+ circleeqn = TextMobject(r'Hence, $x^{2} + y^{2} = 2(r^{2} - u^{2})$')
+ plottext = TextMobject(r'$x = \sqrt{r^{2} - u^{2}}cos\theta$ \\ $y = \sqrt{r^{2} - u^{2}}sin\theta$').shift(2*UP + 3*RIGHT)
+
+
+ self.setup_axes()
+ self.play(FadeIn(self.axes), FadeIn(plottext))
+
+ dots = []
+ for t in range(19):
+ dot = Dot().shift((3*XTD*np.cos(t), 3*YTD*np.sin(t),0))
+ dots.append(dot)
+ self.play(FadeIn(dot), run_time = 0.2)
+ dots = VGroup(*dots)
+ circle = Circle(radius = 3*XTD).set_color(WHITE).set_stroke(width = 10)
+ self.play(FadeIn(circle), FadeOut(dots), FadeOut(plottext))
+ self.wait(2)
+
+
+ axes = ThreeDAxes(**self.CONFIG)
+ sph = Sphere(radius = 3).scale(0.5)
+ text2 = TextMobject(r'Setting $u = 3$,\\$z = u$').shift(4*YTD*UP + 5*XTD*RIGHT)
+
+ self.play(Transform(self.axes,axes), ReplacementTransform(circle, sph))
+ self.add(text2)
+ self.wait(2)
+ self.remove(text2)
+ self.move_camera(phi = 60*DEGREES, theta=45*DEGREES,run_time=5)
+ self.begin_ambient_camera_rotation(rate=0.03)
+ self.play(FadeOut(axes), FadeOut(sph), FadeOut(self.axes))
+ self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.py
new file mode 100644
index 0000000..e6ae1c6
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.py
@@ -0,0 +1,33 @@
+from manimlib.imports import *
+
+class cone(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ eqn = TextMobject(r'$z^{2} = x^{2} + y^{2}$')
+
+ conecurve = ParametricFunction(
+ lambda t: np.array([
+ t*np.cos(TAU*t),
+ t*np.sin(TAU*t),
+ t
+ ]), t_min = -2.6, t_max = 2.6
+ ).scale(0.85)
+
+ conesurface = ParametricSurface(
+ lambda u,v: np.array([
+ 3*np.sin(u)*np.cos(TAU*v),
+ 3*np.sin(u)*np.sin(TAU*v),
+ 2.7*u
+ ]), u_min = -1
+ ).scale(0.85)
+
+ self.play(FadeIn(eqn))
+ self.wait(2)
+ self.play(FadeOut(eqn))
+ self.set_camera_orientation(phi = 75*DEGREES, theta=50*DEGREES)
+ self.play(FadeIn(axes), ShowCreation(conecurve, run_time = 3))
+ self.play(FadeOut(conecurve), FadeIn(conesurface))
+ self.begin_ambient_camera_rotation(rate=0.03)
+ self.wait(2)
+ self.play(FadeOut(axes), FadeOut(conesurface))
+ self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif
new file mode 100644
index 0000000..c8668e3
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif
new file mode 100644
index 0000000..097652f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc
new file mode 100644
index 0000000..8967b87
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif
new file mode 100644
index 0000000..5801796
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py
new file mode 100644
index 0000000..67c675e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py
@@ -0,0 +1,22 @@
+from manimlib.imports import *
+
+class tangent(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ self.set_camera_orientation(phi = 125*DEGREES, theta = 135*DEGREES)
+ h = ParametricFunction(
+ lambda t: np.array([
+ 4*(t**3) + 5,
+ t**2 + 2*(t**4),
+ -2*np.log(2*t)
+ ]), t_min = -3, t_max = 1.18
+ ).shift(5*LEFT)
+ tgtR = Line((4,3,-2*np.log(2)), (19.5, 16, -4.772588), color=YELLOW)
+ tgtL =Line((4,3,-2*np.log(2)), (-11.5, -10, 2), color=YELLOW)
+ dot = Dot((4,3,-2*np.log(2)), color=RED, radius=0.08)
+ self.play(FadeIn(axes),FadeIn(h), FadeIn(dot))
+ self.begin_ambient_camera_rotation(rate=0.4)
+ self.wait(2)
+ self.play(FadeIn(tgtL), FadeIn(tgtR))
+ self.wait(5)
+ self.play(FadeOut(axes), FadeOut(h), FadeOut(dot), FadeOut(tgtL), FadeOut(tgtR))
--
cgit
From a70dc7346e1b46885852e7a31d1fefa74077b250 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Fri, 19 Jun 2020 15:38:04 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
index c3db80a..b46936b 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/README.md
@@ -1,4 +1,4 @@
-This repository contains the codes written by [Saarth Deshpande](https://github.com/saarthdeshpande) during the course of FOSSEE Summer Fellowship 2020 under the Floss: Mathematics using Python.
+This repository contains the codes written by [Saarth Deshpande](https://github.com/saarthdeshpande) during the course of FOSSEE Summer Fellowship 2020 under the FLOSS: Mathematics using Python.
__Sub-topics covered__:
* Equations of Planes and Lines
--
cgit
From 4d8f2f09a9049e7a86d4def20f4cd1e2e13d682e Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Fri, 19 Jun 2020 16:49:10 +0530
Subject: video update
---
.../file1_simple_visualization.py | 46 +++++++++++++++-------
1 file changed, 32 insertions(+), 14 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
index 0ae283a..7ab8908 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
@@ -11,41 +11,59 @@ class randomcurve(GraphScene):
def construct(self):
intro = TextMobject('Consider the following curve.')
mid = TextMobject(r'Notice how the direction of the unit tangent vectors\\changes with respect to the arc length.')
- outro = TextMobject(r'This is called curvature.\\Mathematically, curvature $ = k = \left|{\frac{dT}{ds}}\right|$')
+ outro = TextMobject(r'The rate of change of unit tangents with \\ respect to the arc length $ds$ is called curvature.\\Mathematically, curvature $ = k = \left|{\frac{dT}{ds}}\right|$')
XTD = self.x_axis_width/(self.x_max- self.x_min)
YTD = self.y_axis_height/(self.y_max- self.y_min)
-
+
+ tgt1 = Arrow((-2.2*XTD,-0.5*YTD,0),(-1*XTD,1,0))
+ tgt2 = Arrow((-1.2*XTD, 1.93*YTD,0),(0*XTD,1.6,0)).scale(1.2)
+ tgt3 = Arrow((-0.3*XTD,3*YTD, 0), (1.5*XTD, 3*YTD,0))
+ tgt4 = Arrow((1.4*XTD, 2*YTD,0),(2.4*XTD, 1*YTD,0)).scale(2.8)
+ tgt5 = Arrow((2.4*XTD, 0, 0), (3.8*XTD,-2*YTD, 0)).scale(1.2).shift(0.26*RIGHT)
+ tgt6 = Arrow((3.8*XTD,-1*YTD, 0), (4.8*XTD, -1*YTD, 0)).scale(2.8).shift(0.26*RIGHT)
+ tgt7 = Arrow((5.3*XTD, 0, 0),(6.3*XTD,1,0)).shift(0.35*LEFT+0.1*DOWN).scale(1.3)
+
+ dot1 = Dot(tgt1.get_start(), color = RED)
+ dot2 = Dot(tgt2.get_start(), color = RED)
+ dot3 = Dot(tgt3.get_start(), color = RED)
+ dot4 = Dot(tgt4.get_start(), color = RED)
+ dot5 = Dot(tgt5.get_start(), color = RED)
+ dot6 = Dot(tgt6.get_start(), color = RED)
+ dot7 = Dot(tgt7.get_start(), color = RED)
+
+ dots = VGroup(*[dot1, dot2, dot3, dot4, dot5, dot6, dot7])
+
+ ds = CurvedArrow((-4, 2, 0), (tgt1.get_start() + tgt2.get_start()) / 2, color = YELLOW)
+ ds_text = TextMobject(r'$ds$').next_to(ds, UP, buff = 0.1).shift(1.3*LEFT)
+
self.setup_axes(hideaxes=True)
graphobj = self.get_graph(self.curve)
self.play(FadeIn(intro))
self.wait(2)
self.play(FadeOut(intro))
self.setup_axes(hideaxes=False)
- self.play(ShowCreation(graphobj))
+ self.play(ShowCreation(graphobj), FadeIn(dots), FadeIn(ds), FadeIn(ds_text))
self.wait(1)
- self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid))
+ self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid), FadeOut(dots), FadeOut(ds), FadeOut(ds_text))
self.wait(2)
self.play(FadeOut(mid))
- self.play(FadeIn(self.axes), FadeIn(graphobj))
+ self.play(FadeIn(self.axes), FadeIn(graphobj), FadeIn(dots))
+
- tgt1 = Arrow((-2.2*XTD,-0.5*YTD,0),(-1*XTD,1,0))
- tgt2 = Arrow((-1.2*XTD, 1.93*YTD,0),(0*XTD,1.6,0)).scale(1.2)
- tgt3 = Arrow((-0.3*XTD,3*YTD, 0), (1.5*XTD, 3*YTD,0))
- tgt4 = Arrow((1.4*XTD, 2*YTD,0),(2.4*XTD, 1*YTD,0)).scale(2.8)
- tangents = [tgt1, tgt2, tgt3, tgt4]
+ tangents = [tgt1, tgt2, tgt3, tgt4, tgt5, tgt6, tgt7]
for tangent in tangents:
- self.play(ShowCreation(tangent))
+ self.play(ShowCreation(tangent), run_time = 0.2)
self.wait(1)
tangents = VGroup(*tangents)
- self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents))
+ self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents), FadeOut(dots))
self.wait(1)
self.play(FadeIn(outro))
self.wait(2)
self.play(FadeOut(outro))
self.wait(1)
-
+
def curve(self, x):
- return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
\ No newline at end of file
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
--
cgit
From 5a80fc01354cb1ed46a42a3e67126a6f966cf4cc Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Sun, 21 Jun 2020 10:25:22 +0530
Subject: last video for curvature
---
.../file4_different_curvature_single_curve.py | 56 ++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py
new file mode 100644
index 0000000..d71adda
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py
@@ -0,0 +1,56 @@
+from manimlib.imports import *
+
+class GR(GraphScene):
+ CONFIG = {
+ "x_axis_label": "",
+ "y_axis_label": "",
+ "x_min": -4,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 10,
+ "graph_origin": ORIGIN
+ }
+
+ def construct(self):
+
+ self.setup_axes()
+ def curve(x):
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
+
+ graph = FunctionGraph(curve, x_min=-3, x_max=6, stroke_width = 2, color = BLUE)
+
+ tracker = ValueTracker(-3)
+
+ text = TextMobject(r'The curvature at point $P_{1}$ is \\ lesser than that at point $P_{2}$: \\ as $\kappa = \frac{1}{R}$').shift(3.2*RIGHT+3*UP).scale(0.6)
+
+ dot1 = Dot((0,3,0), color = YELLOW)
+ dot1label = TextMobject(r'$P_{1}$').next_to(dot1, UP+RIGHT, buff = 0.1)
+ dot2 = Dot((4,-1, 0), color = YELLOW)
+ dot2label = TextMobject(r'$P_{2}$').next_to(dot2, DOWN, buff = 0.1)
+ dots = VGroup(*[dot1, dot2, dot1label, dot2label])
+
+ def get_tangent_line():
+ line = Line(
+ ORIGIN, 2 * RIGHT,
+ color=RED,
+ stroke_width=4,
+ )
+ dx = 0.0001
+
+ x = tracker.get_value()
+ p0 = np.array([x-dx,curve(x-dx),0])
+ p1 = np.array([x, curve(x), 0])
+ p2 = np.array([x + dx, curve(x + dx), 0])
+
+ angle = angle_of_vector(p2 - p1)
+ line.rotate(angle)
+ line.move_to(p0)
+ return line
+
+ line = always_redraw(get_tangent_line)
+
+ self.add(graph,line, dots, text)
+ self.wait(1.2)
+ self.play(tracker.set_value, 6, rate_func=smooth, run_time=13)
+ self.play(FadeOut(VGroup(*[graph, self.axes, line, dots, text])))
+ self.wait()
--
cgit
From 9ab7138ebd965da0087f1711ead9b53971fca3d2 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 17:20:21 +0530
Subject: removed pyc files
---
.../__pycache__/file1_line_eqn.cpython-38.pyc | Bin 1541 -> 0 bytes
.../file4_point_normal_form_plane.cpython-38.pyc | Bin 2225 -> 0 bytes
.../__pycache__/file1_parametric_circle.cpython-38.pyc | Bin 3089 -> 0 bytes
.../__pycache__/file4_helix_visualization.cpython-38.pyc | Bin 1506 -> 0 bytes
.../__pycache__/file1_parametric_ellipse.cpython-38.pyc | Bin 3102 -> 0 bytes
.../__pycache__/file2_parametric_helix.cpython-38.pyc | Bin 3575 -> 0 bytes
.../__pycache__/file3_circletosphere.cpython-38.pyc | Bin 1843 -> 0 bytes
.../space-curves/__pycache__/file3_cone.cpython-38.pyc | Bin 1499 -> 0 bytes
.../__pycache__/file2_tangent_spaceCurve.cpython-38.pyc | Bin 1429 -> 0 bytes
9 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc
deleted file mode 100644
index e129d1d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file1_line_eqn.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc
deleted file mode 100644
index 88377bb..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/__pycache__/file4_point_normal_form_plane.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc
deleted file mode 100644
index ad30b2a..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file1_parametric_circle.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc
deleted file mode 100644
index 144d78d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/__pycache__/file4_helix_visualization.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc
deleted file mode 100644
index a732643..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file1_parametric_ellipse.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc
deleted file mode 100644
index c8e3e2a..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file2_parametric_helix.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc
deleted file mode 100644
index bca0d91..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_circletosphere.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc
deleted file mode 100644
index ae954c3..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/__pycache__/file3_cone.cpython-38.pyc and /dev/null differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc
deleted file mode 100644
index 8967b87..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/__pycache__/file2_tangent_spaceCurve.cpython-38.pyc and /dev/null differ
--
cgit
From 76f2a255a93b362c6fbddf8a3ef89179c81723e9 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:14:32 +0530
Subject: Add files via upload
---
.../equations-of-planes-and-lines/file1_line_eqn.gif | Bin 0 -> 4694940 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif
new file mode 100644
index 0000000..a8a301a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif differ
--
cgit
From 462f8e73b9bb0ee52f34616dd9e9619f86dae77c Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:23:34 +0530
Subject: Add files via upload
---
.../file2_point_normal_form_plane.gif | Bin 0 -> 430431 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif
new file mode 100644
index 0000000..e651be0
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif differ
--
cgit
From bcbeee103e953bdf7f723eecb46ccff0255901c6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:32:41 +0530
Subject: Add files via upload
---
.../file5_vector_form_line.gif | Bin 0 -> 536607 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif
new file mode 100644
index 0000000..b6fdb51
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif differ
--
cgit
From 9898bae0b5551e1e6a0153c85cc121aa8ead34c6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:33:09 +0530
Subject: Create README.md
---
.../equations-of-planes-and-lines/README.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
new file mode 100644
index 0000000..fd3655d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
@@ -0,0 +1,14 @@
+**file1_line_eqn.py**
+![file1_line_eqn.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif)
+
+**file2_point_normal_form_plane.py**
+![file2_point_normal_form_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif)
+
+**file3_intercept_form_plane.py**
+![file3_intercept_form_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif)
+
+**file4_3d_plane.py**
+![file4_3d_plane.py]https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif)
+
+**file5_vector_form_line.py**
+![file5_vector_form_line.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif)
--
cgit
From 97d26bedbaefc8300e16828cd8e62c887059b4e8 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:33:40 +0530
Subject: Update README.md
---
.../equations-of-planes-and-lines/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
index fd3655d..79061a7 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
@@ -8,7 +8,7 @@
![file3_intercept_form_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif)
**file4_3d_plane.py**
-![file4_3d_plane.py]https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif)
+![file4_3d_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif)
**file5_vector_form_line.py**
![file5_vector_form_line.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif)
--
cgit
From 192baec5e929970344ca174f115f0080bed1561a Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:33:59 +0530
Subject: Update README.md
---
.../equations-of-planes-and-lines/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
index 79061a7..d1729ee 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
@@ -1,4 +1,4 @@
-**file1_line_eqn.py**
+**file1_line_eqn.py**
![file1_line_eqn.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif)
**file2_point_normal_form_plane.py**
--
cgit
From a438abc85805600a737ab309cc59a9a61f54b914 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:34:09 +0530
Subject: Update README.md
---
.../equations-of-planes-and-lines/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
index d1729ee..d6b89ef 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
@@ -1,4 +1,4 @@
-**file1_line_eqn.py**
+**file1_line_eqn.py**
![file1_line_eqn.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif)
**file2_point_normal_form_plane.py**
--
cgit
From 140a19871867a02023ded8b9b2586e4bbaa0c279 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:41:41 +0530
Subject: Add files via upload
---
.../file1_parametric_circle.gif | Bin 0 -> 327132 bytes
.../file4_helix_visualization.gif | Bin 0 -> 3596680 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif
new file mode 100644
index 0000000..732b6bb
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif
new file mode 100644
index 0000000..16d2509
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif differ
--
cgit
From 86bfd736ab17d7ae035d39b1989e0046cffa87a8 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:45:42 +0530
Subject: Create README.md
---
.../general-parametric-curves/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md
new file mode 100644
index 0000000..be358ac
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md
@@ -0,0 +1,11 @@
+**file1_parametric_circle..py**
+![file1_parametric_circle.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif)
+
+**file2_cycloid_manim.py**
+![file2_cycloid_manim.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif)
+
+**file3_brachistochrone.py**
+![file3_brachistochrone.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif)
+
+**file4_helix_visualization.py**
+![file4_helix_visualization.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif)
--
cgit
From 5e356df8454ba89cfc48fb986f64910a89e8c2d7 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:55:58 +0530
Subject: Add files via upload
---
.../space-curves/file1_parametric_ellipse.gif | Bin 0 -> 340180 bytes
.../space-curves/file2_parametric_helix.gif | Bin 0 -> 389637 bytes
.../space-curves/file3_circletosphere.gif | Bin 0 -> 1811911 bytes
.../space-curves/file4_cone.gif | Bin 0 -> 987693 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif
new file mode 100644
index 0000000..90c0349
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif
new file mode 100644
index 0000000..4f349b1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif
new file mode 100644
index 0000000..d6a8afc
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif
new file mode 100644
index 0000000..b126d20
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif differ
--
cgit
From ff55a5ea68b4ada3592ce3a7c285c37742cd7210 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:58:17 +0530
Subject: Create README.md
---
.../geometry-of-planes-and-curves/space-curves/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
new file mode 100644
index 0000000..317ec2c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
@@ -0,0 +1,11 @@
+**file1_parametric_ellipse.py**
+![file1_parametric_ellipse.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif)
+
+**file2_parametric_helix.py**
+![file2_parametric_helix.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif)
+
+**file3_circletosphere.py**
+![file3_circletosphere.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif)
+
+**file4_cone.py**
+![file4_cone.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif)
--
cgit
From 7c635e30569a1a34367a0652a69938f955e08aba Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Tue, 23 Jun 2020 23:58:44 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/space-curves/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
index 317ec2c..18516b7 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
@@ -4,8 +4,8 @@
**file2_parametric_helix.py**
![file2_parametric_helix.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif)
-**file3_circletosphere.py**
+**file3_circletosphere.py**
![file3_circletosphere.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file3_circletosphere.gif)
-**file4_cone.py**
+**file4_cone.py**
![file4_cone.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file4_cone.gif)
--
cgit
From f31fd0cb6fe4f356a43a1597b0396f6792e5b4c6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:04:29 +0530
Subject: Add files via upload
---
.../file1_simple_visualization.gif | Bin 0 -> 686712 bytes
.../file2_circle_curvature.gif | Bin 0 -> 346667 bytes
.../file4_different_curvature_single_curve.gif | Bin 0 -> 243868 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif
new file mode 100644
index 0000000..858a8de
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif
new file mode 100644
index 0000000..989a3b7
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif
new file mode 100644
index 0000000..3b78b5f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif differ
--
cgit
From 1a61648b355db2e3bc4fb1c0776f5243ac2aa0f3 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:07:21 +0530
Subject: Create README.md
---
.../arc-length-and-curvature/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
new file mode 100644
index 0000000..e61fd00
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
@@ -0,0 +1,11 @@
+**file1_simple_visualization.py**
+![file1_simple_visualization.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif)
+
+**file2_circle_curvature.py**
+![file2_circle_curvature.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif)
+
+**file3_curvature_intuition.gif**
+![file3_curvature_intuition.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif)
+
+**file4_different_curvature_single_curve.py**
+![file4_different_curvature_single_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif)
--
cgit
From 5ef30fc9cfe4faef33b65f23b5b3d95f579e2c88 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:07:41 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/arc-length-and-curvature/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
index e61fd00..f5313c9 100644
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
@@ -1,10 +1,10 @@
**file1_simple_visualization.py**
![file1_simple_visualization.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif)
-**file2_circle_curvature.py**
+**file2_circle_curvature.py**
![file2_circle_curvature.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif)
-**file3_curvature_intuition.gif**
+**file3_curvature_intuition.gif**
![file3_curvature_intuition.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif)
**file4_different_curvature_single_curve.py**
--
cgit
From 62b0909cd0cab3f456ea4e73659163c283aba2c0 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:10:06 +0530
Subject: Add files via upload
---
.../file2_tangent_space_curve.gif | Bin 0 -> 1317248 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif
new file mode 100644
index 0000000..06ed70f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif differ
--
cgit
From 4ccb0de938e035e86e6003f00f90f604c89c533d Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:11:25 +0530
Subject: Create README.md
---
.../velocity-and-differentiability/README.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md
new file mode 100644
index 0000000..8092cf7
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md
@@ -0,0 +1,5 @@
+**file1_smooth_curves.gif**
+![file1_smooth_curves.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif)
+
+**file2_tangent_space_curve.py**
+![file2_tangent_space_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif)
--
cgit