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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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
+
+
+
+
+
+
+
+
+
+
+
2. Fubini's Theorem
+
+
+
+
+
+
--
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/calculus-of-several-variables')
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

-
+

--
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/calculus-of-several-variables')
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**

+**file2_area_under_func**

+**file3_y_limit_dependent_on_x**

+**file4_non_rect_region**

+**file5_elementary_area**

-2. Fubini's Theorem
+# Fubini's Theorem
+**file1_surface1**

+**file2_surface2**

+**file3_iteration_methods**

--
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/calculus-of-several-variables')
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**
-
+
**file2_area_under_func**
-
+
**file3_y_limit_dependent_on_x**

**file4_non_rect_region**
-
+
**file5_elementary_area**
-
+
# Fubini's Theorem
**file1_surface1**
-
+
**file2_surface2**
-
+
**file3_iteration_methods**
-
+
--
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/calculus-of-several-variables')
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**

+
+**file4_curvy_limits**
+
+
+
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 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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
-
-
-**file2_area_under_func**
-
-
-**file3_y_limit_dependent_on_x**
-
-
-**file4_non_rect_region**
-
-
-**file5_elementary_area**
-
-
# Fubini's Theorem
-**file1_surface1**
-
-
-**file2_surface2**
-
-
-**file3_iteration_methods**
-
-
-**file4_curvy_limits**
-
-
-
+# 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/calculus-of-several-variables')
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**
+
+
+**file2_surface2**
+
+
+**file3_iteration_methods**
+
+
+**file4_curvy_limits**
+
+
+
--
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/calculus-of-several-variables')
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**
-
-
-**file2_surface2**
-
-
-**file3_iteration_methods**
-
-
-**file4_curvy_limits**
-
-
-
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**
+
+
+**file2_surface2**
+
+
+**file3_iteration_methods**
+
+
+**file4_curvy_limits**
+
+
+
--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_area_under_func**
+
+
+**file3_y_limit_dependent_on_x**
+
+
+**file4_non_rect_region**
+
+
+**file5_elementary_area**
+
+
+**file6_doing_integration**
+
+
+**file7_int_process_of_example**
+
+
--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
**
![]()
--
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/calculus-of-several-variables')
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**
+
+
+
**
![]()
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/calculus-of-several-variables')
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**

-**
-![]()
+**file2_scalar_line_integral**
+
**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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
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/calculus-of-several-variables')
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**
+
+
+**
+
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/calculus-of-several-variables')
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**

-**
-
+**file2_line_int_example**
+
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**

-**file2_line_int_example**
-
+**file2_line_int_independent_of_path**
+
+
+**file3_line_int_example**
+
+
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 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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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_area_under_func**
+
-**file2_area_under_func**
-
+**file2_volume_under_surface**
+
**file3_y_limit_dependent_on_x**

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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 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/calculus-of-several-variables')
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**
+
--
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/calculus-of-several-variables')
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**
+
--
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/calculus-of-several-variables')
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**

+**file1_projection**
+
--
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/calculus-of-several-variables')
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**

-**file1_projection**
+**file1_projection.py**

--
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/calculus-of-several-variables')
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**
-
**file1_projection.py**

+**file2_cube.py**
+
+**file3_cube_sideC.py**
+
+**file4_pauseandponder.py**
+
--
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/calculus-of-several-variables')
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**
+
+**file2_cylindrical_coordinates.py**
+
--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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 @@

**file2_cylindrical_coordinates.py**

+**file2_spherical_coordinates.py**
+
--
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/calculus-of-several-variables')
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**
+
+**file2_mobius_strip.py**
+
+**file3_normal_vector.py**
+
+**file4_cube_surface.py**
+
--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_point_normal_form_plane.py**
+
+
+**file3_intercept_form_plane.py**
+
+
+**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**
+
--
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/calculus-of-several-variables')
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 @@

**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**

--
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/calculus-of-several-variables')
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**

**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/calculus-of-several-variables')
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**

**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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_cycloid_manim.py**
+
+
+**file3_brachistochrone.py**
+
+
+**file4_helix_visualization.py**
+
--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_parametric_helix.py**
+
+
+**file3_circletosphere.py**
+
+
+**file4_cone.py**
+
--
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/calculus-of-several-variables')
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**

-**file3_circletosphere.py**
+**file3_circletosphere.py**

-**file4_cone.py**
+**file4_cone.py**

--
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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_circle_curvature.py**
+
+
+**file3_curvature_intuition.gif**
+
+
+**file4_different_curvature_single_curve.py**
+
--
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/calculus-of-several-variables')
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**

-**file2_circle_curvature.py**
+**file2_circle_curvature.py**

-**file3_curvature_intuition.gif**
+**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/calculus-of-several-variables')
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/calculus-of-several-variables')
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**
+
+
+**file2_tangent_space_curve.py**
+
--
cgit
From 56ab459970db5ee7d05f3f30cdbd750f64f1800b Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:47:27 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
---
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
new file mode 100644
index 0000000..41c3b61
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
@@ -0,0 +1,29 @@
+from manimlib.imports import*
+
+#---- visualization of the function
+class ExampleAnimation(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- f(x,y) = (y-x)(1-2x-3y)
+ surface = 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_B,PURPLE_C,PURPLE_D, PURPLE_E]).scale(1).fade(0.2).shift([0.2,0.2,0])
+
+ f_text = TextMobject("$f(x,y) = (y-x)(1-2x-3y)$").to_corner(UL)
+
+ self.set_camera_orientation(phi = 60 * DEGREES, theta = 75 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.wait(1)
+ self.play(Write(f))
+ self.wait(4)
--
cgit
From 91f4e736577c6a4bf1f17b5eded2942905a0573d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:49:41 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
---
.../file4_Types_of_critical_points.py | 134 +++++++++++++++++++++
1 file changed, 134 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
new file mode 100644
index 0000000..656fb68
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
@@ -0,0 +1,134 @@
+from manimlib.imports import*
+
+
+#---- Relative Maxima
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ r_text = TextMobject("Relative Maximum at ORIGIN",color ='#87CEFA')
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #----graph of the function f(x,y) = -x**2-y**2
+ surface = 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_B,YELLOW_C,YELLOW_D, YELLOW_E]).scale(1.5).shift([0,0,-0.51]).fade(0.3)
+
+ f_text = TextMobject("$f(x,y) = -x^2-y^2$").to_corner(UL)
+
+ d = Dot(color = "#800000").shift([0,0,0]) #---- critical point
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 45 * DEGREES)
+ self.add_fixed_in_frame_mobjects(r_text)
+ self.wait(1)
+ self.play(FadeOut(r_text))
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface),Write(d))
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(2)
+ self.play(FadeOut(axes),FadeOut(surface),FadeOut(f_text),FadeOut(d),FadeOut(label_x),FadeOut(label_y))
+
+
+#---- Relative Minima
+class secondScene(ThreeDScene):
+ def construct(self):
+
+ r2_text = TextMobject("Relative Minimum at ORIGIN",color ='#87CEFA')
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #----graph of the function g(x,y) = x**2+y**2
+ surface = 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_B,TEAL_C,TEAL_D,TEAL_E]).scale(1.5).shift([0,0,0.55]).fade(0.1)
+
+ d = Dot(color = "#800000").shift([0,0,0]) #---- critical point
+
+ g_text = TextMobject("$f(x,y) = x^2+y^2$").to_corner(UL)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 45 * DEGREES)
+ self.add_fixed_in_frame_mobjects(r2_text)
+ self.wait(1)
+ self.play(FadeOut(r2_text))
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface),Write(d))
+ self.add_fixed_in_frame_mobjects(g_text)
+ self.wait(2)
+ self.play(FadeOut(axes),FadeOut(surface),FadeOut(g_text),FadeOut(d),FadeOut(label_x),FadeOut(label_y))
+
+
+
+#---- Saddle Point
+class thirdScene(ThreeDScene):
+ def construct(self):
+
+ r3_text = TextMobject("Saddle Point", color = '#87CEFA')
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- graph of function h(x,y) = -x^2 + y^2
+ surface = 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_B,PURPLE_C,PURPLE_D,PURPLE_E]).scale(1.5).shift([0,0,0])
+
+ #---- curve(trace) along x axis
+ curve_x = ParametricSurface(
+ lambda u, v: np.array([
+ u*0.4,
+ v,
+ v**2
+ ]),v_min = -1, v_max = 1, u_min = -0.2, u_max = 0.2).shift([0,0,0.34]).scale(1.5).set_color("#800000")
+
+ #---- curve(trace) along y axis
+ curve_y = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v*0.4,
+ -u**2
+ ]),v_min = -0.2, v_max = 0.2, u_min = -1, u_max = 1).scale(1.6).shift([0,0,-0.1]).set_color("#800000")
+
+ d = Dot(color = GREEN).shift([0,0,0.1]) #---- critical point
+
+ h_text = TextMobject("$f(x,y) = -x^2+y^2$").to_corner(UL)
+
+ self.add_fixed_in_frame_mobjects(r3_text)
+ self.wait(1)
+ self.set_camera_orientation(phi = 50 * DEGREES,theta = 45 * DEGREES)
+ self.play(FadeOut(r3_text))
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.play(Write(surface))
+ self.wait(1)
+ self.add(curve_y)
+ self.add(d)
+ self.wait(1)
+ self.play(FadeOut(curve_y))
+ self.wait(1)
+ self.add(curve_x)
+ self.wait(1)
+ self.add(d)
+ self.wait(1)
--
cgit
From 9c6d394101ad89681ef497cd0667fa23e6f3d168 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:50:58 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
---
...file3_Tangent_plane_at_extrema_of_a_function.py | 73 ++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
new file mode 100644
index 0000000..e674113
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
@@ -0,0 +1,73 @@
+from manimlib.imports import*
+
+#---- tangent plane to minima of the function
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- parabola: f(x,y) = x**2 + y**2
+ parabola = 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_E,GREEN_D,GREEN_C,GREEN_B], resolution = (20, 20)).scale(1)
+
+ d = Dot(np.array([0,0,0]), color = '#800000') # ---- critical point
+
+ tangent_plane = Rectangle(fill_color = '#C0C0C0', fill_opacity = 0.3).move_to(ORIGIN).fade(0.7) # ----tangent plane
+
+ parabola_text = TextMobject("Minimum with horizontal tangent plane").scale(0.7).to_corner(UL)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 45 * DEGREES)
+ self.begin_ambient_camera_rotation(rate = 0.2)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.add_fixed_in_frame_mobjects(parabola_text)
+ self.wait(1)
+ self.play(Write(parabola))
+ self.play(ShowCreation(d))
+ self.wait(1)
+ self.play(ShowCreation(tangent_plane))
+ self.wait(2)
+ self.play(FadeOut(parabola_text),FadeOut(parabola),FadeOut(tangent_plane),FadeOut(d),FadeOut(label_x),FadeOut(label_y),FadeOut(axes))
+
+
+#---- tangent plane to maxima of the function
+class secondScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #----parabola: g(x,y) = -x**2-y**2
+ parabola = 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 = [BLUE_E,BLUE_D,BLUE_C,BLUE_B], resolution = (20, 20)).scale(1)
+
+ d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
+
+ tangent_plane = Rectangle(fill_color = '#C0C0C0',fill_opacity = 0.3).move_to(ORIGIN).fade(0.7) #---- tangent plane
+
+ parabola_text = TextMobject("Maximum with horizontal tangent plane").scale(0.7).to_corner(UL)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 45 * DEGREES)
+ self.begin_ambient_camera_rotation(rate = 0.2)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.add_fixed_in_frame_mobjects(parabola_text)
+ self.wait(1)
+ self.play(Write(parabola))
+ self.play(ShowCreation(d))
+ self.wait(1)
+ self.play(ShowCreation(tangent_plane))
+ self.wait(2)
--
cgit
From a79446a128f65df2de58229ee5b48a12fe29cdd4 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:51:58 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
---
.../Critical-Points/file2_Traces_and_Tangent.py | 88 ++++++++++++++++++++++
1 file changed, 88 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
new file mode 100644
index 0000000..4b020e1
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
@@ -0,0 +1,88 @@
+from manimlib.imports import*
+import math as m
+
+#---- tangent to the trace with x constant
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes().scale(1)
+ label_x = TextMobject("$x$").shift([5.8,-0.5,0])
+ label_y = TextMobject("$y$").shift([-0.5,-5.6,0]).rotate(-4.5)
+
+ #---- graph of f(x,y) = -x^2-y^2
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1,checkerboard_colors=[PURPLE_C,PURPLE_D,PURPLE_E,PURPLE_B]).scale(1.5).shift([0,0,2]).rotate(0.2)
+
+ #---- curve(trace) along y axis
+ curve = ParametricSurface(
+ lambda u, v: np.array([
+ u*0.4,
+ v,
+ -v**2
+ ]),v_min =-1 , v_max =1 , u_min = -0.1, u_max = 0.1).scale(1.6).shift([0.02,0.1,2.3]).set_color("#800000").rotate(0.1)
+
+ d = Dot(color =YELLOW).shift([-0.05,-0.2,2.3]) #---- critical point
+
+ x_text = TextMobject("Tangent to the trace with $x$ constant at critical point").shift(3*RIGHT+2*UP).scale(0.5).to_corner(UL)
+
+ tangent_line = Line([-0.05,-1.5,2.3],[-0.05,1.5,2.3],color = '#228B22')
+
+ self.add(axes)
+ self.set_camera_orientation(phi = 40 * DEGREES, theta = 55 * DEGREES)
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(x_text)
+ self.add(curve)
+ self.wait(1)
+ self.play(Write(tangent_line),Write(d))
+ self.wait(1)
+
+
+
+#---- tangent to the trace with y constant
+class secondScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes().scale(1)
+ label_x = TextMobject("$x$").shift([5.8,-0.5,0])
+ label_y = TextMobject("$y$").shift([-0.5,-5.6,0]).rotate(-4.5)
+
+ #---- graph of f(x,y) = -x^2-y^2
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),u_min = -1, u_max = 1, v_min = -1, v_max = 1, checkerboard_colors = [PURPLE_B,PURPLE_C,PURPLE_D,PURPLE_E]).scale(1.5).shift([0,0,2]).rotate(0.2)
+
+ #---- curve(trace) along x axis
+ curve = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v*0.4,
+ -u**2
+ ]),v_min = -0.1, v_max = 0.1, u_min = -1, u_max = 1).scale(1.6).shift([0.07,0.1,2.3]).set_color("#800000")
+
+ d = Dot(color = YELLOW).shift([0,-0.2,2.3]) #---- critical point
+
+ tangent_line = Line(color = '#228B22').scale(1).shift([0,-0.2,2.3]).rotate(m.radians(190),LEFT)
+
+ y_text = TextMobject("Tangent to the trace with $y$ constant at critical point").shift(3*RIGHT+2*UP).scale(0.5).to_corner(UL)
+
+ self.add(axes)
+ self.set_camera_orientation(phi = 40 * DEGREES, theta = 55 * DEGREES)
+ self.add(label_x)
+ self.add(label_y)
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(y_text)
+ self.add(curve)
+ self.wait(1.5)
+ self.play(Write(tangent_line),Write(d))
+ self.wait(0.5)
--
cgit
From 9977b22482702c409517e391ba380f59c5cd557c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:53:16 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
---
.../file1_Critical_Point_of_a_function.py | 77 ++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
new file mode 100644
index 0000000..e8cb08d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
@@ -0,0 +1,77 @@
+from manimlib.imports import*
+import math as m
+
+#---- case 1: parial derivatives exist at critical point of the function
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- f(x,y) = e^(-10x^2-10y^2)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ m.exp(-10*u**2-10*v**2)
+ ]),u_min = -1, u_max = 1, v_min = -1, v_max = 1, checkerboard_colors = [TEAL_E,TEAL_D,TEAL_C,TEAL_B]).fade(0.6).scale(3.5).shift([0,0,1.5])
+
+ l1 = Line([0,0,3.75],[0,0,0],color = '#800000')
+
+ d = Dot([0,0,3.75],color = '#800000') #---- critical point
+
+ d_text = TextMobject("$\\frac{\\partial f}{\\partial x}=\\frac{\\partial f}{\\partial y} = 0$").scale(0.8).to_corner(UL)
+
+ f_text = TextMobject("Critical Point ",color = YELLOW).shift(3.4*UP).scale(0.5)
+
+ self.set_camera_orientation(phi = 45*DEGREES, theta = 40*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.add_fixed_in_frame_mobjects(d_text)
+ self.begin_ambient_camera_rotation(rate = 0.2)
+ self.play(Write(surface))
+ self.wait(1)
+ self.play(Write(l1))
+ self.play(Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(3)
+ self.play(FadeOut(f_text),FadeOut(surface),FadeOut(axes),FadeOut(d_text),FadeOut(d),FadeOut(l1),FadeOut(label_x),FadeOut(label_y))
+
+
+#---- case 2: parial derivatives do not exist at critical point of the function
+class secondScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- g(x,y)= |x|+|y|
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ abs(u)+abs(v)
+ ]),u_min = -1.5, u_max = 1.5, v_min = -1.5, v_max = 1.5, checkerboard_colors = [TEAL_E,TEAL_D,TEAL_C,TEAL_B])
+
+ d2 = Dot([0,0,0],color = '#800000') #---- critical point
+
+ d2_text = TextMobject("$\\frac{\\partial f}{\\partial x}$ and/or $\\frac{\\partial f}{\\partial y}$ does not exist").scale(0.7).to_corner(UL)
+
+ g_text = TextMobject("Critical Point",color = YELLOW).shift(1.2*RIGHT).scale(0.6)
+
+ self.set_camera_orientation(phi = 60*DEGREES, theta = 40*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.begin_ambient_camera_rotation(rate = 0.2)
+ self.wait(1)
+ self.play(Write(surface2))
+ self.wait(1)
+ self.play(Write(d2))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(g_text)
+ self.wait(2)
--
cgit
From b94975950b6d53d171cb15123a65c4d4abad75b4 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:54:27 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Critical-Points/README.md to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md
---
.../Critical-Points/README.md | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md
(limited to 'FSF-2020/calculus-of-several-variables')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md
new file mode 100644
index 0000000..f0747bb
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md
@@ -0,0 +1,32 @@
+