SubTopic: Critical Points
- Animations
+ Animations
- file1_Critical_Point_of_a_function
+file1_Critical_Point_of_a_function
![file1_Critical_Point_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif?raw=true)
-
-file2_Traces_and_Tangent
+file2_Traces_and_Tangent
- ![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
+![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
-
-file3_Tangent_plane_at_extrema_of_a_function
- ![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
+file3_Tangent_plane_at_extrema_of_a_function
+
+![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
-
-file4_Types_of_critical_points
+file4_Types_of_critical_points
- ![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
+![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
-
-file5_f(x,y)=(y-x)(1-2x-3y)
+file5_f(x,y)=(y-x)(1-2x-3y)
- ![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
+![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
-
-
-
-
--
cgit
From 3bf2eb6ac38722218f5a9b3ab89c12629073ed9d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 01:16:02 +0530
Subject: Update README.md
---
FSF-2020/approximations-and-optimizations/Critical-Points/README.md | 4 ----
1 file changed, 4 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/README.md b/FSF-2020/approximations-and-optimizations/Critical-Points/README.md
index 598607b..f0747bb 100644
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/README.md
+++ b/FSF-2020/approximations-and-optimizations/Critical-Points/README.md
@@ -1,9 +1,5 @@
SubTopic: Critical Points
- Animations
-
-
-
file1_Critical_Point_of_a_function
--
cgit
From 14038e183235f0c3c9c8b354e1e16b17728e4bbf Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 01:45:49 +0530
Subject: Create file1_Second_order_partial_derivatives.py
Source code of first animation of the lecture note: The second derivative test---
.../file1_Second_order_partial_derivatives.py | 78 ++++++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
new file mode 100644
index 0000000..84052cc
--- /dev/null
+++ b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
@@ -0,0 +1,78 @@
+from manimlib.imports import*
+
+#---- graphs of second-order partial derivatives of a function
+class SurfacesAnimation(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ x_label = TextMobject('$x$').shift([5,0.5,0]) #---- x axis
+ y_label = TextMobject('$y$').shift([0.5,4,0]).rotate(-4.5) #---- y axis
+
+ #---- surface of function: f(x,y) = (x^2+y^2)^2
+ surface_f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ ((u**2)+(v**2))**2
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[GREEN_D, GREEN_E]).scale(1)
+
+ #---- surface of second-order partial derivative f_xx
+ surface_fxx = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (3*u**2)+(v**2)
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(0.6)
+
+ #---- surface of second-order partial derivative f_yy
+ surface_fyy = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (u**2)+(3*v**2)
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[PURPLE_D, PURPLE_E]).scale(0.6).shift([0,0,0])
+
+ #---- surface of second-order partial derivative f_xy = f_yx
+ surface_fxy = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 8*u*v
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_D, TEAL_E]).scale(0.6)
+
+ f_text= TextMobject("$f(x,y) = (x^2+y^2)^2$",color = GREEN).scale(0.7).to_corner(UL)
+
+ fxx_text= TextMobject("$f_{xx} = 12x^2+4y^2$ (Concavity along x axis)",color = YELLOW).scale(0.5).to_corner(UL)
+
+ fyy_text= TextMobject("$f_{yy} = 4x^2+12y^2$(Concavity along y axis)",color = PURPLE).scale(0.5).to_corner(UL)
+
+ fxy_text= TextMobject("$f_{xy} = f_{yx} = 8xy$ (Twisting of the function)",color = TEAL).scale(0.5).to_corner(UL)
+
+
+ self.set_camera_orientation(phi = 40 * DEGREES, theta = 45 * DEGREES)
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.add(x_label)
+ self.add(y_label)
+ self.wait(1)
+ self.play(Write(surface_f))
+ self.wait(2)
+ self.play(FadeOut(f_text))
+
+
+ self.play(ReplacementTransform(surface_f,surface_fxx))
+
+ self.add_fixed_in_frame_mobjects(fxx_text)
+ self.wait(2)
+ self.play(FadeOut(fxx_text))
+
+ self.play(ReplacementTransform(surface_fxx,surface_fyy))
+ self.add_fixed_in_frame_mobjects(fyy_text)
+ self.wait(2)
+ self.play(FadeOut(fyy_text))
+
+ self.play(ReplacementTransform(surface_fyy,surface_fxy))
+ self.move_camera(phi = 35 * DEGREES, theta = 80 * DEGREES)
+ self.add_fixed_in_frame_mobjects(fxy_text)
+ self.wait(2)
--
cgit
From 7cfd798434a60d8664b3a0eff04193cfd93b50ab Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 01:49:25 +0530
Subject: Add files via upload
---
.../file1_Second_order_partial_derivatives.gif | Bin 0 -> 3166332 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
new file mode 100644
index 0000000..3471e4d
Binary files /dev/null and b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif differ
--
cgit
From 14a06e6bf4ed8a5a661555f193ba145fe8121b86 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 02:04:03 +0530
Subject: Create file4_Contour_Diagram.py
---
.../file4_Contour_Diagram.py | 121 +++++++++++++++++++++
1 file changed, 121 insertions(+)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
new file mode 100644
index 0000000..618dcbd
--- /dev/null
+++ b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
@@ -0,0 +1,121 @@
+from manimlib.imports import*
+
+#---- contour diagram animation
+class ContourDiagram(ThreeDScene):
+ def construct(self):
+
+ heading = TextMobject("CONTOUR DIAGRAM", color = YELLOW).scale(1)
+
+ 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
+
+ #---- surface of a paraboloid
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(v)*u,
+ np.sin(v)*u,
+ u**2
+ ]),v_min = -2, v_max = 2, u_min = -2, u_max = 2, checkerboard_colors = [GREEN_B,GREEN_C,GREEN_D,GREEN_E]).shift([0,0,0]).scale(0.5)
+
+ #---- first contour projection
+ contour1 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 2.5*u)
+ ])).fade(0.5).scale(0.21).shift([0,0,1.01])
+
+ #---- first contour line
+ c_1 = Circle(color = BLUE).scale(0.21).shift([0,0,0]).rotate(0.1,DOWN)
+
+ #-------------------------------------------------
+
+ #---- second contour projection
+ contour2 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.6*u)
+ ])).fade(0.5).scale(0.41).shift([0,0,0.3]).set_color(RED)
+
+ #---- second contour line
+ c_2 = Circle(color = RED).scale(0.41).shift([0,0,0]).rotate(0.1,DOWN)
+
+ #-------------------------------------------------
+
+ #---- third contour projection
+ contour3 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ]),
+ resolution=(6, 32)).fade(0.5).scale(0.61).shift([0,0,0.4]).set_color(YELLOW)
+
+ #---- third contour line
+ c_3 = Circle(color = YELLOW).scale(0.61).shift([0,0,0])
+
+ #-------------------------------------------------
+
+ #---- fourth contour projection
+ contour4 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ])).fade(0.7).scale(0.81).shift([0,0,0.7]).set_color(PINK)
+
+ #---- fourth contour line
+ c_4 = Circle(color = PINK).scale(0.81).shift([0,0,0])
+
+ #-------------------------------------------------
+
+ #---- fifth contour projection
+ contour5 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ])).fade(0.7).scale(1.01).shift([0,0,1]).set_color(PURPLE)
+
+ #---- fifth contour line
+ c_5 = Circle(color = PURPLE).scale(1.01).shift([0,0,0])
+
+ c_text= TextMobject("Contour Lines").scale(0.5).shift(2*DOWN)
+ s = Square().scale(1.3)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 10 * DEGREES)
+ self.add_fixed_in_frame_mobjects(heading)
+ self.wait(1)
+ self.play(FadeOut(heading))
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.wait(1)
+ self.add(contour1)
+ self.wait(1)
+ self.play(Write(c_1))
+ self.play(ReplacementTransform(contour1,contour2))
+ self.wait(1)
+ self.play(Write(c_2))
+ self.play(ReplacementTransform(contour2,contour3))
+ self.wait(1)
+ self.play(Write(c_3))
+ self.play(ReplacementTransform(contour3,contour4))
+ self.wait(1)
+ self.play(Write(c_4))
+ self.play(ReplacementTransform(contour4,contour5))
+ self.wait(1)
+ self.play(Write(c_5))
+ self.wait(1)
+ self.play(FadeOut(contour5),FadeOut(axes),FadeOut(f),FadeOut(contour5),FadeOut(contour4),FadeOut(contour3),FadeOut(contour2),FadeOut(contour1))
+ self.wait(1)
+ self.move_camera(phi=0 * DEGREES,theta= 90*DEGREES)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(c_text)
+ self.wait(1)
+ self.play(ShowCreation(s),FadeOut(c_text))
+ self.wait(1)
--
cgit
From 1a3fcb648c8be25ff2a21833c532330be6c5238c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 02:44:28 +0530
Subject: Update file4_Contour_Diagram.py
---
.../The-Second-Derivative-Test/file4_Contour_Diagram.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
index 618dcbd..d3084e2 100644
--- a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
+++ b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
@@ -50,8 +50,7 @@ class ContourDiagram(ThreeDScene):
np.cos(TAU * v),
np.sin(TAU * v),
2*(1 - 1.5*u)
- ]),
- resolution=(6, 32)).fade(0.5).scale(0.61).shift([0,0,0.4]).set_color(YELLOW)
+ ])).fade(0.5).scale(0.61).shift([0,0,0.4]).set_color(YELLOW)
#---- third contour line
c_3 = Circle(color = YELLOW).scale(0.61).shift([0,0,0])
@@ -111,7 +110,7 @@ class ContourDiagram(ThreeDScene):
self.wait(1)
self.play(Write(c_5))
self.wait(1)
- self.play(FadeOut(contour5),FadeOut(axes),FadeOut(f),FadeOut(contour5),FadeOut(contour4),FadeOut(contour3),FadeOut(contour2),FadeOut(contour1))
+ self.play(FadeOut(contour5),FadeOut(axes),FadeOut(label_x),FadeOut(label_y),FadeOut(surface),FadeOut(contour5),FadeOut(contour4),FadeOut(contour3),FadeOut(contour2),FadeOut(contour1))
self.wait(1)
self.move_camera(phi=0 * DEGREES,theta= 90*DEGREES)
self.wait(1)
--
cgit
From 51b69836caaea9743d6d4a3c91a789b3fdc8ceee Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 02:47:35 +0530
Subject: Add files via upload
---
.../file4_Contour_Diagram.gif | Bin 0 -> 1150777 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
new file mode 100644
index 0000000..129fedc
Binary files /dev/null and b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif differ
--
cgit
From 39e28347b3584d3077cefa2b303d6fa6ac802feb Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:47:48 +0530
Subject: Create file2_Degenerate_Hessian_Matrix.py
---
.../file2_Degenerate_Hessian_Matrix.py | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..c1e3516
--- /dev/null
+++ b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
@@ -0,0 +1,52 @@
+from manimlib.imports import*
+
+class firstscene(Scene):
+ def construct(self):
+
+ h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
+
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
+ c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
+ m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
+
+
+ t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
+
+ self.play(ShowCreation(h_text))
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(m_text))
+ self.wait(2)
+ self.play(ReplacementTransform(m_text,d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(2)
+
+
+class SecondScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (2*u**3)+v**3
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.1)
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(2)
--
cgit
From 355abf1850e7884e91f6bcf4fc35272a704b45b7 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:48:41 +0530
Subject: Create file3_Nondegenerate_Hessian_Matrix.py
---
.../file3_Nondegenerate_Hessian_Matrix.py | 145 +++++++++++++++++++++
1 file changed, 145 insertions(+)
create mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..3056842
--- /dev/null
+++ b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
@@ -0,0 +1,145 @@
+from manimlib.imports import*
+
+class firstScene(Scene):
+ def construct(self):
+
+ e_text = TextMobject("Case 3: One positive and one negative eigenvalue", color = YELLOW).scale(1).shift(3*UP+1*LEFT)
+ f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$").scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(1,0)$").scale(0.8).next_to(f_text).shift(DOWN+4*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(1,0)= \\begin{vmatrix} 2 \\space & 0\\space \\\\ 0 & -4 \\end{vmatrix} \\end{equation*}",color = GREEN).scale(0.9)
+
+ t_text = TextMobject("$D_2 = -8<0$ (Saddle Point)", color = BLUE).scale(0.9).shift(2*DOWN)
+
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(2)
+
+class SaddlePoint(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2-2*v**2-2*u
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[RED_C,PURPLE_D,YELLOW_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=35 * DEGREES,theta=80*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.4)
+
+ f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$",color = GREEN).shift(2*DOWN+2*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(3)
+
+
+class secondScene(Scene):
+ def construct(self):
+
+ h_text = TextMobject("NonDegenerate Hessian Matrix", color = GREEN).scale(1).shift(UP)
+ e_text = TextMobject("Case 1: Two positive eigenvalues", color = PINK).scale(1).shift(3*UP+2*LEFT)
+ f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = TEAL).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(0,0)$",color = TEAL).scale(0.8).next_to(f_text).shift(DOWN+4.5*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 4 \\space & -2\\space \\\\ -2 & 6 \\end{vmatrix} \\end{equation*}",color = PINK).scale(0.9)
+
+ t_text = TextMobject("$D_2 = 20>0$ (Relative Maxima or Relative Minima)", color = YELLOW).scale(0.9).shift(1*DOWN)
+ tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =4 >0$ (Relative Minima)", color = YELLOW).scale(0.9).shift(2*DOWN)
+
+
+ self.play(ShowCreation(h_text))
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(1)
+ self.play(ShowCreation(tm_text))
+ self.wait(2)
+ self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
+
+class Minima(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2*u**2+3*v**2-2*v*u
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,YELLOW_D,GREEN_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=10 * DEGREES,theta=90*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.2)
+
+ f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = PURPLE).shift(2*DOWN+3*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(2)
+
+
+class thirdScene(Scene):
+ def construct(self):
+
+
+ e_text = TextMobject("Case 2: Two negative eigenvalues", color = RED).scale(1).shift(3*UP+2*LEFT)
+ f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = BLUE).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(0,0)$",color = BLUE).scale(0.8).next_to(f_text).shift(DOWN+3.8*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} -2 \\space & 0\\space \\\\ 0 & -8 \\end{vmatrix} \\end{equation*}",color = TEAL).scale(0.9)
+
+ t_text = TextMobject("$D_2 = 16>0$ (Relative Maxima or Relative Minima)" ).scale(0.9).shift(1*DOWN)
+ tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =-2 <0$ (Relative Maxima)").scale(0.9).shift(2*DOWN)
+
+
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(1)
+ self.play(ShowCreation(tm_text))
+ self.wait(2)
+ self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
+
+
+class Maxima(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-4*v**2
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,PURPLE_D,TEAL_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=75 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.4)
+
+ f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = YELLOW).shift(2*DOWN+3*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(1)
+ self.move_camera(phi=30*DEGREES,theta=45*DEGREES,run_time=5)
+ self.wait(2)
--
cgit
From e4de3f4275bf5684fc14873730bfb050b4cf7d17 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:55:58 +0530
Subject: Update and rename file1_TangentPlanes.py to file1_Tangent_Plane.py
---
.../file1_TangentPlanes.py | 39 ----------------
.../file1_Tangent_Plane.py | 52 ++++++++++++++++++++++
2 files changed, 52 insertions(+), 39 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.py
create mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.py
deleted file mode 100644
index 8e3a19e..0000000
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from manimlib.imports import*
-
-class TangenttoSurface(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- #parabola: -x**2-y**2
- p = 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_C,TEAL_D],
- resolution=(20, 20)).scale(1).shift(1*RIGHT+2*UP)
- self.set_camera_orientation(phi = 35 * DEGREES,theta = -40 * DEGREES )
-
- r = Rectangle(side_length=2,side_breadth= 1, fill_color=PURPLE, fill_opacity=0.2).shift(ORIGIN-1+3*UP+2*RIGHT).scale(0.7) #---tangent plane along x axis
-
- r_text = TextMobject("Tangent Plane along $x$ axis",color = '#FFE4E1').scale(0.6).to_corner(UL)
- r2_text = TextMobject("Tangent Plane along $y$ axis",color = '#FFE4E1').scale(0.6).to_corner(UL)
-
- a = Arrow(color = '#FFFFF0').shift(ORIGIN-1+3*UP+4*RIGHT).scale(0.5)
- a2 = Arrow(color = '#FFFFF0').shift(ORIGIN+0.5+3*UP+RIGHT).scale(0.5)
- a2.rotate(1.571) #----1.571 radian = 90 degrees
-
- self.add(axes)
- self.play(Write(p))
- self.begin_ambient_camera_rotation(rate = 0.1)
- self.add_fixed_in_frame_mobjects(r_text)
- self.play(ShowCreation(r))
- self.play(ShowCreation(a))
- self.wait(1)
- self.play(FadeOut(r),FadeOut(a),FadeOut(r_text))
-
- r.rotate(1.571) #---tangent plane along y axis
- self.play(ShowCreation(r))
- self.play(ShowCreation(a2))
- self.add_fixed_in_frame_mobjects(r2_text)
- self.wait(2)
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
new file mode 100644
index 0000000..3632d7e
--- /dev/null
+++ b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
@@ -0,0 +1,52 @@
+from manimlib.imports import*
+
+#---- tangent plane is parallel to the surface of the funtion at a point
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ s1_text=TextMobject("Suppose, the point $(x,y)$ lies on the surface of the function.").scale(0.5).shift(2*UP)
+ s2_text=TextMobject("When zooming on that point, the surface would appear more and more like a plane.").scale(0.5).shift(1*UP)
+ s3_text=TextMobject("This plane is called the tangent plane.").scale(0.5)
+
+ #---- graph of function f(x,y) = -x^2-y^2
+
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_B,YELLOW_C,YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(1)
+
+
+ d = Dot([0,0,0],color = '#800000') #---- critical point
+
+ r = Rectangle(color = PURPLE,fill_opacity=0.2).shift([0.1,0,0]).scale(0.3) #---- tangent plane
+
+ s = 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]).shift([0,0,0]).scale(3.5)
+
+ d2 = Dot([0,0,2.5],color = '#800000') #---- changing position of critical point
+
+ r2 = Rectangle(color = PURPLE,fill_opacity=0.5).shift([0.1,0,2.5]).scale(0.3) #---- changing position of tangent plane
+
+ self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
+ self.add_fixed_in_frame_mobjects(s1_text)
+ self.add_fixed_in_frame_mobjects(s2_text)
+ self.add_fixed_in_frame_mobjects(s3_text)
+ self.wait(2)
+ self.play(FadeOut(s1_text))
+ self.play(FadeOut(s2_text))
+ self.play(FadeOut(s3_text))
+ self.wait(1)
+ self.play(Write(f))
+ self.play(Write(d))
+ self.play(Write(r))
+ self.wait(2)
+ self.play(ReplacementTransform(f,s),ReplacementTransform(d,d2),ReplacementTransform(r,r2))
+ self.wait(2)
+
+
--
cgit
From e59375a9f91c17376c690fd59f86cfe0490018d0 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:56:17 +0530
Subject: Update file1_Tangent_Plane.py
---
.../Tangent-Plane-Approximations/file1_Tangent_Plane.py | 2 --
1 file changed, 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
index 3632d7e..4c17f90 100644
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
+++ b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
@@ -48,5 +48,3 @@ class firstScene(ThreeDScene):
self.wait(2)
self.play(ReplacementTransform(f,s),ReplacementTransform(d,d2),ReplacementTransform(r,r2))
self.wait(2)
-
-
--
cgit
From 6a369492d9bfceb37b27856c082d218f50dbcb87 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:56:37 +0530
Subject: Delete file1_TangentPlanes.mp4
---
.../file1_TangentPlanes.mp4 | Bin 1483459 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.mp4 b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.mp4
deleted file mode 100644
index 6a3ba6d..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_TangentPlanes.mp4 and /dev/null differ
--
cgit
From 4d945dced9720f944215a39d10f78206334f2f61 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:57:12 +0530
Subject: Delete file2_Tangent_plane_approximation_visualization.mp4
---
...file2_Tangent_plane_approximation_visualization.mp4 | Bin 336179 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.mp4 b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.mp4
deleted file mode 100644
index bc3448b..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.mp4 and /dev/null differ
--
cgit
From dd56199fd1aa1e1dc74d7d05280093cc5f5e66b9 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:57:23 +0530
Subject: Delete file3_non_differentiable_function.mp4
---
.../file3_non_differentiable_function.mp4 | Bin 424364 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.mp4 b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.mp4
deleted file mode 100644
index 7417a87..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.mp4 and /dev/null differ
--
cgit
From e37b2e1ad48269d1fa32c402dbf85331b6490376 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:57:34 +0530
Subject: Delete file4_Tangent plane_at_critical_points.mp4
---
.../file4_Tangent plane_at_critical_points.mp4 | Bin 3101810 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.mp4
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.mp4 b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.mp4
deleted file mode 100644
index 2c64f38..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.mp4 and /dev/null differ
--
cgit
From ada683cd4827f2b996998a10ed5c967b7945d530 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 03:58:34 +0530
Subject: Add files via upload
---
.../file1_Tangent_Plane.gif | Bin 0 -> 827096 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
new file mode 100644
index 0000000..2b8bf5f
Binary files /dev/null and b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif differ
--
cgit
From 581ad7f906e4b9a13d5fe963229d458f0abff7f2 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:07:11 +0530
Subject: Update file2_Tangent_plane_approximation_visualization.py
---
...e2_Tangent_plane_approximation_visualization.py | 90 ++++++++++++++++------
1 file changed, 65 insertions(+), 25 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
index 984db16..d1ecf8c 100644
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
+++ b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
@@ -1,34 +1,74 @@
from manimlib.imports import*
-class TangenttoSurface(ThreeDScene):
-
+#---- tangent plane is parallel to the x-y plane
+class MaximaScene(ThreeDScene):
def construct(self):
- axes = ThreeDAxes()
-
- #----f(x,y): x**2+y**2
- p = ParametricSurface(
+
+ axes = ThreeDAxes().scale(1.2)
+ label_x= TextMobject("$x$").shift([5.4,-0.5,0]) #---- x axis
+ label_y= TextMobject("$y$").shift([-0.5,5.2,0]).rotate(-4.5) #---- y axis
+
+ #---- graph of the function
+ s = 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_C,GREEN_D],
- resolution = (20, 20)).scale(1)
- self.set_camera_orientation(phi = 75*DEGREES)
+ 1.5*np.cos(u)*np.cos(v),
+ 1.5*np.cos(u)*np.sin(v),
+ 1.5*np.sin(u)
+ ]),u_min=0,u_max=PI,v_min=PI,v_max=2*PI,checkerboard_colors=[BLUE_B,BLUE_C,BLUE_D,BLUE_E]).scale(1.5).shift([-0.8,0.5,1.5])
- h_text = TextMobject("The graph tends to coincide with its tangent plane").scale(0.5).to_corner(UL)
- d = Dot([0,0,0],color ='#800000') #----critical point
- r = Rectangle(height = 2,breadth = 1,color = YELLOW).scale(0.5) #----tangent plane to critical point
- line1 = DashedLine(color=RED).shift(4*UP+1.3*RIGHT).rotate(1.571,UP).scale(1.2)
- line2 = DashedLine(color=RED).shift(4*UP-1.3*RIGHT).rotate(1.571,UP).scale(1.2)
+ d1 = Dot([0.2,2.01,2.24],color = '#800000').rotate(1.1,LEFT) #---- point(x_0,y_0)
+ d1_copy = Dot([1.1,2.2,-0.45],color = '#800000') #---- projection of point(x_0,y_0) on x-y plane
+ d1_text = TextMobject("$(x_0,y_0)$",color = "#8B0000").scale(0.4).shift(1.3*RIGHT+1.1*UP)
- r2 = Rectangle(height = 2, breadth = 1,color = GREEN, fill_opacity=0.3).scale(0.5)
+ d2 = Dot([1.1,2.2,2.7],color = '#800000').rotate(1,LEFT) #---- point(x,y)
+ d2_copy = Dot([0.1,1.95,0.4],color = '#800000') #---- projection of point(x,y) on x-y plane
+ d2_text = TextMobject("$(x,y)$",color = "#8B0000").scale(0.4).shift(0.6*RIGHT+0.8*UP)
- self.add(axes)
- self.play(Write(r))
- self.play(Write(p),Write(d))
- self.play(ShowCreation(line1),ShowCreation(line2))
- self.wait(2)
+ t_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2.9]) #---- tangent plane
+
+ t_text= TextMobject("Tangent Plane",color = RED).scale(0.5).shift(0.3*RIGHT+1.3*UP).rotate(math.radians(5),LEFT)
+
+ l1 = Line([1.1,2.2,2.6],[1.1,2.2,-0.45]).fade(0.2)
+ l2 = Line([0.1,1.95,2.05],[0.1,1.95,0.4]).fade(0.2)
+
+ a1 = Line([0.1,1.95,0.4],[1.1,2.2,-0.45],color ="#00FF7F")
+ a_x = Line([0.1,1.95,0.4],[1.7,1.95,0.4],color ="#9400D3")
+ a_y = Line([0.1,1.95,0.4],[0.1,2.75,0.4],color ="#8B4513")
+ a2 = Line([1.7,1.95,0.4],[1.7,2.75,0.4])
+ a3 = Line([0.1,2.75,0.4],[1.7,2.75,0.4])
- self.play(FadeOut(line1),FadeOut(line2),ReplacementTransform(p,r2))
- self.add_fixed_in_frame_mobjects(h_text)
+ #---- transition of tangent plane
+
+ t2_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2])
+ t3_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([1.1,2.5,2])
+ t4_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([0.9,2.35,0.4])
+
+ #-------------------------------------------
+ self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(s))
+ self.wait(1)
+ self.play(Write(d1))
+ self.add_fixed_in_frame_mobjects(d1_text)
+ self.play(ShowCreation(t_plane))
+ self.add_fixed_in_frame_mobjects(t_text)
+ self.wait(1)
+ self.play(FadeOut(t_text),Write(d2))
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.wait(1)
+ self.play(Write(l1),Write(l2))
+ self.play(Write(d2_copy),Write(d1_copy))
+ self.wait(1)
+ self.play(Write(a1),Write(a_x),Write(a_y))
+ self.wait(1)
+ self.play(Write(a2),Write(a3))
+ self.wait(1)
+ self.play(ReplacementTransform(t_plane,t2_plane))
+ self.wait(1)
+ self.play(ReplacementTransform(t2_plane,t3_plane))
self.wait(1)
+ self.play(ReplacementTransform(t3_plane,t4_plane))
+ self.wait(1)
--
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 ----------------------
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py | 29 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 29 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
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')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py b/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
deleted file mode 100644
index 41c3b61..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
+++ /dev/null
@@ -1,29 +0,0 @@
-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)
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 ---------------------
.../file4_Types_of_critical_points.py | 134 +++++++++++++++++++++
2 files changed, 134 insertions(+), 134 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py b/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
deleted file mode 100644
index 656fb68..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
+++ /dev/null
@@ -1,134 +0,0 @@
-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)
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 ----------------------
...file3_Tangent_plane_at_extrema_of_a_function.py | 73 ++++++++++++++++++++++
2 files changed, 73 insertions(+), 73 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
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')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py b/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
deleted file mode 100644
index e674113..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.py
+++ /dev/null
@@ -1,73 +0,0 @@
-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)
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 ----------------------
.../Critical-Points/file2_Traces_and_Tangent.py | 88 ++++++++++++++++++++++
2 files changed, 88 insertions(+), 88 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py b/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
deleted file mode 100644
index 4b020e1..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.py
+++ /dev/null
@@ -1,88 +0,0 @@
-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)
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 ----------------------
.../file1_Critical_Point_of_a_function.py | 77 ++++++++++++++++++++++
2 files changed, 77 insertions(+), 77 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
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')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py b/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
deleted file mode 100644
index e8cb08d..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.py
+++ /dev/null
@@ -1,77 +0,0 @@
-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)
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 ----------------------
.../Critical-Points/README.md | 32 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 32 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/README.md
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/README.md b/FSF-2020/approximations-and-optimizations/Critical-Points/README.md
deleted file mode 100644
index f0747bb..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical-Points/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-SubTopic: Critical Points
-
-
-file1_Critical_Point_of_a_function
-
-![file1_Critical_Point_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif?raw=true)
-
-
-
-file2_Traces_and_Tangent
-
-![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
-
-
-
-file3_Tangent_plane_at_extrema_of_a_function
-
-![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
-
-
-
-file4_Types_of_critical_points
-
-![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
-
-
-
-file5_f(x,y)=(y-x)(1-2x-3y)
-
-![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
-
-
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 @@
+SubTopic: Critical Points
+
+
+file1_Critical_Point_of_a_function
+
+![file1_Critical_Point_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif?raw=true)
+
+
+
+file2_Traces_and_Tangent
+
+![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
+
+
+
+file3_Tangent_plane_at_extrema_of_a_function
+
+![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
+
+
+
+file4_Types_of_critical_points
+
+![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
+
+
+
+file5_f(x,y)=(y-x)(1-2x-3y)
+
+![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
+
+
--
cgit
From 31c5564ddab507edd28994ba8555d61d97cb7eb6 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:55:06 +0530
Subject: Delete file1_Critical_Point_of_a_function.gif
---
.../file1_Critical_Point_of_a_function.gif | Bin 8077401 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif b/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif
deleted file mode 100644
index ca3989c..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif and /dev/null differ
--
cgit
From 9c4808b4f8c21cf24d92c7b8c9510c8481b06208 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:55:16 +0530
Subject: Delete file2_Traces_and_Tangent.gif
---
.../Critical-Points/file2_Traces_and_Tangent.gif | Bin 2552938 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif b/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif
deleted file mode 100644
index 84acf2e..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif and /dev/null differ
--
cgit
From 855549cea94aa8d2ab141ec66c318bb84f80c82d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:55:24 +0530
Subject: Delete file3_Tangent_plane_at_extrema_of_a_function.gif
---
.../file3_Tangent_plane_at_extrema_of_a_function.gif | Bin 2198637 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif b/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif
deleted file mode 100644
index 14fb318..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif and /dev/null differ
--
cgit
From 91d5940494b278eabec2a86a9f95b4c735423d6a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:55:32 +0530
Subject: Delete file4_Types_of_critical_points.gif
---
.../file4_Types_of_critical_points.gif | Bin 3864765 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif b/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
deleted file mode 100644
index 91e7084..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif and /dev/null differ
--
cgit
From efcd9e6b2bc7865523cf428827829d0430450a3a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:55:43 +0530
Subject: Delete file5_f(x,y)=(y-x)(1-2x-3y).gif
---
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif | Bin 1522415 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif b/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
deleted file mode 100644
index 4bc92f8..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif and /dev/null differ
--
cgit
From 6c1c19388c3c24c5a0b91ac82272e015a004484c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:56:35 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
---
.../file1_Second_order_partial_derivatives.py | 78 ----------------------
.../file1_Second_order_partial_derivatives.py | 78 ++++++++++++++++++++++
2 files changed, 78 insertions(+), 78 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
deleted file mode 100644
index 84052cc..0000000
--- a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
+++ /dev/null
@@ -1,78 +0,0 @@
-from manimlib.imports import*
-
-#---- graphs of second-order partial derivatives of a function
-class SurfacesAnimation(ThreeDScene):
- def construct(self):
-
- axes = ThreeDAxes()
- x_label = TextMobject('$x$').shift([5,0.5,0]) #---- x axis
- y_label = TextMobject('$y$').shift([0.5,4,0]).rotate(-4.5) #---- y axis
-
- #---- surface of function: f(x,y) = (x^2+y^2)^2
- surface_f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- ((u**2)+(v**2))**2
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[GREEN_D, GREEN_E]).scale(1)
-
- #---- surface of second-order partial derivative f_xx
- surface_fxx = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (3*u**2)+(v**2)
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(0.6)
-
- #---- surface of second-order partial derivative f_yy
- surface_fyy = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (u**2)+(3*v**2)
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[PURPLE_D, PURPLE_E]).scale(0.6).shift([0,0,0])
-
- #---- surface of second-order partial derivative f_xy = f_yx
- surface_fxy = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 8*u*v
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_D, TEAL_E]).scale(0.6)
-
- f_text= TextMobject("$f(x,y) = (x^2+y^2)^2$",color = GREEN).scale(0.7).to_corner(UL)
-
- fxx_text= TextMobject("$f_{xx} = 12x^2+4y^2$ (Concavity along x axis)",color = YELLOW).scale(0.5).to_corner(UL)
-
- fyy_text= TextMobject("$f_{yy} = 4x^2+12y^2$(Concavity along y axis)",color = PURPLE).scale(0.5).to_corner(UL)
-
- fxy_text= TextMobject("$f_{xy} = f_{yx} = 8xy$ (Twisting of the function)",color = TEAL).scale(0.5).to_corner(UL)
-
-
- self.set_camera_orientation(phi = 40 * DEGREES, theta = 45 * DEGREES)
- self.begin_ambient_camera_rotation(rate = 0.1)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.add(x_label)
- self.add(y_label)
- self.wait(1)
- self.play(Write(surface_f))
- self.wait(2)
- self.play(FadeOut(f_text))
-
-
- self.play(ReplacementTransform(surface_f,surface_fxx))
-
- self.add_fixed_in_frame_mobjects(fxx_text)
- self.wait(2)
- self.play(FadeOut(fxx_text))
-
- self.play(ReplacementTransform(surface_fxx,surface_fyy))
- self.add_fixed_in_frame_mobjects(fyy_text)
- self.wait(2)
- self.play(FadeOut(fyy_text))
-
- self.play(ReplacementTransform(surface_fyy,surface_fxy))
- self.move_camera(phi = 35 * DEGREES, theta = 80 * DEGREES)
- self.add_fixed_in_frame_mobjects(fxy_text)
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
new file mode 100644
index 0000000..84052cc
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.py
@@ -0,0 +1,78 @@
+from manimlib.imports import*
+
+#---- graphs of second-order partial derivatives of a function
+class SurfacesAnimation(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ x_label = TextMobject('$x$').shift([5,0.5,0]) #---- x axis
+ y_label = TextMobject('$y$').shift([0.5,4,0]).rotate(-4.5) #---- y axis
+
+ #---- surface of function: f(x,y) = (x^2+y^2)^2
+ surface_f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ ((u**2)+(v**2))**2
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[GREEN_D, GREEN_E]).scale(1)
+
+ #---- surface of second-order partial derivative f_xx
+ surface_fxx = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (3*u**2)+(v**2)
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(0.6)
+
+ #---- surface of second-order partial derivative f_yy
+ surface_fyy = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (u**2)+(3*v**2)
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[PURPLE_D, PURPLE_E]).scale(0.6).shift([0,0,0])
+
+ #---- surface of second-order partial derivative f_xy = f_yx
+ surface_fxy = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 8*u*v
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_D, TEAL_E]).scale(0.6)
+
+ f_text= TextMobject("$f(x,y) = (x^2+y^2)^2$",color = GREEN).scale(0.7).to_corner(UL)
+
+ fxx_text= TextMobject("$f_{xx} = 12x^2+4y^2$ (Concavity along x axis)",color = YELLOW).scale(0.5).to_corner(UL)
+
+ fyy_text= TextMobject("$f_{yy} = 4x^2+12y^2$(Concavity along y axis)",color = PURPLE).scale(0.5).to_corner(UL)
+
+ fxy_text= TextMobject("$f_{xy} = f_{yx} = 8xy$ (Twisting of the function)",color = TEAL).scale(0.5).to_corner(UL)
+
+
+ self.set_camera_orientation(phi = 40 * DEGREES, theta = 45 * DEGREES)
+ self.begin_ambient_camera_rotation(rate = 0.1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.add(x_label)
+ self.add(y_label)
+ self.wait(1)
+ self.play(Write(surface_f))
+ self.wait(2)
+ self.play(FadeOut(f_text))
+
+
+ self.play(ReplacementTransform(surface_f,surface_fxx))
+
+ self.add_fixed_in_frame_mobjects(fxx_text)
+ self.wait(2)
+ self.play(FadeOut(fxx_text))
+
+ self.play(ReplacementTransform(surface_fxx,surface_fyy))
+ self.add_fixed_in_frame_mobjects(fyy_text)
+ self.wait(2)
+ self.play(FadeOut(fyy_text))
+
+ self.play(ReplacementTransform(surface_fyy,surface_fxy))
+ self.move_camera(phi = 35 * DEGREES, theta = 80 * DEGREES)
+ self.add_fixed_in_frame_mobjects(fxy_text)
+ self.wait(2)
--
cgit
From 9f8a0bc5d0ccec1a1260d7922e5fdc6c44d1f3e5 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:57:43 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
---
.../file2_Degenerate_Hessian_Matrix.py | 52 ----------------------
.../file2_Degenerate_Hessian_Matrix.py | 52 ++++++++++++++++++++++
2 files changed, 52 insertions(+), 52 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
deleted file mode 100644
index c1e3516..0000000
--- a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
+++ /dev/null
@@ -1,52 +0,0 @@
-from manimlib.imports import*
-
-class firstscene(Scene):
- def construct(self):
-
- h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
-
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
- c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
- m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
-
-
- t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
-
- self.play(ShowCreation(h_text))
- self.wait(1)
- self.play(FadeOut(h_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(m_text))
- self.wait(2)
- self.play(ReplacementTransform(m_text,d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(2)
-
-
-class SecondScene(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (2*u**3)+v**3
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.1)
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..c1e3516
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
@@ -0,0 +1,52 @@
+from manimlib.imports import*
+
+class firstscene(Scene):
+ def construct(self):
+
+ h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
+
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
+ c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
+ m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
+
+
+ t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
+
+ self.play(ShowCreation(h_text))
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(m_text))
+ self.wait(2)
+ self.play(ReplacementTransform(m_text,d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(2)
+
+
+class SecondScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (2*u**3)+v**3
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.1)
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(2)
--
cgit
From 622bc30da5bb6691861b8ef27d4b95f4d125cdf4 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:58:37 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
---
.../file3_Nondegenerate_Hessian_Matrix.py | 145 ---------------------
.../file3_Nondegenerate_Hessian_Matrix.py | 145 +++++++++++++++++++++
2 files changed, 145 insertions(+), 145 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
deleted file mode 100644
index 3056842..0000000
--- a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
+++ /dev/null
@@ -1,145 +0,0 @@
-from manimlib.imports import*
-
-class firstScene(Scene):
- def construct(self):
-
- e_text = TextMobject("Case 3: One positive and one negative eigenvalue", color = YELLOW).scale(1).shift(3*UP+1*LEFT)
- f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$").scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(1,0)$").scale(0.8).next_to(f_text).shift(DOWN+4*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(1,0)= \\begin{vmatrix} 2 \\space & 0\\space \\\\ 0 & -4 \\end{vmatrix} \\end{equation*}",color = GREEN).scale(0.9)
-
- t_text = TextMobject("$D_2 = -8<0$ (Saddle Point)", color = BLUE).scale(0.9).shift(2*DOWN)
-
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(2)
-
-class SaddlePoint(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2-2*v**2-2*u
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[RED_C,PURPLE_D,YELLOW_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=35 * DEGREES,theta=80*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.4)
-
- f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$",color = GREEN).shift(2*DOWN+2*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(3)
-
-
-class secondScene(Scene):
- def construct(self):
-
- h_text = TextMobject("NonDegenerate Hessian Matrix", color = GREEN).scale(1).shift(UP)
- e_text = TextMobject("Case 1: Two positive eigenvalues", color = PINK).scale(1).shift(3*UP+2*LEFT)
- f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = TEAL).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(0,0)$",color = TEAL).scale(0.8).next_to(f_text).shift(DOWN+4.5*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 4 \\space & -2\\space \\\\ -2 & 6 \\end{vmatrix} \\end{equation*}",color = PINK).scale(0.9)
-
- t_text = TextMobject("$D_2 = 20>0$ (Relative Maxima or Relative Minima)", color = YELLOW).scale(0.9).shift(1*DOWN)
- tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =4 >0$ (Relative Minima)", color = YELLOW).scale(0.9).shift(2*DOWN)
-
-
- self.play(ShowCreation(h_text))
- self.wait(1)
- self.play(FadeOut(h_text))
- self.wait(1)
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(1)
- self.play(ShowCreation(tm_text))
- self.wait(2)
- self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
-
-class Minima(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 2*u**2+3*v**2-2*v*u
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,YELLOW_D,GREEN_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=10 * DEGREES,theta=90*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.2)
-
- f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = PURPLE).shift(2*DOWN+3*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(2)
-
-
-class thirdScene(Scene):
- def construct(self):
-
-
- e_text = TextMobject("Case 2: Two negative eigenvalues", color = RED).scale(1).shift(3*UP+2*LEFT)
- f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = BLUE).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(0,0)$",color = BLUE).scale(0.8).next_to(f_text).shift(DOWN+3.8*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} -2 \\space & 0\\space \\\\ 0 & -8 \\end{vmatrix} \\end{equation*}",color = TEAL).scale(0.9)
-
- t_text = TextMobject("$D_2 = 16>0$ (Relative Maxima or Relative Minima)" ).scale(0.9).shift(1*DOWN)
- tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =-2 <0$ (Relative Maxima)").scale(0.9).shift(2*DOWN)
-
-
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(1)
- self.play(ShowCreation(tm_text))
- self.wait(2)
- self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
-
-
-class Maxima(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-4*v**2
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,PURPLE_D,TEAL_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=75 * DEGREES)
- self.begin_ambient_camera_rotation(rate=0.4)
-
- f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = YELLOW).shift(2*DOWN+3*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(1)
- self.move_camera(phi=30*DEGREES,theta=45*DEGREES,run_time=5)
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..3056842
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
@@ -0,0 +1,145 @@
+from manimlib.imports import*
+
+class firstScene(Scene):
+ def construct(self):
+
+ e_text = TextMobject("Case 3: One positive and one negative eigenvalue", color = YELLOW).scale(1).shift(3*UP+1*LEFT)
+ f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$").scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(1,0)$").scale(0.8).next_to(f_text).shift(DOWN+4*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(1,0)= \\begin{vmatrix} 2 \\space & 0\\space \\\\ 0 & -4 \\end{vmatrix} \\end{equation*}",color = GREEN).scale(0.9)
+
+ t_text = TextMobject("$D_2 = -8<0$ (Saddle Point)", color = BLUE).scale(0.9).shift(2*DOWN)
+
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(2)
+
+class SaddlePoint(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2-2*v**2-2*u
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[RED_C,PURPLE_D,YELLOW_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=35 * DEGREES,theta=80*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.4)
+
+ f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$",color = GREEN).shift(2*DOWN+2*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(3)
+
+
+class secondScene(Scene):
+ def construct(self):
+
+ h_text = TextMobject("NonDegenerate Hessian Matrix", color = GREEN).scale(1).shift(UP)
+ e_text = TextMobject("Case 1: Two positive eigenvalues", color = PINK).scale(1).shift(3*UP+2*LEFT)
+ f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = TEAL).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(0,0)$",color = TEAL).scale(0.8).next_to(f_text).shift(DOWN+4.5*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 4 \\space & -2\\space \\\\ -2 & 6 \\end{vmatrix} \\end{equation*}",color = PINK).scale(0.9)
+
+ t_text = TextMobject("$D_2 = 20>0$ (Relative Maxima or Relative Minima)", color = YELLOW).scale(0.9).shift(1*DOWN)
+ tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =4 >0$ (Relative Minima)", color = YELLOW).scale(0.9).shift(2*DOWN)
+
+
+ self.play(ShowCreation(h_text))
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(1)
+ self.play(ShowCreation(tm_text))
+ self.wait(2)
+ self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
+
+class Minima(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 2*u**2+3*v**2-2*v*u
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,YELLOW_D,GREEN_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=10 * DEGREES,theta=90*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.2)
+
+ f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = PURPLE).shift(2*DOWN+3*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(2)
+
+
+class thirdScene(Scene):
+ def construct(self):
+
+
+ e_text = TextMobject("Case 2: Two negative eigenvalues", color = RED).scale(1).shift(3*UP+2*LEFT)
+ f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = BLUE).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
+ c_text = TextMobject("Critical Point: $(0,0)$",color = BLUE).scale(0.8).next_to(f_text).shift(DOWN+3.8*LEFT)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} -2 \\space & 0\\space \\\\ 0 & -8 \\end{vmatrix} \\end{equation*}",color = TEAL).scale(0.9)
+
+ t_text = TextMobject("$D_2 = 16>0$ (Relative Maxima or Relative Minima)" ).scale(0.9).shift(1*DOWN)
+ tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =-2 <0$ (Relative Maxima)").scale(0.9).shift(2*DOWN)
+
+
+ self.play(ShowCreation(e_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(1)
+ self.play(ShowCreation(tm_text))
+ self.wait(2)
+ self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
+
+
+class Maxima(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-4*v**2
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,PURPLE_D,TEAL_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=75 * DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.4)
+
+ f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = YELLOW).shift(2*DOWN+3*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(1)
+ self.move_camera(phi=30*DEGREES,theta=45*DEGREES,run_time=5)
+ self.wait(2)
--
cgit
From 3bd06348ce843694c7af3883da101bfdb89a09f5 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:59:24 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
---
.../file4_Contour_Diagram.py | 120 ---------------------
.../file4_Contour_Diagram.py | 120 +++++++++++++++++++++
2 files changed, 120 insertions(+), 120 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
deleted file mode 100644
index d3084e2..0000000
--- a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
+++ /dev/null
@@ -1,120 +0,0 @@
-from manimlib.imports import*
-
-#---- contour diagram animation
-class ContourDiagram(ThreeDScene):
- def construct(self):
-
- heading = TextMobject("CONTOUR DIAGRAM", color = YELLOW).scale(1)
-
- 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
-
- #---- surface of a paraboloid
- surface = ParametricSurface(
- lambda u, v: np.array([
- np.cos(v)*u,
- np.sin(v)*u,
- u**2
- ]),v_min = -2, v_max = 2, u_min = -2, u_max = 2, checkerboard_colors = [GREEN_B,GREEN_C,GREEN_D,GREEN_E]).shift([0,0,0]).scale(0.5)
-
- #---- first contour projection
- contour1 = ParametricSurface(
- lambda u, v: np.array([
- np.cos(TAU * v),
- np.sin(TAU * v),
- 2*(1 - 2.5*u)
- ])).fade(0.5).scale(0.21).shift([0,0,1.01])
-
- #---- first contour line
- c_1 = Circle(color = BLUE).scale(0.21).shift([0,0,0]).rotate(0.1,DOWN)
-
- #-------------------------------------------------
-
- #---- second contour projection
- contour2 = ParametricSurface(
- lambda u, v: np.array([
- np.cos(TAU * v),
- np.sin(TAU * v),
- 2*(1 - 1.6*u)
- ])).fade(0.5).scale(0.41).shift([0,0,0.3]).set_color(RED)
-
- #---- second contour line
- c_2 = Circle(color = RED).scale(0.41).shift([0,0,0]).rotate(0.1,DOWN)
-
- #-------------------------------------------------
-
- #---- third contour projection
- contour3 = ParametricSurface(
- lambda u, v: np.array([
- np.cos(TAU * v),
- np.sin(TAU * v),
- 2*(1 - 1.5*u)
- ])).fade(0.5).scale(0.61).shift([0,0,0.4]).set_color(YELLOW)
-
- #---- third contour line
- c_3 = Circle(color = YELLOW).scale(0.61).shift([0,0,0])
-
- #-------------------------------------------------
-
- #---- fourth contour projection
- contour4 = ParametricSurface(
- lambda u, v: np.array([
- np.cos(TAU * v),
- np.sin(TAU * v),
- 2*(1 - 1.5*u)
- ])).fade(0.7).scale(0.81).shift([0,0,0.7]).set_color(PINK)
-
- #---- fourth contour line
- c_4 = Circle(color = PINK).scale(0.81).shift([0,0,0])
-
- #-------------------------------------------------
-
- #---- fifth contour projection
- contour5 = ParametricSurface(
- lambda u, v: np.array([
- np.cos(TAU * v),
- np.sin(TAU * v),
- 2*(1 - 1.5*u)
- ])).fade(0.7).scale(1.01).shift([0,0,1]).set_color(PURPLE)
-
- #---- fifth contour line
- c_5 = Circle(color = PURPLE).scale(1.01).shift([0,0,0])
-
- c_text= TextMobject("Contour Lines").scale(0.5).shift(2*DOWN)
- s = Square().scale(1.3)
-
- self.set_camera_orientation(phi = 75 * DEGREES, theta = 10 * DEGREES)
- self.add_fixed_in_frame_mobjects(heading)
- self.wait(1)
- self.play(FadeOut(heading))
- self.wait(1)
- self.add(axes)
- self.add(label_x)
- self.add(label_y)
- self.play(Write(surface))
- self.wait(1)
- self.add(contour1)
- self.wait(1)
- self.play(Write(c_1))
- self.play(ReplacementTransform(contour1,contour2))
- self.wait(1)
- self.play(Write(c_2))
- self.play(ReplacementTransform(contour2,contour3))
- self.wait(1)
- self.play(Write(c_3))
- self.play(ReplacementTransform(contour3,contour4))
- self.wait(1)
- self.play(Write(c_4))
- self.play(ReplacementTransform(contour4,contour5))
- self.wait(1)
- self.play(Write(c_5))
- self.wait(1)
- self.play(FadeOut(contour5),FadeOut(axes),FadeOut(label_x),FadeOut(label_y),FadeOut(surface),FadeOut(contour5),FadeOut(contour4),FadeOut(contour3),FadeOut(contour2),FadeOut(contour1))
- self.wait(1)
- self.move_camera(phi=0 * DEGREES,theta= 90*DEGREES)
- self.wait(1)
- self.add_fixed_in_frame_mobjects(c_text)
- self.wait(1)
- self.play(ShowCreation(s),FadeOut(c_text))
- self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
new file mode 100644
index 0000000..d3084e2
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.py
@@ -0,0 +1,120 @@
+from manimlib.imports import*
+
+#---- contour diagram animation
+class ContourDiagram(ThreeDScene):
+ def construct(self):
+
+ heading = TextMobject("CONTOUR DIAGRAM", color = YELLOW).scale(1)
+
+ 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
+
+ #---- surface of a paraboloid
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(v)*u,
+ np.sin(v)*u,
+ u**2
+ ]),v_min = -2, v_max = 2, u_min = -2, u_max = 2, checkerboard_colors = [GREEN_B,GREEN_C,GREEN_D,GREEN_E]).shift([0,0,0]).scale(0.5)
+
+ #---- first contour projection
+ contour1 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 2.5*u)
+ ])).fade(0.5).scale(0.21).shift([0,0,1.01])
+
+ #---- first contour line
+ c_1 = Circle(color = BLUE).scale(0.21).shift([0,0,0]).rotate(0.1,DOWN)
+
+ #-------------------------------------------------
+
+ #---- second contour projection
+ contour2 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.6*u)
+ ])).fade(0.5).scale(0.41).shift([0,0,0.3]).set_color(RED)
+
+ #---- second contour line
+ c_2 = Circle(color = RED).scale(0.41).shift([0,0,0]).rotate(0.1,DOWN)
+
+ #-------------------------------------------------
+
+ #---- third contour projection
+ contour3 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ])).fade(0.5).scale(0.61).shift([0,0,0.4]).set_color(YELLOW)
+
+ #---- third contour line
+ c_3 = Circle(color = YELLOW).scale(0.61).shift([0,0,0])
+
+ #-------------------------------------------------
+
+ #---- fourth contour projection
+ contour4 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ])).fade(0.7).scale(0.81).shift([0,0,0.7]).set_color(PINK)
+
+ #---- fourth contour line
+ c_4 = Circle(color = PINK).scale(0.81).shift([0,0,0])
+
+ #-------------------------------------------------
+
+ #---- fifth contour projection
+ contour5 = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2*(1 - 1.5*u)
+ ])).fade(0.7).scale(1.01).shift([0,0,1]).set_color(PURPLE)
+
+ #---- fifth contour line
+ c_5 = Circle(color = PURPLE).scale(1.01).shift([0,0,0])
+
+ c_text= TextMobject("Contour Lines").scale(0.5).shift(2*DOWN)
+ s = Square().scale(1.3)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = 10 * DEGREES)
+ self.add_fixed_in_frame_mobjects(heading)
+ self.wait(1)
+ self.play(FadeOut(heading))
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.wait(1)
+ self.add(contour1)
+ self.wait(1)
+ self.play(Write(c_1))
+ self.play(ReplacementTransform(contour1,contour2))
+ self.wait(1)
+ self.play(Write(c_2))
+ self.play(ReplacementTransform(contour2,contour3))
+ self.wait(1)
+ self.play(Write(c_3))
+ self.play(ReplacementTransform(contour3,contour4))
+ self.wait(1)
+ self.play(Write(c_4))
+ self.play(ReplacementTransform(contour4,contour5))
+ self.wait(1)
+ self.play(Write(c_5))
+ self.wait(1)
+ self.play(FadeOut(contour5),FadeOut(axes),FadeOut(label_x),FadeOut(label_y),FadeOut(surface),FadeOut(contour5),FadeOut(contour4),FadeOut(contour3),FadeOut(contour2),FadeOut(contour1))
+ self.wait(1)
+ self.move_camera(phi=0 * DEGREES,theta= 90*DEGREES)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(c_text)
+ self.wait(1)
+ self.play(ShowCreation(s),FadeOut(c_text))
+ self.wait(1)
--
cgit
From 064d4eb84b2389d1cea5b1bac0cdd5c5f6fc2d0d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 04:59:54 +0530
Subject: Delete file1_Second_order_partial_derivatives.gif
---
.../file1_Second_order_partial_derivatives.gif | Bin 3166332 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
deleted file mode 100644
index 3471e4d..0000000
Binary files a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif and /dev/null differ
--
cgit
From cf4ac5da5fd0cd1322bcdbd5ef8e2d641fc8bdf4 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:00:04 +0530
Subject: Delete file4_Contour_Diagram.gif
---
.../file4_Contour_Diagram.gif | Bin 1150777 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif b/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
deleted file mode 100644
index 129fedc..0000000
Binary files a/FSF-2020/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif and /dev/null differ
--
cgit
From f61bef8de2ee952f3dbb73fd148024931426e427 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:01:05 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
---
.../file1_Tangent_Plane.py | 50 ----------------------
.../file1_Tangent_Plane.py | 50 ++++++++++++++++++++++
2 files changed, 50 insertions(+), 50 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
deleted file mode 100644
index 4c17f90..0000000
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from manimlib.imports import*
-
-#---- tangent plane is parallel to the surface of the funtion at a point
-class firstScene(ThreeDScene):
- def construct(self):
-
- s1_text=TextMobject("Suppose, the point $(x,y)$ lies on the surface of the function.").scale(0.5).shift(2*UP)
- s2_text=TextMobject("When zooming on that point, the surface would appear more and more like a plane.").scale(0.5).shift(1*UP)
- s3_text=TextMobject("This plane is called the tangent plane.").scale(0.5)
-
- #---- graph of function f(x,y) = -x^2-y^2
-
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_B,YELLOW_C,YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(1)
-
-
- d = Dot([0,0,0],color = '#800000') #---- critical point
-
- r = Rectangle(color = PURPLE,fill_opacity=0.2).shift([0.1,0,0]).scale(0.3) #---- tangent plane
-
- s = 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]).shift([0,0,0]).scale(3.5)
-
- d2 = Dot([0,0,2.5],color = '#800000') #---- changing position of critical point
-
- r2 = Rectangle(color = PURPLE,fill_opacity=0.5).shift([0.1,0,2.5]).scale(0.3) #---- changing position of tangent plane
-
- self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
- self.add_fixed_in_frame_mobjects(s1_text)
- self.add_fixed_in_frame_mobjects(s2_text)
- self.add_fixed_in_frame_mobjects(s3_text)
- self.wait(2)
- self.play(FadeOut(s1_text))
- self.play(FadeOut(s2_text))
- self.play(FadeOut(s3_text))
- self.wait(1)
- self.play(Write(f))
- self.play(Write(d))
- self.play(Write(r))
- self.wait(2)
- self.play(ReplacementTransform(f,s),ReplacementTransform(d,d2),ReplacementTransform(r,r2))
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
new file mode 100644
index 0000000..4c17f90
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
@@ -0,0 +1,50 @@
+from manimlib.imports import*
+
+#---- tangent plane is parallel to the surface of the funtion at a point
+class firstScene(ThreeDScene):
+ def construct(self):
+
+ s1_text=TextMobject("Suppose, the point $(x,y)$ lies on the surface of the function.").scale(0.5).shift(2*UP)
+ s2_text=TextMobject("When zooming on that point, the surface would appear more and more like a plane.").scale(0.5).shift(1*UP)
+ s3_text=TextMobject("This plane is called the tangent plane.").scale(0.5)
+
+ #---- graph of function f(x,y) = -x^2-y^2
+
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_B,YELLOW_C,YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(1)
+
+
+ d = Dot([0,0,0],color = '#800000') #---- critical point
+
+ r = Rectangle(color = PURPLE,fill_opacity=0.2).shift([0.1,0,0]).scale(0.3) #---- tangent plane
+
+ s = 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]).shift([0,0,0]).scale(3.5)
+
+ d2 = Dot([0,0,2.5],color = '#800000') #---- changing position of critical point
+
+ r2 = Rectangle(color = PURPLE,fill_opacity=0.5).shift([0.1,0,2.5]).scale(0.3) #---- changing position of tangent plane
+
+ self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
+ self.add_fixed_in_frame_mobjects(s1_text)
+ self.add_fixed_in_frame_mobjects(s2_text)
+ self.add_fixed_in_frame_mobjects(s3_text)
+ self.wait(2)
+ self.play(FadeOut(s1_text))
+ self.play(FadeOut(s2_text))
+ self.play(FadeOut(s3_text))
+ self.wait(1)
+ self.play(Write(f))
+ self.play(Write(d))
+ self.play(Write(r))
+ self.wait(2)
+ self.play(ReplacementTransform(f,s),ReplacementTransform(d,d2),ReplacementTransform(r,r2))
+ self.wait(2)
--
cgit
From 38fc15ed3749f7bf9140a45e7c5f210b3d4fc3c5 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:01:53 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
---
...e2_Tangent_plane_approximation_visualization.py | 74 ----------------------
...e2_Tangent_plane_approximation_visualization.py | 74 ++++++++++++++++++++++
2 files changed, 74 insertions(+), 74 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
deleted file mode 100644
index d1ecf8c..0000000
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
+++ /dev/null
@@ -1,74 +0,0 @@
-from manimlib.imports import*
-
-#---- tangent plane is parallel to the x-y plane
-class MaximaScene(ThreeDScene):
- def construct(self):
-
- axes = ThreeDAxes().scale(1.2)
- label_x= TextMobject("$x$").shift([5.4,-0.5,0]) #---- x axis
- label_y= TextMobject("$y$").shift([-0.5,5.2,0]).rotate(-4.5) #---- y axis
-
- #---- graph of the function
- s = ParametricSurface(
- lambda u, v: np.array([
- 1.5*np.cos(u)*np.cos(v),
- 1.5*np.cos(u)*np.sin(v),
- 1.5*np.sin(u)
- ]),u_min=0,u_max=PI,v_min=PI,v_max=2*PI,checkerboard_colors=[BLUE_B,BLUE_C,BLUE_D,BLUE_E]).scale(1.5).shift([-0.8,0.5,1.5])
-
- d1 = Dot([0.2,2.01,2.24],color = '#800000').rotate(1.1,LEFT) #---- point(x_0,y_0)
- d1_copy = Dot([1.1,2.2,-0.45],color = '#800000') #---- projection of point(x_0,y_0) on x-y plane
- d1_text = TextMobject("$(x_0,y_0)$",color = "#8B0000").scale(0.4).shift(1.3*RIGHT+1.1*UP)
-
- d2 = Dot([1.1,2.2,2.7],color = '#800000').rotate(1,LEFT) #---- point(x,y)
- d2_copy = Dot([0.1,1.95,0.4],color = '#800000') #---- projection of point(x,y) on x-y plane
- d2_text = TextMobject("$(x,y)$",color = "#8B0000").scale(0.4).shift(0.6*RIGHT+0.8*UP)
-
- t_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2.9]) #---- tangent plane
-
- t_text= TextMobject("Tangent Plane",color = RED).scale(0.5).shift(0.3*RIGHT+1.3*UP).rotate(math.radians(5),LEFT)
-
- l1 = Line([1.1,2.2,2.6],[1.1,2.2,-0.45]).fade(0.2)
- l2 = Line([0.1,1.95,2.05],[0.1,1.95,0.4]).fade(0.2)
-
- a1 = Line([0.1,1.95,0.4],[1.1,2.2,-0.45],color ="#00FF7F")
- a_x = Line([0.1,1.95,0.4],[1.7,1.95,0.4],color ="#9400D3")
- a_y = Line([0.1,1.95,0.4],[0.1,2.75,0.4],color ="#8B4513")
- a2 = Line([1.7,1.95,0.4],[1.7,2.75,0.4])
- a3 = Line([0.1,2.75,0.4],[1.7,2.75,0.4])
-
- #---- transition of tangent plane
-
- t2_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2])
- t3_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([1.1,2.5,2])
- t4_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([0.9,2.35,0.4])
-
- #-------------------------------------------
- self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
- self.wait(1)
- self.add(axes)
- self.add(label_x)
- self.add(label_y)
- self.play(Write(s))
- self.wait(1)
- self.play(Write(d1))
- self.add_fixed_in_frame_mobjects(d1_text)
- self.play(ShowCreation(t_plane))
- self.add_fixed_in_frame_mobjects(t_text)
- self.wait(1)
- self.play(FadeOut(t_text),Write(d2))
- self.add_fixed_in_frame_mobjects(d2_text)
- self.wait(1)
- self.play(Write(l1),Write(l2))
- self.play(Write(d2_copy),Write(d1_copy))
- self.wait(1)
- self.play(Write(a1),Write(a_x),Write(a_y))
- self.wait(1)
- self.play(Write(a2),Write(a3))
- self.wait(1)
- self.play(ReplacementTransform(t_plane,t2_plane))
- self.wait(1)
- self.play(ReplacementTransform(t2_plane,t3_plane))
- self.wait(1)
- self.play(ReplacementTransform(t3_plane,t4_plane))
- self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
new file mode 100644
index 0000000..d1ecf8c
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.py
@@ -0,0 +1,74 @@
+from manimlib.imports import*
+
+#---- tangent plane is parallel to the x-y plane
+class MaximaScene(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes().scale(1.2)
+ label_x= TextMobject("$x$").shift([5.4,-0.5,0]) #---- x axis
+ label_y= TextMobject("$y$").shift([-0.5,5.2,0]).rotate(-4.5) #---- y axis
+
+ #---- graph of the function
+ s = ParametricSurface(
+ lambda u, v: np.array([
+ 1.5*np.cos(u)*np.cos(v),
+ 1.5*np.cos(u)*np.sin(v),
+ 1.5*np.sin(u)
+ ]),u_min=0,u_max=PI,v_min=PI,v_max=2*PI,checkerboard_colors=[BLUE_B,BLUE_C,BLUE_D,BLUE_E]).scale(1.5).shift([-0.8,0.5,1.5])
+
+ d1 = Dot([0.2,2.01,2.24],color = '#800000').rotate(1.1,LEFT) #---- point(x_0,y_0)
+ d1_copy = Dot([1.1,2.2,-0.45],color = '#800000') #---- projection of point(x_0,y_0) on x-y plane
+ d1_text = TextMobject("$(x_0,y_0)$",color = "#8B0000").scale(0.4).shift(1.3*RIGHT+1.1*UP)
+
+ d2 = Dot([1.1,2.2,2.7],color = '#800000').rotate(1,LEFT) #---- point(x,y)
+ d2_copy = Dot([0.1,1.95,0.4],color = '#800000') #---- projection of point(x,y) on x-y plane
+ d2_text = TextMobject("$(x,y)$",color = "#8B0000").scale(0.4).shift(0.6*RIGHT+0.8*UP)
+
+ t_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2.9]) #---- tangent plane
+
+ t_text= TextMobject("Tangent Plane",color = RED).scale(0.5).shift(0.3*RIGHT+1.3*UP).rotate(math.radians(5),LEFT)
+
+ l1 = Line([1.1,2.2,2.6],[1.1,2.2,-0.45]).fade(0.2)
+ l2 = Line([0.1,1.95,2.05],[0.1,1.95,0.4]).fade(0.2)
+
+ a1 = Line([0.1,1.95,0.4],[1.1,2.2,-0.45],color ="#00FF7F")
+ a_x = Line([0.1,1.95,0.4],[1.7,1.95,0.4],color ="#9400D3")
+ a_y = Line([0.1,1.95,0.4],[0.1,2.75,0.4],color ="#8B4513")
+ a2 = Line([1.7,1.95,0.4],[1.7,2.75,0.4])
+ a3 = Line([0.1,2.75,0.4],[1.7,2.75,0.4])
+
+ #---- transition of tangent plane
+
+ t2_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(1,LEFT).shift([1.1,2.5,2])
+ t3_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([1.1,2.5,2])
+ t4_plane = Rectangle(color = PURPLE, fill_opacity=0.3).scale(0.4).rotate(math.radians(180),LEFT).shift([0.9,2.35,0.4])
+
+ #-------------------------------------------
+ self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES)
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(s))
+ self.wait(1)
+ self.play(Write(d1))
+ self.add_fixed_in_frame_mobjects(d1_text)
+ self.play(ShowCreation(t_plane))
+ self.add_fixed_in_frame_mobjects(t_text)
+ self.wait(1)
+ self.play(FadeOut(t_text),Write(d2))
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.wait(1)
+ self.play(Write(l1),Write(l2))
+ self.play(Write(d2_copy),Write(d1_copy))
+ self.wait(1)
+ self.play(Write(a1),Write(a_x),Write(a_y))
+ self.wait(1)
+ self.play(Write(a2),Write(a3))
+ self.wait(1)
+ self.play(ReplacementTransform(t_plane,t2_plane))
+ self.wait(1)
+ self.play(ReplacementTransform(t2_plane,t3_plane))
+ self.wait(1)
+ self.play(ReplacementTransform(t3_plane,t4_plane))
+ self.wait(1)
--
cgit
From 1cd25dcc113d8834a50ca29fbc16b8fe97529056 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:02:47 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
---
.../file3_non_differentiable_function.py | 30 ----------------------
.../file3_non_differentiable_function.py | 30 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 30 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
deleted file mode 100644
index 13bd73e..0000000
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from manimlib.imports import*
-import math
-
-#---- tangent plane does not exists for f(x,y): sqrt(x**2+y**2) at origin
-
-class TangenttoSurface(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- #----f(x,y): sqrt(x**2+y**2)
- p = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- math.sqrt(u**2+v**2)
- ]),v_min = -1,v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_C,TEAL_D],
- resolution = (20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES)
-
- d = Dot([0,0,0],color = '#800000') #----critical point
- d_text = TextMobject("$(0,0)$").scale(0.5).shift(0.2*DOWN)
- f_text = TextMobject("$f$ is not differentiable at origin").scale(0.5).to_corner(UL)
-
- self.begin_ambient_camera_rotation(rate=0.1)
- self.add(axes)
- self.play(Write(p),Write(d))
- self.add_fixed_in_frame_mobjects(d_text)
- self.add_fixed_in_frame_mobjects(f_text)
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
new file mode 100644
index 0000000..13bd73e
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
@@ -0,0 +1,30 @@
+from manimlib.imports import*
+import math
+
+#---- tangent plane does not exists for f(x,y): sqrt(x**2+y**2) at origin
+
+class TangenttoSurface(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ #----f(x,y): sqrt(x**2+y**2)
+ p = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ math.sqrt(u**2+v**2)
+ ]),v_min = -1,v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_C,TEAL_D],
+ resolution = (20, 20)).scale(1)
+
+ self.set_camera_orientation(phi = 75 * DEGREES)
+
+ d = Dot([0,0,0],color = '#800000') #----critical point
+ d_text = TextMobject("$(0,0)$").scale(0.5).shift(0.2*DOWN)
+ f_text = TextMobject("$f$ is not differentiable at origin").scale(0.5).to_corner(UL)
+
+ self.begin_ambient_camera_rotation(rate=0.1)
+ self.add(axes)
+ self.play(Write(p),Write(d))
+ self.add_fixed_in_frame_mobjects(d_text)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(2)
--
cgit
From a8a11ea17285b594f0017a6e7f86a43679312730 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:03:34 +0530
Subject: Rename
FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent
plane_at_critical_points.py to
FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent
plane_at_critical_points.py
---
.../file4_Tangent plane_at_critical_points.py | 62 ----------------------
.../file4_Tangent plane_at_critical_points.py | 62 ++++++++++++++++++++++
2 files changed, 62 insertions(+), 62 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
deleted file mode 100644
index d129213..0000000
--- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from manimlib.imports import*
-
-class TangenttoSurface(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- #----graph of first function f(x,y) = -x**2-y**2
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_D, YELLOW_E],
- resolution = (20, 20)).scale(1)
- f_text = TextMobject("Tangent plane at relative maxima").to_corner(UL).scale(0.5)
-
- #----graph of second function f(x,y) = -x**2+y**2
- f2 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
- resolution = (20, 20)).scale(1)
- f2_text = TextMobject("Tangent plane at saddle point").to_corner(UL).scale(0.5)
-
- #----graph of third function f(x,y) = x**2+y**2
- f3 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [GREEN_D, GREEN_E],
- resolution = (20, 20)).scale(1)
- f3_text = TextMobject("Tangent plane at relative minima").to_corner(UL).scale(0.5)
-
- self.set_camera_orientation(phi = 75 * DEGREES, theta = -45 * DEGREES )
- d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
-
- r = Rectangle(height = 2,breadth = 1,color = PURPLE).scale(0.5)
-
- self.begin_ambient_camera_rotation(rate = 0.3)
- self.add(axes)
- self.play(Write(f),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f_text)
- self.play(ShowCreation(r))
- self.wait(1)
- self.play(FadeOut(r),FadeOut(f),FadeOut(d),FadeOut(f_text))
- self.wait(1)
- self.play(Write(f2),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f2_text)
- self.play(ShowCreation(r))
- self.wait(1)
- self.play(FadeOut(r),FadeOut(f2),FadeOut(d),FadeOut(f2_text))
- self.wait(1)
- self.play(Write(f3),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f3_text)
- self.play(ShowCreation(r))
- self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
new file mode 100644
index 0000000..d129213
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
@@ -0,0 +1,62 @@
+from manimlib.imports import*
+
+class TangenttoSurface(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ #----graph of first function f(x,y) = -x**2-y**2
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_D, YELLOW_E],
+ resolution = (20, 20)).scale(1)
+ f_text = TextMobject("Tangent plane at relative maxima").to_corner(UL).scale(0.5)
+
+ #----graph of second function f(x,y) = -x**2+y**2
+ f2 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2+v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
+ resolution = (20, 20)).scale(1)
+ f2_text = TextMobject("Tangent plane at saddle point").to_corner(UL).scale(0.5)
+
+ #----graph of third function f(x,y) = x**2+y**2
+ f3 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [GREEN_D, GREEN_E],
+ resolution = (20, 20)).scale(1)
+ f3_text = TextMobject("Tangent plane at relative minima").to_corner(UL).scale(0.5)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = -45 * DEGREES )
+ d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
+
+ r = Rectangle(height = 2,breadth = 1,color = PURPLE).scale(0.5)
+
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.add(axes)
+ self.play(Write(f),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
+ self.play(FadeOut(r),FadeOut(f),FadeOut(d),FadeOut(f_text))
+ self.wait(1)
+ self.play(Write(f2),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f2_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
+ self.play(FadeOut(r),FadeOut(f2),FadeOut(d),FadeOut(f2_text))
+ self.wait(1)
+ self.play(Write(f3),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f3_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
--
cgit
From 1dffda2a1214985a21c83ad782f26d3640649f8c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:03:57 +0530
Subject: Delete file1_Tangent_Plane.gif
---
.../file1_Tangent_Plane.gif | Bin 827096 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
deleted file mode 100644
index 2b8bf5f..0000000
Binary files a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif and /dev/null differ
--
cgit
From 6cb42c9f196cdc4c29671a4d5dbccaf1ebcc780e Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:10:35 +0530
Subject: Add files via upload
---
.../file1_Critical_Point_of_a_function.gif | Bin 0 -> 8077401 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif
new file mode 100644
index 0000000..ca3989c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif differ
--
cgit
From dea86496011a0c1e907f04a0c998f67a120a95b6 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:11:15 +0530
Subject: Add files via upload
---
.../Critical-Points/file2_Traces_and_Tangent.gif | Bin 0 -> 2552938 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif
new file mode 100644
index 0000000..84acf2e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif differ
--
cgit
From b902d20de6d51e29dddaaf8b7f2623f22ac2ef05 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:12:08 +0530
Subject: Add files via upload
---
.../file3_Tangent_plane_at_extrema_of_a_function.gif | Bin 0 -> 2198637 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif
new file mode 100644
index 0000000..14fb318
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif differ
--
cgit
From 0ce6295d88d64bca989c79d6f92e2c12f8c02bc3 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:12:50 +0530
Subject: Add files via upload
---
.../file4_Types_of_critical_points.gif | Bin 0 -> 3864765 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
new file mode 100644
index 0000000..91e7084
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif differ
--
cgit
From 23d5769f486b79619bbef9da101fd08e299d59fe Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:13:41 +0530
Subject: Add files via upload
---
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif | Bin 0 -> 1522415 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
new file mode 100644
index 0000000..4bc92f8
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif differ
--
cgit
From f2e7374ca9dcb5803490067da9cd937de2acc838 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:15:06 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Critical-Points/README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'FSF-2020')
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
index f0747bb..5bd9cc5 100644
--- 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
@@ -3,30 +3,30 @@
file1_Critical_Point_of_a_function
-![file1_Critical_Point_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif?raw=true)
+![file1_Critical_Point_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file1_Critical_Point_of_a_function.gif?raw=true)
file2_Traces_and_Tangent
-![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
+![file2_Traces_and_Tangent](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file2_Traces_and_Tangent.gif?raw=true)
file3_Tangent_plane_at_extrema_of_a_function
-![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
+![file3_Tangent_plane_at_extrema_of_a_function](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file3_Tangent_plane_at_extrema_of_a_function.gif?raw=true)
file4_Types_of_critical_points
-![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
+![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
file5_f(x,y)=(y-x)(1-2x-3y)
-![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
+![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
--
cgit
From 122266d4f63a332fae6874f0ee4f374d63fe74a0 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:16:38 +0530
Subject: Add files via upload
---
.../file1_Tangent_Plane.gif | Bin 0 -> 827096 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif
new file mode 100644
index 0000000..2b8bf5f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.gif differ
--
cgit
From 4bf7207eae112e03423d463b8f2ae179ef64fdf7 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:17:53 +0530
Subject: Add files via upload
---
...file2_Tangent_plane_approximation_visualization.gif | Bin 0 -> 946542 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.gif
new file mode 100644
index 0000000..d23405d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file2_Tangent_plane_approximation_visualization.gif differ
--
cgit
From dc445ffca6bb7d90bb067ef43af3b69933e05210 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:21:15 +0530
Subject: Update and rename file3_non_differentiable_function.py to
file3_Non_Differentiable_Function.py
---
.../file3_Non_Differentiable_Function.py | 47 ++++++++++++++++++++++
.../file3_non_differentiable_function.py | 30 --------------
2 files changed, 47 insertions(+), 30 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.py
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.py
new file mode 100644
index 0000000..79d0948
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.py
@@ -0,0 +1,47 @@
+from manimlib.imports import*
+import math
+
+#---- tangent plane does not exists for f(x,y): sqrt(x**2+y**2) at origin
+
+class TangenttoSurface(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes().rotate(2.3)
+ axes2 = ThreeDAxes().scale(2).rotate(2.3).shift([0,0,1.3])
+
+ #----f(x,y): sqrt(x**2+y**2)
+ p = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -math.sqrt(u**2+v**2)
+ ]),v_min = -1,v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_C,TEAL_D],
+ resolution = (20, 20)).scale(1)
+
+ #----size increased of f(x,y): sqrt(x**2+y**2)
+ p2 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -math.sqrt(u**2+v**2)
+ ]),v_min = -1,v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_C,TEAL_D],
+ resolution = (20, 20)).scale(3).shift([0,0,0])
+
+ self.set_camera_orientation(phi = 75 * DEGREES,theta = 40*DEGREES)
+
+ d = Dot([0,0,0],color = '#800000') #---- critical point
+ d2 = Dot([0,0,1.5],color = '#800000').scale(2) #---- size increased of critical point
+
+ f_text = TextMobject("$f$ is not differentiable at origin,because the surface").scale(0.5).to_corner(UL)
+ f2_text = TextMobject("is not flat when zoomed in at the origin.").scale(0.5).to_corner(UL).shift(0.5*DOWN)
+
+ self.add(axes)
+ self.wait(1)
+ self.play(Write(p),Write(d))
+ self.wait(1)
+ self.move_camera(phi = 50 * DEGREES,theta = 40*DEGREES)
+ self.wait(1)
+ self.play(ReplacementTransform(axes,axes2),ReplacementTransform(p,p2),ReplacementTransform(d,d2))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add_fixed_in_frame_mobjects(f2_text)
+ self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
deleted file mode 100644
index 13bd73e..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_non_differentiable_function.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from manimlib.imports import*
-import math
-
-#---- tangent plane does not exists for f(x,y): sqrt(x**2+y**2) at origin
-
-class TangenttoSurface(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- #----f(x,y): sqrt(x**2+y**2)
- p = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- math.sqrt(u**2+v**2)
- ]),v_min = -1,v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_C,TEAL_D],
- resolution = (20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES)
-
- d = Dot([0,0,0],color = '#800000') #----critical point
- d_text = TextMobject("$(0,0)$").scale(0.5).shift(0.2*DOWN)
- f_text = TextMobject("$f$ is not differentiable at origin").scale(0.5).to_corner(UL)
-
- self.begin_ambient_camera_rotation(rate=0.1)
- self.add(axes)
- self.play(Write(p),Write(d))
- self.add_fixed_in_frame_mobjects(d_text)
- self.add_fixed_in_frame_mobjects(f_text)
- self.wait(2)
--
cgit
From 56c7beddac5a11140e75713d8ea6227180f5b6b5 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:22:00 +0530
Subject: Add files via upload
---
.../file3_Non_Differentiable_Function.gif | Bin 0 -> 708466 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.gif
new file mode 100644
index 0000000..7581a33
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file3_Non_Differentiable_Function.gif differ
--
cgit
From 6ee18b418db6a504346f247df3acb15fdc40fb71 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 05:23:45 +0530
Subject: Rename file4_Tangent plane_at_critical_points.py to
file4_Tangent_plane_at_extrema_and_saddle_point.py
---
.../file4_Tangent plane_at_critical_points.py | 62 ----------------------
...e4_Tangent_plane_at_extrema_and_saddle_point.py | 62 ++++++++++++++++++++++
2 files changed, 62 insertions(+), 62 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent_plane_at_extrema_and_saddle_point.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
deleted file mode 100644
index d129213..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_critical_points.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from manimlib.imports import*
-
-class TangenttoSurface(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- #----graph of first function f(x,y) = -x**2-y**2
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_D, YELLOW_E],
- resolution = (20, 20)).scale(1)
- f_text = TextMobject("Tangent plane at relative maxima").to_corner(UL).scale(0.5)
-
- #----graph of second function f(x,y) = -x**2+y**2
- f2 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
- resolution = (20, 20)).scale(1)
- f2_text = TextMobject("Tangent plane at saddle point").to_corner(UL).scale(0.5)
-
- #----graph of third function f(x,y) = x**2+y**2
- f3 = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2+v**2
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [GREEN_D, GREEN_E],
- resolution = (20, 20)).scale(1)
- f3_text = TextMobject("Tangent plane at relative minima").to_corner(UL).scale(0.5)
-
- self.set_camera_orientation(phi = 75 * DEGREES, theta = -45 * DEGREES )
- d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
-
- r = Rectangle(height = 2,breadth = 1,color = PURPLE).scale(0.5)
-
- self.begin_ambient_camera_rotation(rate = 0.3)
- self.add(axes)
- self.play(Write(f),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f_text)
- self.play(ShowCreation(r))
- self.wait(1)
- self.play(FadeOut(r),FadeOut(f),FadeOut(d),FadeOut(f_text))
- self.wait(1)
- self.play(Write(f2),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f2_text)
- self.play(ShowCreation(r))
- self.wait(1)
- self.play(FadeOut(r),FadeOut(f2),FadeOut(d),FadeOut(f2_text))
- self.wait(1)
- self.play(Write(f3),Write(d))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(f3_text)
- self.play(ShowCreation(r))
- self.wait(1)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent_plane_at_extrema_and_saddle_point.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent_plane_at_extrema_and_saddle_point.py
new file mode 100644
index 0000000..d129213
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent_plane_at_extrema_and_saddle_point.py
@@ -0,0 +1,62 @@
+from manimlib.imports import*
+
+class TangenttoSurface(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ #----graph of first function f(x,y) = -x**2-y**2
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_D, YELLOW_E],
+ resolution = (20, 20)).scale(1)
+ f_text = TextMobject("Tangent plane at relative maxima").to_corner(UL).scale(0.5)
+
+ #----graph of second function f(x,y) = -x**2+y**2
+ f2 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2+v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
+ resolution = (20, 20)).scale(1)
+ f2_text = TextMobject("Tangent plane at saddle point").to_corner(UL).scale(0.5)
+
+ #----graph of third function f(x,y) = x**2+y**2
+ f3 = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2
+ ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [GREEN_D, GREEN_E],
+ resolution = (20, 20)).scale(1)
+ f3_text = TextMobject("Tangent plane at relative minima").to_corner(UL).scale(0.5)
+
+ self.set_camera_orientation(phi = 75 * DEGREES, theta = -45 * DEGREES )
+ d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
+
+ r = Rectangle(height = 2,breadth = 1,color = PURPLE).scale(0.5)
+
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.add(axes)
+ self.play(Write(f),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
+ self.play(FadeOut(r),FadeOut(f),FadeOut(d),FadeOut(f_text))
+ self.wait(1)
+ self.play(Write(f2),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f2_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
+ self.play(FadeOut(r),FadeOut(f2),FadeOut(d),FadeOut(f2_text))
+ self.wait(1)
+ self.play(Write(f3),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f3_text)
+ self.play(ShowCreation(r))
+ self.wait(1)
--
cgit
From 7ac13a747b847c10aefab6a3d440e8b21ae3d98a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 06:57:29 +0530
Subject: Add files via upload
---
.../file1_Second_order_partial_derivatives.gif | Bin 0 -> 3166332 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif
new file mode 100644
index 0000000..3471e4d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif differ
--
cgit
From 0d176c3c509a0438b0a11c6e50c71cbc9b146007 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 06:58:33 +0530
Subject: Add files via upload
---
.../file4_Contour_Diagram.gif | Bin 0 -> 1150777 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
new file mode 100644
index 0000000..129fedc
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif differ
--
cgit
From 336667599163bc51997ba45ff4bf7f793bb60573 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:02:18 +0530
Subject: Add files via upload
---
...ile4_Tangent plane_at_extrema_and_saddle_point.gif | Bin 0 -> 2513197 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_extrema_and_saddle_point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_extrema_and_saddle_point.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_extrema_and_saddle_point.gif
new file mode 100644
index 0000000..cfe054b
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file4_Tangent plane_at_extrema_and_saddle_point.gif differ
--
cgit
From 697d32d369da41e60dfe9a00a25b72192357a251 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:07:33 +0530
Subject: Add files via upload
---
.../file2_Degenerate_Hessian_Matrix.gif | Bin 0 -> 3202838 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif
new file mode 100644
index 0000000..d49cdd5
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif differ
--
cgit
From 6c53bdbff8ed1cd0541c9ce4a1de9ecda09c1bb0 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:16:10 +0530
Subject: Create file1_Visualization_of_dz.py
---
.../file1_Visualization_of_dz.py | 53 ++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
new file mode 100644
index 0000000..a097a96
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
@@ -0,0 +1,53 @@
+from manimlib.imports import*
+
+
+class firstScene(ThreeDScene):
+
+ def construct(self):
+
+ axes = ThreeDAxes().rotate(1.571)
+ 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).set_color("#FF69B4").fade(0.6).scale(2).shift(3*UP+1*LEFT)
+
+ d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP)
+ d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP)
+
+ p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
+ p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.9*UP)
+
+ l = DashedLine(color = '#800000').rotate(1.571,UP).scale(1).shift(1.7*UP+1.6*RIGHT)
+ l2 = DashedLine(color = '#800000').rotate(1.571,UP).scale(0.8).shift(2.26*UP+1.2*RIGHT)
+
+ l_text = TextMobject("$(x_1,y_1)$",color = '#ADFF2F').scale(0.6).shift(2*RIGHT+1.6*DOWN)
+ l2_text = TextMobject("$(x_2,y_2)$",color = '#ADFF2F').scale(0.6).shift(2.7*RIGHT+1.2*DOWN)
+
+ a = Arrow(color = '#FFFACD').scale(0.7).rotate(1.38,RIGHT).shift(2.5*LEFT+3.1*UP)
+
+ a_text = TextMobject("$dz$",color='#800000').scale(0.5).shift(2.3*RIGHT+0.5*UP)
+
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(1*RIGHT+3*UP).fade(0.9)
+
+ label = TextMobject("$z = f(x,y)$").scale(0.6).shift(3.5*RIGHT+1.8*UP)
+
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.wait(1)
+ self.play(Write(plane))
+ self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(label)
+ self.wait(1)
+ self.play(ShowCreation(l),ShowCreation(l2),Write(d),Write(d2))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(p1)
+ self.add_fixed_in_frame_mobjects(p2)
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(l_text)
+ self.add_fixed_in_frame_mobjects(l2_text)
+ self.play(ShowCreation(a))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(a_text)
+ self.wait(2)
--
cgit
From 375032b863947e3eb39c805ce1e79d12fad98141 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:16:33 +0530
Subject: Add files via upload
---
.../file3_Nondegenerate_Hessian_Matrix.gif | Bin 0 -> 8724439 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif
new file mode 100644
index 0000000..2b0acb3
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif differ
--
cgit
From 2c72a6e97be61b9f6f8230951b90918ef654c695 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:18:42 +0530
Subject: Create file2_Differentials.py
---
.../Total-Differential/file2_Differentials.py | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
new file mode 100644
index 0000000..b40be70
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
@@ -0,0 +1,72 @@
+from manimlib.imports import*
+
+
+class firstScene(ThreeDScene):
+
+ def construct(self):
+
+ axes = ThreeDAxes()
+
+ s = Rectangle(color = '#00FF7F',fill_opacity=0.3).shift(2.3*UP+3.9*LEFT).scale(1).rotate(0.2,UP) #----surface z = f(x,y)
+
+ label_y = TextMobject("$y$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
+ label_x = TextMobject("$x$").shift(-0.1*UP+5.6*RIGHT).scale(0.5)
+
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
+
+ d = Dot([1,2,1],color = '#9400D3').rotate(1.571,UP)
+ d2 = Dot([2,2.9,1],color = '#9400D3').rotate(1.571,UP)
+
+ p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
+ p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.4*UP)
+
+
+ l1 = DashedLine(color = '#00BFFF').scale(1.6).shift(3.5*UP+3.25*LEFT).rotate(1.571)
+ l2 = DashedLine(color = '#00BFFF').scale(1).shift(4*UP+2*LEFT).rotate(1.571)
+
+ label_dz= TextMobject("$dz$").scale(0.4).shift(5.3*RIGHT+0.4*UP)
+
+
+ l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.7)
+ l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.7)
+
+ line_y1 = DashedLine(color = '#00BFFF').scale(1.3).shift(0.82*UP+3.25*RIGHT).rotate(1.571)
+ line_y2 = DashedLine(color = '#00BFFF').scale(1.7).shift(1.2*UP+2.8*RIGHT).rotate(1.571)
+
+ label_dy= TextMobject("$dy$").scale(0.6).shift(3*RIGHT+0.8*DOWN).rotate(math.radians(90))
+
+ line_x1 = DashedLine(color = '#00BFFF').scale(1.5).shift(2.2*UP+1.6*RIGHT).rotate(1.571,RIGHT)
+ line_x2 = DashedLine(color = '#00BFFF').scale(1.2).shift(2.9*UP+1.6*RIGHT).rotate(1.571,RIGHT)
+
+ label_dx= TextMobject("$dx$").scale(0.4).shift(-0.4*UP+2.5*RIGHT)
+
+ label = TextMobject("$f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
+
+
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
+ self.play(Write(plane))
+ self.play(ShowCreation(label_y))
+ self.add_fixed_in_frame_mobjects(label_x)
+ self.play(Write(s))
+ self.add_fixed_in_frame_mobjects(label)
+ self.wait(1)
+ self.play(Write(d),Write(d2))
+ self.add_fixed_in_frame_mobjects(p1)
+ self.add_fixed_in_frame_mobjects(p2)
+ self.wait(1)
+ self.play(Write(l1))
+ self.play(Write(l2))
+ self.add_fixed_in_frame_mobjects(label_dz)
+ self.wait(1)
+ self.play(Write(l3))
+ self.play(Write(l4))
+ self.wait(1)
+ self.play(Write(line_y1))
+ self.play(Write(line_y2))
+ self.play(ShowCreation(label_dy))
+ self.wait(1)
+ self.play(Write(line_x1))
+ self.play(Write(line_x2))
+ self.add_fixed_in_frame_mobjects(label_dx)
+ self.wait(1)
--
cgit
From 382ba54a0a80bc2e60187f94b225e2d9deef5cb9 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:20:16 +0530
Subject: Create file3_Total_differential_of_z.py
---
.../file3_Total_differential_of_z.py | 91 ++++++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
new file mode 100644
index 0000000..b29a7a3
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
@@ -0,0 +1,91 @@
+from manimlib.imports import*
+
+class firstScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes().fade(0.5)
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
+ label_x = TextMobject("$x$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
+ label_y = TextMobject("$y$").shift(0.3*DOWN+5.6*RIGHT).scale(0.5)
+ label_z = TextMobject("$z$").shift(3.5*UP+0.2*LEFT).scale(0.5)
+
+ s1 = Square(color = '#00FF00',fill_opacity=0.4).shift([1,1,0])
+ s2 = Square(color = '#00FF00',fill_opacity=0.4).shift([1,1,3]).scale(0.95)
+
+ l1 = Line([2,0,3],[2,0,0],color = '#FFFACD')
+ l2 = Line([0,2,3],[0,2,0],color = '#FFFACD')
+ l3 = Line([2,1.95,3],[2,2,0],color = '#FFFACD')
+
+ d1 = Dot([2,0,1.5],color = '#FFD700').rotate(1.571,UP)
+ d1_text = TextMobject("$P1$").scale(0.4).shift(1.2*LEFT+1.1*UP)
+
+ d2 = Dot([0,2,3],color = '#FFD700').rotate(1.571,UP)
+ d2_text = TextMobject("$P2$").scale(0.4).shift(2.3*RIGHT+3.1*UP)
+
+ d3 = Dot([2,2,2],color = '#FFD700').rotate(1.571,UP)
+ d3_text = TextMobject("$Q$").scale(0.4).shift([1.6,-1,0]+2.5*UP)
+
+ s3 = Square().shift([1,1,1.5]).scale(0.95)
+ s4 = Square().shift([1,1,2]).scale(0.95)
+
+ m1_line = DashedLine([2,0,1.5],[2,2,2],color = '#87CEEB')
+ m2_line = DashedLine([2,2,2],[0,2,3],color = '#87CEEB')
+
+ dx_line = Line([2,2,0],[4,2,0],color = '#00FF7F')
+ dy_line = Line([2,2,0],[2,4,0],color = '#00FF7F')
+
+ dx = DashedLine([3.5,0,0],[3.5,2,0],color = '#87CEEB')
+ dy = DashedLine([0,3.5,0],[2,3.5,0],color = '#87CEEB')
+
+ dx_text = TextMobject("$dx$").scale(0.8).shift([4,1,0]).rotate(1.571)
+ dy_text = TextMobject("$dy$").scale(0.8).shift([1,3.8,0]).rotate(math.radians(180))
+
+ parx_line = Line([0,2,1.5],[0,5,1.5],color = '#00FF7F')
+ parm_line = Line([0,2,2],[0,5,2],color = '#00FF7F')
+ pary_line = Line([0,2.1,3],[0,5,3],color = '#00FF7F')
+
+ delx = DashedLine([0,4,2],[0,4,1.5],color = '#F0F8FF')
+ dely = DashedLine([0,4,3],[0,4,2],color = '#FAEBD7')
+
+ dely_text = TextMobject("$\\frac{\\partial z}{\\partial y}dy$").shift(4.6*RIGHT+2.3*UP).scale(0.4)
+ delx_text = TextMobject("$\\frac{\\partial z}{\\partial x}dx$").shift(4.6*RIGHT+1.4*UP).scale(0.4)
+
+
+ self.set_camera_orientation(phi=75*DEGREES,theta=20*DEGREES)
+ self.add(axes)
+ self.play(Write(plane))
+ self.play(ShowCreation(label_x))
+ self.add_fixed_in_frame_mobjects(label_y)
+ self.add_fixed_in_frame_mobjects(label_z)
+ self.wait(1)
+ self.play(Write(s2))
+ self.wait(1)
+ self.play(Write(l1),Write(l2),Write(l3))
+ self.wait(1)
+ self.play(Write(s1))
+ self.wait(1)
+ self.play(ShowCreation(d1))
+ self.add_fixed_in_frame_mobjects(d1_text)
+ self.play(ShowCreation(d2))
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.wait(1)
+ self.play(ShowCreation(d3))
+ self.add_fixed_in_frame_mobjects(d3_text)
+ self.play(ShowCreation(m1_line))
+ self.play(ShowCreation(m2_line))
+ self.wait(1)
+ self.play(ShowCreation(dx_line),ShowCreation(dx),ShowCreation(dx_text))
+ self.wait(1)
+ self.play(ShowCreation(dy_line),ShowCreation(dy),ShowCreation(dy_text))
+ self.wait(2)
+ self.play(Write(s3))
+ self.play(Write(s4))
+ self.wait(1)
+ self.play(ShowCreation(parx_line),ShowCreation(parm_line),ShowCreation(pary_line))
+ self.wait(1)
+ self.play(ShowCreation(dely))
+ self.add_fixed_in_frame_mobjects(dely_text)
+ self.wait(1)
+ self.play(ShowCreation(delx))
+ self.add_fixed_in_frame_mobjects(delx_text)
+ self.wait(1)
+
--
cgit
From a423cd75c192f771764e95da3ec562dd06bb1779 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:22:16 +0530
Subject: Create file4_total_differential_change.py
---
.../file4_total_differential_change.py | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.py
new file mode 100644
index 0000000..78e41a2
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.py
@@ -0,0 +1,54 @@
+from manimlib.imports import*
+
+
+class firstScene(ThreeDScene):
+
+ def construct(self):
+
+ axes = ThreeDAxes()
+
+ s = Rectangle(color = '#F08080',fill_opacity=1).fade(0.7).shift(1.9*UP+5*LEFT).scale(0.9)#----surface z = f(x,y)
+
+ s2= Rectangle(color = '#F08080',fill_opacity=1).fade(0.7).shift(2.4*UP+3.1*RIGHT).scale(0.6) #----reflection of the surface on the x-y plane
+
+ l1 = DashedLine(color = '#AFEEEE').rotate(1.571,UP).scale(1).shift(1.53*UP+1.5*RIGHT)
+ l2 = DashedLine(color = '#AFEEEE').rotate(1.571,UP).scale(1).shift(2.9*UP+1.4*RIGHT)
+ l3 = DashedLine(color = '#AFEEEE').rotate(1.571,UP).scale(1).shift(1.5*UP-1.6*RIGHT)
+ l4 = DashedLine(color = '#AFEEEE').rotate(1.571,UP).scale(1).shift(2.9*UP-1.75*RIGHT)
+
+
+ l1_text = TextMobject("$(x+\\triangle x,y)$").shift(RIGHT+1.7*DOWN).scale(0.4)
+ l2_text = TextMobject("$(x+\\triangle x,y+\\triangle y)$").shift(3*RIGHT+1.8*DOWN).scale(0.4)
+ l3_text = TextMobject("$f(x,y)$").shift(1.6*RIGHT+1.5*UP).scale(0.4)
+ l4_text = TextMobject("$(x,y+\\triangle y)$").shift(3.5*RIGHT+0.7*DOWN).scale(0.4)
+
+ label_x = TextMobject("$x$").shift(5*RIGHT+0.4*DOWN)
+ label_y = TextMobject("$y$").shift(5*UP-0.6*RIGHT)
+
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
+ self.wait(1)
+ self.play(ShowCreation(label_x),ShowCreation(label_y))
+ self.play(Write(s))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(l3_text)
+ self.wait(1)
+ self.play(Write(l3))
+ self.wait(1)
+ self.play(Write(l1))
+ self.add_fixed_in_frame_mobjects(l1_text)
+ self.wait(1)
+ self.play(Write(l2))
+ self.add_fixed_in_frame_mobjects(l2_text)
+ self.wait(1)
+ self.play(Write(l4))
+ self.add_fixed_in_frame_mobjects(l4_text)
+ self.wait(1)
+ self.play(Write(s2))
+ self.wait(1)
+
+
+
+
+
+
--
cgit
From 2100c05f63318542f26cbbe7fb3786635504be32 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:24:17 +0530
Subject: Create file5_Total_differential_approximation.py
---
.../file5_Total_differential_approximation.py | 48 ++++++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
new file mode 100644
index 0000000..83017ed
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
@@ -0,0 +1,48 @@
+from manimlib.imports import*
+
+
+class firstScene(ThreeDScene):
+
+ def construct(self):
+
+ axes = ThreeDAxes().rotate(1.571)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ np.sin(u),
+ v,
+ -u**2-v
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#00008B").scale(2).shift(3.8*UP+2*LEFT)
+
+ d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP)
+ d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP)
+
+ l = DashedLine(color = '#800000').rotate(1.571,UP).scale(1).shift(1.7*UP+1.6*RIGHT)
+ l2 = DashedLine(color = '#800000').rotate(1.571,UP).scale(0.8).shift(2.26*UP+1.2*RIGHT)
+
+ l_text = TextMobject("$(x_1,y_1)$",color = '#ADFF2F').scale(0.6).shift(2*RIGHT+1.6*DOWN)
+ l2_text = TextMobject("$(x_2,y_2)$",color = '#ADFF2F').scale(0.6).shift(2.7*RIGHT+1.2*DOWN)
+
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(1*RIGHT+3*UP).fade(0.9)
+
+ tangentplane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(1.1).shift(2*LEFT+3.4*UP).fade(0.5).rotate(0.8,RIGHT)
+ tangentplane_text = TextMobject("Tangent Plane").scale(0.4).shift(3*RIGHT+1*UP)
+
+ label = TextMobject("$z = f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
+
+
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.wait(1)
+ self.play(Write(plane))
+ self.wait(1)
+ self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(label)
+ self.wait(1.5)
+ self.play(ShowCreation(l),ShowCreation(l2),Write(d),Write(d2))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(l_text)
+ self.add_fixed_in_frame_mobjects(l2_text)
+ self.wait(1)
+ self.play(Write(tangentplane))
+ self.add_fixed_in_frame_mobjects(tangentplane_text)
+ self.wait(2)
--
cgit
From d48776b46313ba46965c7414600536b48e846a6d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:27:33 +0530
Subject: Add files via upload
---
.../Total-Differential/file1_Visualization_of_dz.gif | Bin 0 -> 558983 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
new file mode 100644
index 0000000..e00a946
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif differ
--
cgit
From 2a0e8cc2544adf192218b58b153d7569a34e7a5b Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:29:52 +0530
Subject: Add files via upload
---
.../Total-Differential/file2_Differentials.gif | Bin 0 -> 576535 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
new file mode 100644
index 0000000..620b49e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif differ
--
cgit
From afda4b2757055fcba6c036f44dd4dae08b9e8370 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:31:46 +0530
Subject: Add files via upload
---
.../file3_Total_differential_of_z.gif | Bin 0 -> 732678 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
new file mode 100644
index 0000000..5aae2a1
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif differ
--
cgit
From c9ab65f4fcda26f2be6dd60628e072f544e894c6 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:33:18 +0530
Subject: Add files via upload
---
.../file4_total_differential_change.gif | Bin 0 -> 300675 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif
new file mode 100644
index 0000000..f2227a8
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif differ
--
cgit
From 988fbb80727496b4839dfe5c7036bff1d848eff2 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 07:34:42 +0530
Subject: Add files via upload
---
.../file5_Total_differential_approximation.gif | Bin 0 -> 423652 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
new file mode 100644
index 0000000..4f4627d
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif differ
--
cgit
From 2c882380322e86d894bb1c36e7aac00839f205ae Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:15:49 +0530
Subject: Create file1_Extrema_over_g(x,y)=k.py
---
.../file1_Extrema_over_g(x,y)=k.py | 53 ++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
new file mode 100644
index 0000000..17f31ac
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
@@ -0,0 +1,53 @@
+from manimlib.imports import*
+
+class firstScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2+u**3-v**3
+ ]),u_min=-0.5,u_max=0.5, v_min=-0.5,v_max=0.5).scale(5).shift([0,1,2.5]).set_color('#F0FFFF').fade(0.4)
+
+ c = Circle().set_color('#FF00FF').shift([-0.4,0,1.5]).rotate(1.9,UP).scale(0.7)
+
+ minima = Dot(color = '#4169E1').shift([-0.5,0.5,1]).rotate(1.571,UP)
+ maxima = Dot(color = '#4169E1').shift([0.1,0,2.2]).rotate(1.571,UP)
+
+ l1 = DashedLine([-0.5,0.5,0.9],[-0.5,0.5,0],color = '#F08080')
+ l2 = DashedLine([0.1,0,2.1],[0.1,0,0],color = '#F08080')
+
+ c2 = Circle(fill_opacity= 0.5).shift([-0.3,0.2,0]).scale(0.4)
+
+ minima_refl = Dot(color = '#4682B4').shift([-0.5,0.5,0]).rotate(1.571,UP)
+ maxima_refl = Dot(color = '#4682B4').shift([0.1,0,0]).rotate(1.571,UP)
+
+ max_text = TextMobject("maximum over $g(x,y)=k$",color = '#FFA074').shift([-1.7,0,0]).scale(0.5).shift(2.2*UP)
+ min_text = TextMobject("minimum over $g(x,y)=k$",color = '#FFA074').shift([2.5,0.5,1]).scale(0.5).shift(0.5*UP)
+ label_f = TextMobject("$z=f(x,y)$",color = '#8A2BE2').scale(0.5).shift(3*UP+3*RIGHT)
+ label_g = TextMobject("$g(x,y)=k$",color = '#8A2BE2').scale(0.5).shift(2*RIGHT)
+
+
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=45*DEGREES)
+ self.play(Write(surface))
+ self.add_fixed_in_frame_mobjects(label_f)
+ self.wait(2)
+ self.play(Write(c))
+ self.wait(1)
+ self.play(Write(maxima))
+ self.add_fixed_in_frame_mobjects(max_text)
+ self.wait(1)
+ self.play(Write(minima))
+ self.add_fixed_in_frame_mobjects(min_text)
+ self.wait(1)
+ self.play(ShowCreation(l1),ShowCreation(l2))
+ self.play(Write(c2))
+ self.add_fixed_in_frame_mobjects(label_g)
+ self.wait(1)
+ self.play(Write(maxima_refl))
+ self.play(Write(minima_refl))
+ self.wait(1)
+
+
--
cgit
From e21e7a8b9ad0c4ee941be780252e01f1cf0fe4dc Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:17:08 +0530
Subject: Create file2_Geometric_Proof.py
---
.../Lagrange-Multipliers/file2_Geometric_Proof.py | 68 ++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
new file mode 100644
index 0000000..4374ff7
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
@@ -0,0 +1,68 @@
+from manimlib.imports import*
+
+class firstScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes().scale(0.7).rotate(math.radians(180))
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ 1*np.sin(u)*np.cos(v),
+ 1*np.sin(u)*np.sin(v),
+ -1*np.sin(u)*np.sin(u)+2
+ ]),u_min=0,u_max=PI/2,v_min=0,v_max=2*PI,checkerboard_colors=[GREEN_C, GREEN_E]).scale(1).shift([-1.5,-1.5,0])
+
+ d = Dot([-2,-2.55,0],color = '#800000')
+ a_df = Arrow(color = '#00FFFF').rotate(-2).shift(3.2*DOWN+2.3*LEFT) #---- f parallel to g
+ a_dg = Arrow(color = '#FF00FF').scale(0.8).shift(3.2*DOWN+2.3*LEFT).rotate(-2) #---- f parallel to g
+
+ b_df = Arrow(color = '#00FFFF').rotate(1.1).shift(0.82*LEFT+0.15*UP) #---- f parallel to g
+ b_dg = Arrow(color = '#FF00FF').scale(0.6).rotate(-2).shift(1.43*LEFT+1.1*DOWN) #---- f parallel to g
+
+
+ qd = Dot(color = '#800000').shift(1.2*LEFT+0.6*DOWN)
+
+ l1 = Line([-1,-3.1,0],[-4,-3.1,0],color = PINK).rotate(-0.3).fade(0.6)
+ l2 = Line([-0.9,-2.9,0],[-4,-2.9,0],color = PINK).rotate(-0.3).fade(0.6)
+ l3= Line([-0.8,-2.7,0],[-4,-2.7,0],color = PINK).rotate(-0.3).fade(0.6)
+ l4= Line([-0.7,-2.45,0],[-4,-2.45,0],color = PINK).rotate(-0.3).fade(0.6)
+ l5= Line([-0.6,-2.2,0],[-4,-2.25,0],color = PINK).rotate(-0.3).fade(0.6)
+ l6 = Line([-0.5,-2,0],[-4,-2,0],color = PINK).rotate(-0.3).fade(0.6)
+ l7 = Line([-0.4,-1.8,0],[-4,-1.8,0],color = PINK).rotate(-0.3).fade(0.6)
+ l8 = Line([-0.3,-1.6,0],[-4,-1.6,0],color = PINK).rotate(-0.3).fade(0.6)
+ l9= Line([-0.2,-1.4,0],[-4,-1.4,0],color = PINK).rotate(-0.3).fade(0.6)
+ l10= Line([-0.1,-1.2,0],[-4,-1.2,0],color = PINK).rotate(-0.3).fade(0.6)
+ l11 = Line([-0,-1,0],[-4,-1,0],color = PINK).rotate(-0.3).fade(0.6)
+ l12 = Line([-0,-0.8,0],[-4,-0.8,0],color = PINK).rotate(-0.3).fade(0.6)
+ l13= Line([-0,-0.55,0],[-4,-0.55,0],color = PINK).rotate(-0.3).fade(0.6)
+ l14= Line([-0,-0.35,0],[-4,-0.35,0],color = PINK).rotate(-0.3).fade(0.6)
+ l15= Line([-0.,-0.15,0],[-4,-0.15,0],color = PINK).rotate(-0.3).fade(0.6)
+
+ level_Curve = VGroup(l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15)
+
+ rel_text = TextMobject("$\\nabla f = \\lambda \\nabla g$",color = TEAL).shift([3,3.2,0]).scale(0.5)
+
+ f_text = TextMobject("$\\nabla f$",color = '#800000').shift([1,1,0]).scale(0.5)
+ g_text = TextMobject("$\\nabla g$").shift([1.2,-0.8,0]).scale(0.5)
+
+ p_text= TextMobject("$P$").shift([1.8,2.6,0]).scale(0.5)
+
+
+
+ self.add(axes)
+ self.set_camera_orientation(phi=0 * DEGREES, theta = 90*DEGREES)
+ self.play(Write(surface))
+ self.wait(1)
+ self.play(ShowCreation(level_Curve))
+ self.wait(1)
+ self.play(ShowCreation(a_df),ShowCreation(a_dg),Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(rel_text)
+ self.add_fixed_in_frame_mobjects(p_text)
+ self.wait(1)
+ self.play(Write(qd))
+ self.wait(1)
+ self.play(ShowCreation(b_df))
+ self.play(ShowCreation(b_dg))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add_fixed_in_frame_mobjects(g_text)
+ self.wait(1)
--
cgit
From 3c5b714525c48f088bda1371cea7257ac7fb6e72 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:18:20 +0530
Subject: Create file3_Optimizing_function_w.r.t_one_constraint.py
---
...le3_Optimizing_function_w.r.t_one_constraint.py | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.py
new file mode 100644
index 0000000..bf75dd8
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.py
@@ -0,0 +1,29 @@
+from manimlib.imports import*
+
+class firstScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+ cylinder = ParametricSurface(
+ lambda u, v: np.array([
+ np.cos(TAU * v),
+ np.sin(TAU * v),
+ 2 * (u)
+ ]),checkerboard_colors=[YELLOW_C,YELLOW_D,YELLOW_E]
+ ).fade(0.4) #Resolution of the surfaces
+
+ plane = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u+v
+ ]),checkerboard_colors=[TEAL_C,TEAL_D,TEAL_E]
+ ).scale(2.5)
+ self.add(axes)
+ self.set_camera_orientation(phi=75*DEGREES,theta=45*DEGREES)
+ self.play(Write(cylinder))
+ self.play(Write(plane))
+ self.wait(1)
+ self.begin_ambient_camera_rotation(rate=0.7)
+ self.wait(5)
+ self.move_camera(phi=35*DEGREES,theta=-45*DEGREES)
+ self.wait(2)
--
cgit
From 5daed5a560b208dab38019f1f1e0be359e18c93e Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:20:21 +0530
Subject: Add files via upload
---
.../file1_Extrema_over_g(x,y)=k.gif | Bin 0 -> 499796 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
new file mode 100644
index 0000000..1e1782e
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif differ
--
cgit
From ab7570549a8ad1c2b654c3590265c5518ce2ed57 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:21:58 +0530
Subject: Add files via upload
---
.../Lagrange-Multipliers/file2_Geometric_Proof.gif | Bin 0 -> 419262 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif
new file mode 100644
index 0000000..b22afb3
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif differ
--
cgit
From c50ab89a445f3748b96eb99904484a08edf19390 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Wed, 24 Jun 2020 08:23:21 +0530
Subject: Add files via upload
---
...file3_Optimizing_function_w.r.t_one_constraint.gif | Bin 0 -> 2177236 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.gif
new file mode 100644
index 0000000..9602283
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file3_Optimizing_function_w.r.t_one_constraint.gif differ
--
cgit
From b2542c71573f8bae8f7c82b3f38fc550dadb2af6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 09:36:29 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/arc-length-and-curvature/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
index f5313c9..a2a86e6 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,4 +1,4 @@
-**file1_simple_visualization.py**
+**file1_simple_visualization.py**
![file1_simple_visualization.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif)
**file2_circle_curvature.py**
@@ -7,5 +7,5 @@
**file3_curvature_intuition.gif**
![file3_curvature_intuition.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif)
-**file4_different_curvature_single_curve.py**
+**file4_different_curvature_single_curve.py**
![file4_different_curvature_single_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif)
--
cgit
From 7a7bab3efc3a4c8d02905466b686be050b536c87 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 09:44:47 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/space-curves/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/README.md
index 18516b7..42f5df1 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
@@ -1,7 +1,7 @@
-**file1_parametric_ellipse.py**
+**file1_parametric_ellipse.py**
![file1_parametric_ellipse.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file1_parametric_ellipse.gif)
-**file2_parametric_helix.py**
+**file2_parametric_helix.py**
![file2_parametric_helix.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/space-curves/file2_parametric_helix.gif)
**file3_circletosphere.py**
--
cgit
From d01408565b129dc85ef36d0448302ca612221ab6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 10:19:41 +0530
Subject: Update README.md
---
.../general-parametric-curves/README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/README.md
index be358ac..8a47a0e 100644
--- 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
@@ -1,11 +1,11 @@
-**file1_parametric_circle..py**
+**file1_parametric_circle..py**
![file1_parametric_circle.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.gif)
-**file2_cycloid_manim.py**
+**file2_cycloid_manim.py**
![file2_cycloid_manim.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file2_cycloid_manim.gif)
-**file3_brachistochrone.py**
+**file3_brachistochrone.py**
![file3_brachistochrone.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.gif)
-**file4_helix_visualization.py**
+**file4_helix_visualization.py**
![file4_helix_visualization.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file4_helix_visualization.gif)
--
cgit
From 6e1fd99eaf81433196d4f33018307a684b53d304 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 10:20:58 +0530
Subject: Update README.md
---
.../velocity-and-differentiability/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md
index 8092cf7..b08375b 100644
--- 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
@@ -1,5 +1,5 @@
-**file1_smooth_curves.gif**
+**file1_smooth_curves.gif**
![file1_smooth_curves.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif)
-**file2_tangent_space_curve.py**
+**file2_tangent_space_curve.py**
![file2_tangent_space_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif)
--
cgit
From 3e6832a776041727478a6928ad41100b21794c23 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 10:51:43 +0530
Subject: Create README.md
---
.../tnb-frame-and-serret-frenet-formulae/README.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
new file mode 100644
index 0000000..fe09907
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
@@ -0,0 +1,5 @@
+**file1_prescribed_plane.gif**
+![file1_prescribed_plane.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif)
+
+**file2_TNB_frame.gif**
+![file2_TNB_frame.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif)
--
cgit
From d8de81420dd15a86e1e45fe937e3bf3d75c065b3 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 10:54:57 +0530
Subject: Update README.md
---
.../equations-of-planes-and-lines/README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/README.md
index d6b89ef..29d2f6a 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,14 +1,14 @@
**file1_line_eqn.py**
![file1_line_eqn.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file1_line_eqn.gif)
-**file2_point_normal_form_plane.py**
+**file2_point_normal_form_plane.py**
![file2_point_normal_form_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file2_point_normal_form_plane.gif)
-**file3_intercept_form_plane.py**
+**file3_intercept_form_plane.py**
![file3_intercept_form_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file3_intercept_form_plane.gif)
-**file4_3d_plane.py**
+**file4_3d_plane.py**
![file4_3d_plane.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file4_3d_plane.gif)
-**file5_vector_form_line.py**
+**file5_vector_form_line.py**
![file5_vector_form_line.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/equations-of-planes-and-lines/file5_vector_form_line.gif)
--
cgit
From 950344546229095d1c2019e1305e682959b9fafd Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 13:11:09 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/arc-length-and-curvature/README.md | 3 ---
1 file changed, 3 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
index a2a86e6..a2f71d7 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
@@ -4,8 +4,5 @@
**file2_circle_curvature.py**
![file2_circle_curvature.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif)
-**file3_curvature_intuition.gif**
-![file3_curvature_intuition.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif)
-
**file4_different_curvature_single_curve.py**
![file4_different_curvature_single_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif)
--
cgit
From 28cb4d37575ed5a4dd3630e21f72431101075991 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 13:12:07 +0530
Subject: Delete README.md
---
.../tnb-frame-and-serret-frenet-formulae/README.md | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
deleted file mode 100644
index fe09907..0000000
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-**file1_prescribed_plane.gif**
-![file1_prescribed_plane.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif)
-
-**file2_TNB_frame.gif**
-![file2_TNB_frame.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif)
--
cgit
From 6725b1f2f29dd2165364856905b31d83aa8daeab Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 13:12:26 +0530
Subject: Update README.md
---
.../velocity-and-differentiability/README.md | 3 ---
1 file changed, 3 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md
index b08375b..bc571c6 100644
--- 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
@@ -1,5 +1,2 @@
-**file1_smooth_curves.gif**
-![file1_smooth_curves.gif](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file1_smooth_curves.gif)
-
**file2_tangent_space_curve.py**
![file2_tangent_space_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif)
--
cgit
From 69c003a243ea5f36e52e8010c4fa63fef7d7bbb4 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Wed, 24 Jun 2020 13:23:04 +0530
Subject: Create file4_surface.py
---
.../surface-integrals/file4_surface.py | 237 +++++++++++++++++++++
1 file changed, 237 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
new file mode 100644
index 0000000..3c2e145
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
@@ -0,0 +1,237 @@
+from manimlib.imports import *
+
+class Surf(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":2 ,"b": 6, "c":1 , "d":6,
+ "axes_shift":-3*OUT + 5*LEFT,
+ "x_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "y_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "z_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "num_axis_pieces": 1,
+ },
+ "default_graph_style": {
+ "stroke_width": 2,
+ "stroke_color": WHITE,
+ },
+ "default_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$S$").set_color(BLUE)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("D").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=YELLOW,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.05)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(2)
+ self.stop_ambient_camera_rotation()
+ self.wait(1)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.c,
+ "u_max": axes.d,
+ "v_min": axes.a,
+ "v_max": axes.b,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (axes.x_max - axes.x_min) // axes.x_axis.tick_frequency,
+ ),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"WHITE"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ if include_numbers:
+ self.add_axes_numbers(axes)
+
+ if include_labels:
+ self.add_axes_labels(axes)
+
+ # Adjust axis orientation
+ axes.x_axis.rotate(
+ 90 * DEGREES, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 1e-5
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ axes.scale(1)
+ # axes.center()
+ axes.shift(axes.axes_shift)
+
+ self.add(axes)
+ self.axes = axes
+
+ def add_axes_numbers(self, axes):
+ x_axis = axes.x_axis
+ y_axis = axes.y_axis
+ tex_vals_x = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", axes.d)
+ ]
+ x_labels = VGroup()
+ y_labels = VGroup()
+ for tex, val in tex_vals_x:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(x_axis.n2p(val), DOWN)
+ x_labels.add(label)
+ x_axis.add(x_labels)
+ x_axis.numbers = x_labels
+
+ for tex, val in tex_vals_y:
+ label = TexMobject(tex)
+ label.scale(1.5)
+ label.next_to(y_axis.n2p(val), LEFT)
+ label.rotate(90 * DEGREES)
+ y_labels.add(label)
+
+ y_axis.add(y_labels)
+ y_axis.numbers = y_labels
+
+ return axes
+
+ def add_axes_labels(self, axes):
+ x_label = TexMobject("X")
+ x_label.next_to(axes.x_axis.get_end(), RIGHT)
+ axes.x_axis.label = x_label
+
+ y_label = TextMobject("Y")
+ y_label.rotate(90 * DEGREES, OUT)
+ y_label.next_to(axes.y_axis.get_end(), UP)
+ axes.y_axis.label = y_label
+
+ z_label = TextMobject("Z")
+ z_label.rotate(90 * DEGREES, RIGHT)
+ z_label.next_to(axes.z_axis.get_zenith(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+ ######Code_by_Somnath_Pandit_https://github.com/panditsomnath10016git#########
+
+
--
cgit
From bd51f25304cd0305a20f448db306deb03cf1093c Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Wed, 24 Jun 2020 13:23:36 +0530
Subject: Rename file4_surface.py to file5_surface.py
---
.../surface-integrals/file4_surface.py | 237 ---------------------
.../surface-integrals/file5_surface.py | 237 +++++++++++++++++++++
2 files changed, 237 insertions(+), 237 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
deleted file mode 100644
index 3c2e145..0000000
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file4_surface.py
+++ /dev/null
@@ -1,237 +0,0 @@
-from manimlib.imports import *
-
-class Surf(ThreeDScene):
-
- CONFIG = {
- "axes_config": {
- "x_min": 0,
- "x_max": 8,
- "y_min": 0,
- "y_max": 8,
- "z_min": 0,
- "z_max": 6,
- "a":2 ,"b": 6, "c":1 , "d":6,
- "axes_shift":-3*OUT + 5*LEFT,
- "x_axis_config": {
- "tick_frequency": 1,
- # "include_tip": False,
- },
- "y_axis_config": {
- "tick_frequency": 1,
- # "include_tip": False,
- },
- "z_axis_config": {
- "tick_frequency": 1,
- # "include_tip": False,
- },
- "num_axis_pieces": 1,
- },
- "default_graph_style": {
- "stroke_width": 2,
- "stroke_color": WHITE,
- },
- "default_surface_config": {
- "fill_opacity": 0.5,
- "checkerboard_colors": [LIGHT_GREY],
- "stroke_width": 0.5,
- "stroke_color": WHITE,
- "stroke_opacity": 0.5,
- },
- "Func": lambda x,y: 2+y/4+np.sin(x)
- }
-
-
- def construct(self):
-
- self.setup_axes()
- self.set_camera_orientation(distance=35,
- phi=80 * DEGREES,
- theta=-80 * DEGREES,
- )
-
- fn_text=TextMobject("$S$").set_color(BLUE)
- self.add_fixed_in_frame_mobjects(fn_text)
- fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
-
- R=TextMobject("D").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=YELLOW,
- stroke_width=0.8,
- stroke_color=WHITE,
- )
-
-
- self.begin_ambient_camera_rotation(rate=0.05)
- self.play(Write(surface))
- # self.play(LaggedStart(ShowCreation(surface)))
-
- self.get_lines()
- # self.play(FadeIn(self.axes.input_plane))
- self.wait(2)
- self.stop_ambient_camera_rotation()
- self.wait(1)
-
- def get_surface(self,axes, func, **kwargs):
- config = {
- "u_min": axes.c,
- "u_max": axes.d,
- "v_min": axes.a,
- "v_max": axes.b,
- "resolution": (
- (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
- (axes.x_max - axes.x_min) // axes.x_axis.tick_frequency,
- ),
- }
-
- config.update(self.default_surface_config)
- config.update(kwargs)
- return ParametricSurface(
- lambda x,y : axes.c2p(
- x, y, func(x, y)
- ),
- **config
- )
-
- def get_lines(self):
- axes = self.axes
- labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
- axes.y_axis.n2p(axes.d)]
-
-
- surface_corners=[]
- for x,y,z in self.region_corners:
- surface_corners.append([x,y,self.Func(x,y)])
-
- lines=VGroup()
- for start , end in zip(surface_corners,
- self.region_corners):
- lines.add(self.draw_lines(start,end,"WHITE"))
-
- for start , end in zip(labels,
- self.region_corners):
- # lines.add(self.draw_lines(start,end,"BLUE"))
- # print (start,end)
- pass
- self.play(ShowCreation(lines))
-
-
- def draw_lines(self,start,end,color):
- start=self.axes.c2p(*start)
- end=self.axes.c2p(*end)
- line=DashedLine(start,end,color=color)
-
- return line
-
- def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
- config = dict(self.axes_config)
- config.update(kwargs)
- axes = ThreeDAxes(**config)
- axes.set_stroke(width=2)
-
- if include_numbers:
- self.add_axes_numbers(axes)
-
- if include_labels:
- self.add_axes_labels(axes)
-
- # Adjust axis orientation
- axes.x_axis.rotate(
- 90 * DEGREES, RIGHT,
- about_point=axes.c2p(0, 0, 0),
- )
- axes.y_axis.rotate(
- 90 * DEGREES, UP,
- about_point=axes.c2p(0, 0, 0),
- )
-
- # Add xy-plane
- input_plane = self.get_surface(
- axes, lambda x, t: 1e-5
- )
- input_plane.set_style(
- fill_opacity=0.5,
- fill_color=TEAL,
- stroke_width=0,
- stroke_color=WHITE,
- )
-
- axes.input_plane = input_plane
-
- self.region_corners=[
- input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
-
- return axes
-
-
- def setup_axes(self):
- axes = self.get_three_d_axes(include_labels=True)
- axes.add(axes.input_plane)
- axes.scale(1)
- # axes.center()
- axes.shift(axes.axes_shift)
-
- self.add(axes)
- self.axes = axes
-
- def add_axes_numbers(self, axes):
- x_axis = axes.x_axis
- y_axis = axes.y_axis
- tex_vals_x = [
- ("a", axes.a),
- ("b", axes.b),
- ]
- tex_vals_y=[
- ("c", axes.c),
- ("d", axes.d)
- ]
- x_labels = VGroup()
- y_labels = VGroup()
- for tex, val in tex_vals_x:
- label = TexMobject(tex)
- label.scale(1)
- label.next_to(x_axis.n2p(val), DOWN)
- x_labels.add(label)
- x_axis.add(x_labels)
- x_axis.numbers = x_labels
-
- for tex, val in tex_vals_y:
- label = TexMobject(tex)
- label.scale(1.5)
- label.next_to(y_axis.n2p(val), LEFT)
- label.rotate(90 * DEGREES)
- y_labels.add(label)
-
- y_axis.add(y_labels)
- y_axis.numbers = y_labels
-
- return axes
-
- def add_axes_labels(self, axes):
- x_label = TexMobject("X")
- x_label.next_to(axes.x_axis.get_end(), RIGHT)
- axes.x_axis.label = x_label
-
- y_label = TextMobject("Y")
- y_label.rotate(90 * DEGREES, OUT)
- y_label.next_to(axes.y_axis.get_end(), UP)
- axes.y_axis.label = y_label
-
- z_label = TextMobject("Z")
- z_label.rotate(90 * DEGREES, RIGHT)
- z_label.next_to(axes.z_axis.get_zenith(), RIGHT)
- axes.z_axis.label = z_label
- for axis in axes:
- axis.add(axis.label)
- return axes
- ######Code_by_Somnath_Pandit_https://github.com/panditsomnath10016git#########
-
-
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.py
new file mode 100644
index 0000000..3c2e145
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.py
@@ -0,0 +1,237 @@
+from manimlib.imports import *
+
+class Surf(ThreeDScene):
+
+ CONFIG = {
+ "axes_config": {
+ "x_min": 0,
+ "x_max": 8,
+ "y_min": 0,
+ "y_max": 8,
+ "z_min": 0,
+ "z_max": 6,
+ "a":2 ,"b": 6, "c":1 , "d":6,
+ "axes_shift":-3*OUT + 5*LEFT,
+ "x_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "y_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "z_axis_config": {
+ "tick_frequency": 1,
+ # "include_tip": False,
+ },
+ "num_axis_pieces": 1,
+ },
+ "default_graph_style": {
+ "stroke_width": 2,
+ "stroke_color": WHITE,
+ },
+ "default_surface_config": {
+ "fill_opacity": 0.5,
+ "checkerboard_colors": [LIGHT_GREY],
+ "stroke_width": 0.5,
+ "stroke_color": WHITE,
+ "stroke_opacity": 0.5,
+ },
+ "Func": lambda x,y: 2+y/4+np.sin(x)
+ }
+
+
+ def construct(self):
+
+ self.setup_axes()
+ self.set_camera_orientation(distance=35,
+ phi=80 * DEGREES,
+ theta=-80 * DEGREES,
+ )
+
+ fn_text=TextMobject("$S$").set_color(BLUE)
+ self.add_fixed_in_frame_mobjects(fn_text)
+ fn_text.to_edge(TOP,buff=MED_SMALL_BUFF)
+
+ R=TextMobject("D").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=YELLOW,
+ stroke_width=0.8,
+ stroke_color=WHITE,
+ )
+
+
+ self.begin_ambient_camera_rotation(rate=0.05)
+ self.play(Write(surface))
+ # self.play(LaggedStart(ShowCreation(surface)))
+
+ self.get_lines()
+ # self.play(FadeIn(self.axes.input_plane))
+ self.wait(2)
+ self.stop_ambient_camera_rotation()
+ self.wait(1)
+
+ def get_surface(self,axes, func, **kwargs):
+ config = {
+ "u_min": axes.c,
+ "u_max": axes.d,
+ "v_min": axes.a,
+ "v_max": axes.b,
+ "resolution": (
+ (axes.y_max - axes.y_min) // axes.y_axis.tick_frequency,
+ (axes.x_max - axes.x_min) // axes.x_axis.tick_frequency,
+ ),
+ }
+
+ config.update(self.default_surface_config)
+ config.update(kwargs)
+ return ParametricSurface(
+ lambda x,y : axes.c2p(
+ x, y, func(x, y)
+ ),
+ **config
+ )
+
+ def get_lines(self):
+ axes = self.axes
+ labels=[axes.x_axis.n2p(axes.a), axes.x_axis.n2p(axes.b), axes.y_axis.n2p(axes.c),
+ axes.y_axis.n2p(axes.d)]
+
+
+ surface_corners=[]
+ for x,y,z in self.region_corners:
+ surface_corners.append([x,y,self.Func(x,y)])
+
+ lines=VGroup()
+ for start , end in zip(surface_corners,
+ self.region_corners):
+ lines.add(self.draw_lines(start,end,"WHITE"))
+
+ for start , end in zip(labels,
+ self.region_corners):
+ # lines.add(self.draw_lines(start,end,"BLUE"))
+ # print (start,end)
+ pass
+ self.play(ShowCreation(lines))
+
+
+ def draw_lines(self,start,end,color):
+ start=self.axes.c2p(*start)
+ end=self.axes.c2p(*end)
+ line=DashedLine(start,end,color=color)
+
+ return line
+
+ def get_three_d_axes(self, include_labels=True, include_numbers=True, **kwargs):
+ config = dict(self.axes_config)
+ config.update(kwargs)
+ axes = ThreeDAxes(**config)
+ axes.set_stroke(width=2)
+
+ if include_numbers:
+ self.add_axes_numbers(axes)
+
+ if include_labels:
+ self.add_axes_labels(axes)
+
+ # Adjust axis orientation
+ axes.x_axis.rotate(
+ 90 * DEGREES, RIGHT,
+ about_point=axes.c2p(0, 0, 0),
+ )
+ axes.y_axis.rotate(
+ 90 * DEGREES, UP,
+ about_point=axes.c2p(0, 0, 0),
+ )
+
+ # Add xy-plane
+ input_plane = self.get_surface(
+ axes, lambda x, t: 1e-5
+ )
+ input_plane.set_style(
+ fill_opacity=0.5,
+ fill_color=TEAL,
+ stroke_width=0,
+ stroke_color=WHITE,
+ )
+
+ axes.input_plane = input_plane
+
+ self.region_corners=[
+ input_plane.get_corner(pos) for pos in (DL,DR,UR,UL)]
+
+ return axes
+
+
+ def setup_axes(self):
+ axes = self.get_three_d_axes(include_labels=True)
+ axes.add(axes.input_plane)
+ axes.scale(1)
+ # axes.center()
+ axes.shift(axes.axes_shift)
+
+ self.add(axes)
+ self.axes = axes
+
+ def add_axes_numbers(self, axes):
+ x_axis = axes.x_axis
+ y_axis = axes.y_axis
+ tex_vals_x = [
+ ("a", axes.a),
+ ("b", axes.b),
+ ]
+ tex_vals_y=[
+ ("c", axes.c),
+ ("d", axes.d)
+ ]
+ x_labels = VGroup()
+ y_labels = VGroup()
+ for tex, val in tex_vals_x:
+ label = TexMobject(tex)
+ label.scale(1)
+ label.next_to(x_axis.n2p(val), DOWN)
+ x_labels.add(label)
+ x_axis.add(x_labels)
+ x_axis.numbers = x_labels
+
+ for tex, val in tex_vals_y:
+ label = TexMobject(tex)
+ label.scale(1.5)
+ label.next_to(y_axis.n2p(val), LEFT)
+ label.rotate(90 * DEGREES)
+ y_labels.add(label)
+
+ y_axis.add(y_labels)
+ y_axis.numbers = y_labels
+
+ return axes
+
+ def add_axes_labels(self, axes):
+ x_label = TexMobject("X")
+ x_label.next_to(axes.x_axis.get_end(), RIGHT)
+ axes.x_axis.label = x_label
+
+ y_label = TextMobject("Y")
+ y_label.rotate(90 * DEGREES, OUT)
+ y_label.next_to(axes.y_axis.get_end(), UP)
+ axes.y_axis.label = y_label
+
+ z_label = TextMobject("Z")
+ z_label.rotate(90 * DEGREES, RIGHT)
+ z_label.next_to(axes.z_axis.get_zenith(), RIGHT)
+ axes.z_axis.label = z_label
+ for axis in axes:
+ axis.add(axis.label)
+ return axes
+ ######Code_by_Somnath_Pandit_https://github.com/panditsomnath10016git#########
+
+
--
cgit
From a865350d4775d430765d60cdaef021374c1435aa Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Wed, 24 Jun 2020 13:31:40 +0530
Subject: Add files via upload
---
.../surface-integrals/file5_surface.gif | Bin 0 -> 7241572 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.gif b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.gif
new file mode 100644
index 0000000..27dcac8
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/file5_surface.gif differ
--
cgit
From b5f5577b9a5fadd92febd2e9ead886469be4b0af Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Wed, 24 Jun 2020 13:33:20 +0530
Subject: Update README.md
---
.../triple-and-surface-integrals/surface-integrals/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/surface-integrals/README.md
index a4a1c84..a1de8b5 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
@@ -6,3 +6,5 @@
![file3_cube_sideC](sideC.gif)
**file4_pauseandponder.py**
![file4_pauseandponder](pauseandponder.gif)
+**file5_surface.py**
+![file5_surface](file5_surface.gif)
--
cgit
From ebfe7a6656b240aacffc4c92e873d4f3fed79971 Mon Sep 17 00:00:00 2001
From: vishal786-commits
Date: Wed, 24 Jun 2020 13:36:10 +0530
Subject: Update file4_cube_surface.py
---
.../flux/file4_cube_surface.py | 195 +++++++++++++++++++--
1 file changed, 176 insertions(+), 19 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
index 5963996..9301a00 100644
--- a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
+++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py
@@ -43,29 +43,186 @@ class cuber(ThreeDScene):
n1.rotate(PI/2,axis=RIGHT)
n1.shift(3*RIGHT+1.3*OUT+DOWN)
+ spaceloc = [[0,0,2],[1,0,2],[-1,0,2],[2,0,2],[-2,0,2],[3,0,2],[-3,0,2],
+ [0,1,2],[1,1,2],[-1,1,2],[2,1,2],[-2,1,2],[3,1,2],[-3,1,2],
+ [0,-1,2],[1,-1,2],[-1,-1,2],[2,-1,2],[-2,-1,2],[3,-1,2],[-3,-1,2],
+ [0,2,2],[1,2,2],[-1,2,2],[2,2,2],[-2,2,2],[3,2,2],[-3,2,2],
+ [0,-2,2],[1,-2,2],[-1,-2,2],[2,-2,2],[-2,-2,2],[3,-2,2],[-3,-2,2],
+ [0,3,2],[1,3,2],[-1,3,2],[2,3,2],[-2,3,2],[3,3,2],[-3,3,2],
+ [0,3,2],[1,3,2],[-1,3,2],[2,3,2],[-2,3,2],[3,3,2],[-3,3,2],
+ [0,4,2],[1,4,2],[-1,4,2],[2,4,2],[-2,4,2],[3,4,2],[-3,4,2],
+ [0,4,2],[1,4,2],[-1,4,2],[2,4,2],[-2,4,2],[3,4,2],[-3,4,2],
+ [0,5,2],[1,5,2],[-1,5,2],[2,5,2],[-2,5,2],[3,5,2],[-3,5,2],
+ [0,5,2],[1,5,2],[-1,5,2],[2,5,2],[-2,5,2],[3,5,2],[-3,5,2],
+ [0,6,2],[1,6,2],[-1,6,2],[2,6,2],[-2,6,2],[3,6,2],[-3,6,2],
+ [0,1.5,2],[1,1.5,2],[-1,1.5,2],[2,1.5,2],[-2,1.5,2],[3,1.5,2],[-3,1.5,2],
+ [0,3,2],[1,3,2],[-1,3,2],[2,3,2],[-2,3,2],[3,3,2],[-3,3,2]]
+
+
+ veclist1=[Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E)]
+
+
+
+
+
+ [veclist1[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
+ [veclist1[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
+ [veclist1[i].rotate(PI/6,axis=OUT) for i in range(98)]
+ [veclist1[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ vectorfield1=VGroup(*veclist1)
+ [veclist1[i].shift(spaceloc[i]) for i in range(98)]
- self.set_camera_orientation(phi=75 * DEGREES,theta=-15*DEGREES)
+
+
+ veclist2=[Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),
+ Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E),Vector(color=GOLD_E)]
+
+
+
+
+
+ [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
+ [veclist2[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
+ [veclist2[i].rotate(PI/6,axis=OUT) for i in range(98)]
+ [veclist2[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ vectorfield2=VGroup(*veclist2)
+ [veclist2[i].shift(spaceloc[i]) for i in range(98)]
+
+
+
+ veclist3=[Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector()]
+
+
+
+
+
+ [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
+ [veclist3[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
+ [veclist3[i].rotate(PI/6,axis=OUT) for i in range(98)]
+ [veclist3[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ vectorfield3=VGroup(*veclist3)
+ [veclist3[i].shift(spaceloc[i]) for i in range(98)]
+
+
+
+
+ veclist4=[Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector(),
+ Vector(color=RED),Vector(color=GREEN),Vector(color=BLUE),Vector(color=PINK),Vector(color=MAROON),Vector(color=GREEN),Vector()]
+
+
+
+
+
+ [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(10,30,1)]
+ [veclist4[i].rotate(PI/4,axis=RIGHT) for i in range(40,80,2)]
+ [veclist4[i].rotate(PI/6,axis=OUT) for i in range(98)]
+ [veclist4[i].rotate(PI/8,axis=DOWN) for i in range(98)]
+ vectorfield4=VGroup(*veclist4)
+ [veclist4[i].shift(spaceloc[i]) for i in range(98)]
+
+
+ vectorfield1.shift(1.5*DOWN)
+ vectorfield2.shift(IN+1.5*DOWN)
+ vectorfield3.shift(2*IN+1.5*DOWN)
+ vectorfield4.shift(3*IN+1.5*DOWN)
+
+ vectors=[vectorfield1,vectorfield2,vectorfield3,vectorfield4]
+ vectorfield=VGroup(*vectors)
+ vectorfield.scale(1.25)
+
+ fv=[Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
+ Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
+ Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
+ Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),Vector(color=ORANGE),
+ ]
+
+ spaceloc2 = [[1.5,0.5,0.5],[1.5,1,0.5],[1.5,1.5,0.5],[1.5,2,0.5],
+ [1.5,0.5,1],[1.5,1,1],[1.5,1.5,1],[1.5,2,1],
+ [1.5,0.5,1.5],[1.5,1,1.5],[1.5,1.5,1.5],[1.5,2,1.5],
+ [1.5,0.5,2],[1.5,1,2],[1.5,1.5,2],[1.5,2,2]]
+
+ [fv[i].rotate(PI/4,axis=RIGHT) for i in range(1)]
+ [fv[i].rotate(PI/6,axis=OUT) for i in range(16)]
+ [fv[i].rotate(PI/8,axis=DOWN) for i in range(16)]
+ [fv[i].shift(spaceloc2[i]) for i in range(16)]
+ fvfield=VGroup(*fv)
+ fvfield.shift(0.5*IN+2*DOWN)
+
+ flux=TextMobject("Flux through one side of the cube").set_color(ORANGE)
+ flux.shift(3*UP+1.5*LEFT)
+
+
+
+
+
+ self.set_camera_orientation(phi=70 * DEGREES,theta=-75*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.play(ShowCreation(vectorfield))
+ self.add(fvfield)
+ self.begin_ambient_camera_rotation(rate=0.01)
+
+ self.play(ShowCreation(cube, run_time=1))
+
self.wait(1)
self.play(ShowCreation(sq3))
-
self.wait(1)
- self.play(ShowCreation(v1),ShowCreation(n1))
+ self.play(FadeOut(cube))
+ self.play(FadeOut(vectorfield))
+ self.add_fixed_in_frame_mobjects(flux)
+ # self.play(ShowCreation(flux))
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)
+ self.play(ShowCreation(v1),ShowCreation(n1))
+ self.wait(6)
+ # self.stop_ambient_camera_rotation()
+
--
cgit
From 82b3f04bc10d746282a618458797486e2096a28c Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Thu, 25 Jun 2020 03:06:20 +0530
Subject: tnb
---
.../file2_TNB_frame.gif | Bin 150050 -> 0 bytes
.../file2_tnb_frame.gif | Bin 0 -> 150050 bytes
.../file2_tnb_frame_manim.gif | Bin 0 -> 837251 bytes
.../file2_tnb_frame_manim.py | 125 +++++++++++++++++++++
4 files changed, 125 insertions(+)
delete 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/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py
(limited to 'FSF-2020')
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
deleted file mode 100644
index 097652f..0000000
Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_TNB_frame.gif and /dev/null 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/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.gif
new file mode 100644
index 0000000..784b6a6
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_manim.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_manim.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py
new file mode 100644
index 0000000..ee5e717
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py
@@ -0,0 +1,125 @@
+from manimlib.imports import *
+
+class tnb(ThreeDScene):
+ def construct(self):
+ self.set_camera_orientation(phi = 75*DEGREES, theta=45*DEGREES)
+
+ t = TextMobject(r'T', color = YELLOW)
+ n = TextMobject(r'N', color = BLUE).next_to(t, RIGHT, buff=0)
+ b = TextMobject(r'B', color = GREEN_E).next_to(n, RIGHT, buff=0)
+ frame = TextMobject(r'Frame').next_to(b, RIGHT, buff=0.2)
+
+ text = VGroup(*[t,n,b,frame]).move_to(ORIGIN).shift(3*UP)
+
+ helix1 = 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.638*np.pi/3, color = WHITE
+ )
+
+ helix2 = ParametricFunction(
+ lambda t: np.array([
+ np.cos(TAU*t),
+ np.sin(TAU*t),
+ 0.4*t
+ ]), t_min = -1.638*np.pi/3, t_max = -1.33*np.pi/3, color = WHITE
+ )
+
+ helix3 = ParametricFunction(
+ lambda t: np.array([
+ np.cos(TAU*t),
+ np.sin(TAU*t),
+ 0.4*t
+ ]), t_min = -1.33*np.pi/3, t_max = -np.pi/3, color = WHITE
+ )
+
+ helix4 = ParametricFunction(
+ lambda t: np.array([
+ np.cos(TAU*t),
+ np.sin(TAU*t),
+ 0.4*t
+ ]), t_min = -np.pi/3, t_max = -1.3*np.pi/6, color = WHITE
+ )
+
+ helix5 = ParametricFunction(
+ lambda t: np.array([
+ np.cos(TAU*t),
+ np.sin(TAU*t),
+ 0.4*t
+ ]), t_min = -1.3*np.pi/6, t_max = 0, color = WHITE
+ )
+
+ helix_dot = Dot(radius = 0.16, color = RED)
+
+ dot0 = Dot(np.array([np.cos(-2*np.pi/3), np.sin(-2*np.pi/3), -0.8*np.pi/3]), radius = 0.16, color=RED).shift(np.array([4.65,0,-0.8]))
+ tgt0 = Arrow((0,0,0), (1,2,0), color = YELLOW).shift(dot0.get_center() - np.array([0.04,0.2,0]))
+ nm0 = Arrow((0,0,0), (-2,1,0), color = BLUE).shift(dot0.get_center() + np.array([0.3,0,0]))
+ bnm0 = Arrow((0,0,0), (0,2,0), color = GREEN_E).shift(6.1*LEFT + 3*DOWN)
+ plane0 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(dot0.get_center() + np.array([-0.35, 0.85, 0])).scale(1.2).rotate(65*DEGREES)
+ point0 = VGroup(*[dot0, tgt0, nm0, bnm0, plane0]).scale(0.8).shift(np.array([1,0,0]))
+
+ dot1 = Dot(np.array([np.cos(-np.pi/3), np.sin(-np.pi/3), -0.4*np.pi/3]) + np.array([0,0.2,0]), radius = 0.16, color=RED)
+ tgt1 = Arrow((0,0,0), (-2,-0.55,0), color = YELLOW).shift(dot1.get_center() + np.array([0.18,0.04,0]))
+ nm1 = Arrow((0,0,0), (0.4,-2,0), color = BLUE).shift(dot1.get_center() + np.array([0,0.26,0]))
+ bnm1 = Arrow((0,0,0), (0,2,0), color=GREEN_E).shift(3.68*RIGHT+2.48*DOWN)
+ plane1 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(dot1.get_center() + np.array([-0.4, -0.6, 0])).rotate(13*DEGREES).scale(1.2)
+ point1 = VGroup(*[dot1, tgt1, nm1, plane1]).scale(0.8).shift(np.array([1,6.25,0]))
+
+ dot2 = Dot(np.array([np.cos(-np.pi/6), np.sin(-np.pi/6), -0.2*np.pi/3]) - np.array([1.9,0,0]), radius=0.16,color=RED)
+ tgt2 = Arrow((0,0,0), (1,-2,0), color = YELLOW).shift(dot2.get_center() + np.array([-0.2,0.2,0]))
+ nm2 = Arrow((0,0,0), (2,1,0), color = BLUE).shift(dot2.get_center() + np.array([-0.2,-0.06,0]))
+ bnm2 = Arrow((0,0,0), (0,2,0), color=GREEN_E).shift(0.4*RIGHT + 0.16*DOWN)
+ plane2 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(dot2.get_center() + np.array([0.92, -0.5, 0])).rotate(23*DEGREES).scale(1.2)
+ point2 = VGroup(*[dot2, tgt2, nm2, bnm2, plane2])
+
+ helix = VGroup(*[helix1, helix2, helix3, helix4, helix5])
+ self.add_fixed_in_frame_mobjects(text)
+ self.play(FadeIn(helix), FadeIn(text))
+ self.play(ApplyMethod(helix.scale, 4))
+ self.add_fixed_in_frame_mobjects(bnm0)
+ self.play(FadeIn(point0), MoveAlongPath(helix_dot, helix1, run_time=5))
+
+ self.add_fixed_in_frame_mobjects(bnm1)
+ self.play(ApplyMethod(point0.set_color, GRAY), FadeIn(point1))
+ self.play(MoveAlongPath(helix_dot, helix2, run_time = 5))
+
+ self.add_fixed_in_frame_mobjects(bnm2)
+ self.play(ApplyMethod(point1.set_color, GRAY), ApplyMethod(bnm1.set_color, GRAY), FadeIn(point2))
+ self.play(MoveAlongPath(helix_dot, helix3, run_time=5))
+
+ dot3 = Dot(np.array([np.cos(-np.pi/3), np.sin(-np.pi/3), -0.4*np.pi/3]) + np.array([3.3,-0.25,0]), radius = 0.16, color=RED)
+ tgt3 = Arrow((0,0,0), (0,2,0), color = YELLOW).shift(helix_dot.get_center() - np.array([-0.05,0.2,0]))
+ nm3 = Arrow((0,0,0), (-2,0,0), color = BLUE).shift(helix_dot.get_center() + np.array([0.25,0,0]))
+ bnm3 = Arrow((0,0,0), (0,2,0), color = GREEN_E).shift(3.87*LEFT + 1.24*DOWN)
+ plane3 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(helix_dot.get_center() + np.array([-0.5, 0.62, 0]))
+ point3 = VGroup(*[dot3, tgt3, nm3, bnm3, plane3]).shift(np.array([0,0,0]))
+
+ dot4 = Dot(np.array([np.cos(-np.pi/12), np.sin(-np.pi/12), -0.1*np.pi/3]) + np.array([-3.4,3.4,0]), radius = 0.16, color=RED)
+ tgt4 = Arrow((0,0,0), (-2,-0.85,0), color = YELLOW).shift(dot4.get_center() - np.array([-0.05,0,0]))
+ nm4 = Arrow((0,0,0), (0.8,-2,0), color = BLUE).shift(dot4.get_center() + np.array([-0.1,0.25,0]))
+ bnm4 = Arrow((0,0,0), (0,2,0), color = GREEN_E).shift(4.03*RIGHT + 0.5*DOWN)
+ plane4 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(dot4.get_center() + np.array([-0.4,-1,0])).rotate(22*DEGREES).scale(1.2)
+ point4 = VGroup(*[dot4, tgt4, nm4, bnm4, plane4])
+
+ dot5 = Dot((1,0,0) + np.array([2.3,-1,1]))
+ tgt5 = Arrow((0,0,0), (0,2,0), color = YELLOW).shift(dot5.get_center() - np.array([-0.05,0.2,0]))
+ nm5 = Arrow((0,0,0), (-2,0,0), color = BLUE).shift(dot5.get_center() + np.array([0.25,0,0]))
+ bnm5 = Arrow((0,0,0), (0,2,0), color = GREEN_E).shift(3.34*LEFT+0.3*UP)
+ plane5 = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).shift(dot5.get_center() + np.array([-0.5,0.5,0]))
+ point5 = VGroup(*[tgt5, nm5, bnm5, plane5])
+
+ self.add_fixed_in_frame_mobjects(bnm3)
+ self.play(ApplyMethod(point2.set_color, GRAY), FadeIn(point3))
+ self.play(MoveAlongPath(helix_dot, helix4, run_time=5))
+
+ self.add_fixed_in_frame_mobjects(bnm4)
+ self.play(ApplyMethod(point3.set_color, GRAY), FadeIn(point4))
+ self.play(MoveAlongPath(helix_dot, helix5, run_time=5))
+
+ self.add_fixed_in_frame_mobjects(bnm5)
+ self.play(ApplyMethod(point4.set_color, GRAY), FadeIn(point5))
+ self.wait(2)
+
+ self.play(FadeOut(VGroup(*[helix, bnm1, point0, point1, point2, point3, point4, point5, helix_dot])))
--
cgit
From f97ad581d99f06f62389903c80ffdd6de982363b Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Thu, 25 Jun 2020 03:08:34 +0530
Subject: Create README.md
---
.../tnb-frame-and-serret-frenet-formulae/README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
new file mode 100644
index 0000000..34885b2
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/README.md
@@ -0,0 +1,2 @@
+**file2_tnb_frame_manim.py**
+![file2_tnb_frame_manim.py](https://github.com/saarthdeshpande/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.gif)
--
cgit
From c6468ed920ee42e9b9b712065ffea02d1a426837 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:31:59 +0530
Subject: Rename file5_f(x,y)=(y-x)(1-2x-3y).py to
file6_f(x,y)=(y-x)(1-2x-3y).py
---
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py | 29 ----------------------
.../Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).py | 29 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 29 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).py
(limited to 'FSF-2020')
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
deleted file mode 100644
index 41c3b61..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).py
+++ /dev/null
@@ -1,29 +0,0 @@
-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)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_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/file6_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 d26ae780a0b1f66c94ed8ffcf903cd23dc92846d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:32:50 +0530
Subject: Delete file5_f(x,y)=(y-x)(1-2x-3y).gif
---
.../Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif | Bin 1522415 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif
deleted file mode 100644
index 4bc92f8..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x,y)=(y-x)(1-2x-3y).gif and /dev/null differ
--
cgit
From 46c0d7092a97118b1268595236d74455e92bc550 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:35:36 +0530
Subject: Add files via upload
---
.../Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).gif | Bin 0 -> 1522415 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).gif
new file mode 100644
index 0000000..4bc92f8
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x,y)=(y-x)(1-2x-3y).gif differ
--
cgit
From f1dfbd78a5fea187577cc648f0d251c897a9c907 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:36:38 +0530
Subject: Delete file4_Types_of_critical_points.gif
---
.../file4_Types_of_critical_points.gif | Bin 3864765 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif
deleted file mode 100644
index 91e7084..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif and /dev/null differ
--
cgit
From cfba6959b00fab943e6d590a28bd57c24032d71e Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:37:33 +0530
Subject: Update and rename file4_Types_of_critical_points.py to
file4_Relative_Maxima_and_Relative_Minima.py
---
.../file4_Relative_Maxima_and_Relative_Minima.py | 51 ++++++++
.../file4_Types_of_critical_points.py | 134 ---------------------
2 files changed, 51 insertions(+), 134 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
new file mode 100644
index 0000000..7999527
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
@@ -0,0 +1,51 @@
+from manimlib.imports import*
+import math as m
+
+#---- locating extrema of a funtion using critical points
+class Extrema(ThreeDScene):
+ def construct(self):
+
+ h_text = TextMobject("Relative Maxima and Relative Minima",color = GREEN)
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- f(x,y) = 5(x+y)e^(-x^2-y^2)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 5*(u+v)*m.exp(-u**2-v**2)
+ ]),u_min = -PI, u_max = PI, v_min = -PI, v_max = PI).set_color(TEAL).shift([0,0,0]).fade(0.4)
+
+ d1 = Dot(color = YELLOW).shift([0.5,0.5,3.02]) #---- critical point for maxima
+ l1 = Line([0.5,0.5,0.1],[0.5,0.5,3],color = YELLOW)
+
+ d2 = Dot(color = YELLOW).shift([-1.15,0,-2.98]) #---- critical point for minima
+ l2 = Line([-1.15,0,0],[-1.15,0,-2.98],color = YELLOW)
+
+ max_text = TextMobject("Relative Maxima").shift(3.1*UP+1.5*RIGHT).scale(0.5)
+ min_text = TextMobject("Relative Minima").shift(3.1*DOWN+1.5*LEFT).scale(0.5)
+
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.set_camera_orientation(phi = 100*DEGREES, theta = -40*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.wait(1)
+ self.play(Write(l1),Write(d1))
+ self.add_fixed_in_frame_mobjects(max_text)
+ self.wait(1)
+ self.play(Write(l2),Write(d2))
+ self.add_fixed_in_frame_mobjects(min_text)
+ self.wait(1)
+ self.wait(1)
+ self.play(FadeOut(l1),FadeOut(d1),FadeOut(l2),FadeOut(d2),FadeOut(max_text),FadeOut(min_text))
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.wait(3)
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
deleted file mode 100644
index 656fb68..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.py
+++ /dev/null
@@ -1,134 +0,0 @@
-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 90aeb7ca1eb59ee91a49852045e4e3b1614a515f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:39:45 +0530
Subject: Create file5_Saddle_Point.py
---
.../Critical-Points/file5_Saddle_Point.py | 71 ++++++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.py
new file mode 100644
index 0000000..67dbb18
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.py
@@ -0,0 +1,71 @@
+from manimlib.imports import*
+import math as m
+
+#---- saddle point of a function
+class SaddlePoint(ThreeDScene):
+ def construct(self):
+
+ h_text = TextMobject("Saddle Point",color = GREEN)
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- 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 = [BLUE_B,BLUE_C,BLUE_D,BLUE_E]).shift([0,0,0]).scale(3)
+
+ #---- curve(trace) along y axis
+ curve_x = ParametricSurface(
+ lambda u, v: np.array([
+ u*0.1,
+ v,
+ v**2
+ ]),v_min = -1, v_max = 1, u_min = -0.2, u_max = 0.2).shift([0,0,-2]).scale(3.1).set_color("#800000").rotate(m.radians(180),UP)
+
+ x_text = TextMobject("A dip at critical point along x axis").scale(0.5).to_corner(UL)
+
+ #---- curve(trace) along x axis
+ curve_y = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v*0.1,
+ -u**2
+ ]),v_min = -0.2, v_max = 0.2, u_min = -1, u_max = 1).scale(3).shift([0.1,0,2.2]).set_color("#800000").rotate(m.radians(182),DOWN)
+
+ y_text = TextMobject("A peak at critical point along y axis").scale(0.5).to_corner(UL)
+
+ d = Dot(color = YELLOW).shift([0,-0.22,0]) #---- critical point(saddle point)
+
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.set_camera_orientation(phi = 75*DEGREES, theta = 40*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.wait(1)
+ self.move_camera(phi = 45*DEGREES, theta = 70*DEGREES)
+ self.add(curve_y)
+ self.play(Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(x_text)
+ self.wait(1)
+ self.wait(1)
+ self.play(FadeOut(curve_y),FadeOut(d),FadeOut(x_text))
+ self.wait(1)
+ self.move_camera(phi = 40*DEGREES, theta = 30*DEGREES)
+ self.add(curve_x)
+ self.play(Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(y_text)
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.wait(3)
+ self.play(FadeOut(curve_x),FadeOut(d),FadeOut(y_text))
+ self.wait(1)
--
cgit
From b8e7cacb5bc993e0e760486270c0314d85ec943d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:42:38 +0530
Subject: Add files via upload
---
.../file4_Relative_Maxima_and_Relative_Minima.gif | Bin 0 -> 1574608 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif
new file mode 100644
index 0000000..30cea35
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif differ
--
cgit
From 8e3006aadce5dfa840e0a45a94f569711daa8805 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:44:16 +0530
Subject: Add files via upload
---
.../Critical-Points/file5_Saddle_Point.gif | Bin 0 -> 7136893 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.gif
new file mode 100644
index 0000000..7300f3a
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.gif differ
--
cgit
From ca9d449b68c2393a58dcb090f664739a8282919f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 03:46:19 +0530
Subject: Update README.md
---
.../Critical-Points/README.md | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
(limited to 'FSF-2020')
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
index 5bd9cc5..6cf8f40 100644
--- 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
@@ -21,12 +21,18 @@
file4_Types_of_critical_points
-![file4_Types_of_critical_points](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Types_of_critical_points.gif?raw=true)
+![file4_Relative_Maxima_and_Relative_Minima](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif?raw=true)
-file5_f(x,y)=(y-x)(1-2x-3y)
+file5_Saddle_Point
-![file5_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
+![file5_Saddle_Point](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file5_Saddle_Point.gif?raw=true)
+
+
+
+file6_f(x,y)=(y-x)(1-2x-3y)
+
+![file6_f(x,y)=(y-x)(1-2x-3y)](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file6_f(x%2Cy)%3D(y-x)(1-2x-3y).gif?raw=true)
--
cgit
From 66e1207623862b92d68ccff098705194e05516de Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 23:32:46 +0530
Subject: Update and rename file3_Nondegenerate_Hessian_Matrix.py to
file2_Nondegenerate_Hessian_Matrix.py
---
.../file2_Nondegenerate_Hessian_Matrix.py | 158 +++++++++++++++++++++
.../file3_Nondegenerate_Hessian_Matrix.py | 145 -------------------
2 files changed, 158 insertions(+), 145 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.py
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..32c1559
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.py
@@ -0,0 +1,158 @@
+from manimlib.imports import*
+import math as m
+
+class Minima(ThreeDScene):
+ def construct(self):
+
+ heading = TextMobject("Nondegenerate Hessian Matrix",color = BLUE)
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ h_text = TextMobject("Case 1: $\\frac{\\partial^2 f}{\\partial x^2}>0$ and $\\frac{\\partial^2 f}{\\partial y^2}>0$").scale(1)
+
+ #---- determiniant of Hessian Matrix
+ hessian_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -0.5*m.exp(-u**2-v**2)
+ ]),u_min = -PI, u_max = PI, v_min = -PI, v_max =PI).set_color(TEAL).shift([0,0,0]).scale(1).fade(0.2)
+
+ det_text= TextMobject("$det \\hspace{1mm} H = (\\frac{\\partial^2 f}{\\partial x^2})(\\frac{\\partial^2 f}{\\partial y^2})-(\\frac{\\partial^2 f}{\\partial x \\partial y})^2 $").to_corner(UL).scale(0.7)
+
+ #---- function f(x,y)
+ f_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ u**2+v**2
+ ]),u_min = -1.3, u_max = 1.3, v_min = -1.3, v_max = 1.3).set_color(TEAL).shift([0,0,-0.5])
+
+ f_text= TextMobject("surface of the function").to_corner(UL).scale(0.8)
+
+ d = Dot(color = "#800000").shift([0,0,-0.52]) #---- critical point
+
+ self.set_camera_orientation(phi = 75*DEGREES, theta = 40*DEGREES)
+ self.add_fixed_in_frame_mobjects(heading)
+ self.wait(1)
+ self.play(FadeOut(heading))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(hessian_surface))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(det_text)
+ self.move_camera(phi = 90*DEGREES, theta= 60*DEGREES)
+ self.play(Write(d))
+ self.wait(1)
+ self.play(FadeOut(det_text),ReplacementTransform(hessian_surface,f_surface))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(1)
+ self.play(FadeOut(f_text),FadeOut(f_surface),FadeOut(axes),FadeOut(label_x),FadeOut(label_y),FadeOut(d))
+
+class Maxima(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ h_text = TextMobject("Case 2: $\\frac{\\partial^2 f}{\\partial x^2}<0$ and $\\frac{\\partial^2 f}{\\partial y^2}<0$").scale(1)
+
+ #---- determiniant of Hessian Matrix
+ hessian_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 0.5*m.exp(-u**2-v**2)
+ ]),u_min = -PI, u_max = PI, v_min = -PI, v_max =PI).set_color(TEAL).shift([0,0,0]).scale(1).fade(0.2)
+
+ det_text= TextMobject("$det \\hspace{1mm} H = (\\frac{\\partial^2 f}{\\partial x^2})(\\frac{\\partial^2 f}{\\partial y^2})-(\\frac{\\partial^2 f}{\\partial x \\partial y})^2 $").to_corner(UL).scale(0.7)
+
+ #---- function g(x,y)
+ g_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -u**2-v**2
+ ]),u_min = -1.3, u_max = 1.3, v_min = -1.3, v_max = 1.3).set_color(TEAL).shift([0,0,0.5])
+
+ g_text= TextMobject("surface of the function").to_corner(UL).scale(0.8)
+
+ d = Dot(color = "#800000").shift([0,0,0.5]) #---- critical point
+
+ self.set_camera_orientation(phi = 75*DEGREES, theta = 40*DEGREES)
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(hessian_surface))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(det_text)
+ self.play(Write(d))
+ self.wait(1)
+ self.play(FadeOut(det_text),ReplacementTransform(hessian_surface,g_surface))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(g_text)
+ self.wait(1)
+ self.play(FadeOut(g_text),FadeOut(g_surface),FadeOut(axes),FadeOut(label_x),FadeOut(label_y),FadeOut(d))
+
+class SaddlePoint(ThreeDScene):
+ def construct(self):
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ h_text = TextMobject("Case 3: $\\frac{\\partial^2 f}{\\partial x^2}$ and $\\frac{\\partial^2 f}{\\partial y^2}$ have opposite signs").scale(1)
+
+ #---- determiniant of Hessian Matrix
+ hessian_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ m.exp(0.5*u**2-0.5*v**2)
+ ]),u_min = -1.2, u_max = 1.2, v_min = -2.5, v_max = 2.5).set_color(TEAL).shift([0,0,-1]).scale(1).fade(0.2)
+
+ det_text= TextMobject("$det \\hspace{1mm} H = (\\frac{\\partial^2 f}{\\partial x^2})(\\frac{\\partial^2 f}{\\partial y^2})-(\\frac{\\partial^2 f}{\\partial x \\partial y})^2 $").to_corner(UL).scale(0.7)
+
+ #---- function p(x,y)
+ p_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).set_color(TEAL).shift([0,0,0]).scale(2)
+
+ p_text= TextMobject("surface of the function").to_corner(UL).scale(0.8)
+
+ d = Dot(color = "#800000").shift([0,0,0]) #---- critical point
+
+ self.set_camera_orientation(phi = 80*DEGREES, theta = 60*DEGREES)
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.wait(1)
+ self.play(Write(hessian_surface))
+ self.play(Write(d))
+ self.wait(1)
+ self.add_fixed_in_frame_mobjects(det_text)
+ self.wait(2)
+ self.play(FadeOut(det_text),ReplacementTransform(hessian_surface,p_surface))
+ self.add_fixed_in_frame_mobjects(p_text)
+ self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
deleted file mode 100644
index 3056842..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.py
+++ /dev/null
@@ -1,145 +0,0 @@
-from manimlib.imports import*
-
-class firstScene(Scene):
- def construct(self):
-
- e_text = TextMobject("Case 3: One positive and one negative eigenvalue", color = YELLOW).scale(1).shift(3*UP+1*LEFT)
- f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$").scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(1,0)$").scale(0.8).next_to(f_text).shift(DOWN+4*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(1,0)= \\begin{vmatrix} 2 \\space & 0\\space \\\\ 0 & -4 \\end{vmatrix} \\end{equation*}",color = GREEN).scale(0.9)
-
- t_text = TextMobject("$D_2 = -8<0$ (Saddle Point)", color = BLUE).scale(0.9).shift(2*DOWN)
-
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(2)
-
-class SaddlePoint(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- u**2-2*v**2-2*u
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[RED_C,PURPLE_D,YELLOW_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=35 * DEGREES,theta=80*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.4)
-
- f_text = TextMobject("$f(x,y) = x^2-2y^2-2x$",color = GREEN).shift(2*DOWN+2*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(3)
-
-
-class secondScene(Scene):
- def construct(self):
-
- h_text = TextMobject("NonDegenerate Hessian Matrix", color = GREEN).scale(1).shift(UP)
- e_text = TextMobject("Case 1: Two positive eigenvalues", color = PINK).scale(1).shift(3*UP+2*LEFT)
- f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = TEAL).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(0,0)$",color = TEAL).scale(0.8).next_to(f_text).shift(DOWN+4.5*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 4 \\space & -2\\space \\\\ -2 & 6 \\end{vmatrix} \\end{equation*}",color = PINK).scale(0.9)
-
- t_text = TextMobject("$D_2 = 20>0$ (Relative Maxima or Relative Minima)", color = YELLOW).scale(0.9).shift(1*DOWN)
- tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =4 >0$ (Relative Minima)", color = YELLOW).scale(0.9).shift(2*DOWN)
-
-
- self.play(ShowCreation(h_text))
- self.wait(1)
- self.play(FadeOut(h_text))
- self.wait(1)
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(1)
- self.play(ShowCreation(tm_text))
- self.wait(2)
- self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
-
-class Minima(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 2*u**2+3*v**2-2*v*u
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,YELLOW_D,GREEN_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=10 * DEGREES,theta=90*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.2)
-
- f_text = TextMobject("$f(x,y) = 2x^2+3y^2-2yx$",color = PURPLE).shift(2*DOWN+3*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(2)
-
-
-class thirdScene(Scene):
- def construct(self):
-
-
- e_text = TextMobject("Case 2: Two negative eigenvalues", color = RED).scale(1).shift(3*UP+2*LEFT)
- f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = BLUE).scale(0.8).next_to(e_text).shift(6*LEFT+DOWN)
- c_text = TextMobject("Critical Point: $(0,0)$",color = BLUE).scale(0.8).next_to(f_text).shift(DOWN+3.8*LEFT)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} -2 \\space & 0\\space \\\\ 0 & -8 \\end{vmatrix} \\end{equation*}",color = TEAL).scale(0.9)
-
- t_text = TextMobject("$D_2 = 16>0$ (Relative Maxima or Relative Minima)" ).scale(0.9).shift(1*DOWN)
- tm_text = TextMobject("$D_1 = \\frac{\\partial^2 f}{\\partial x^2} =-2 <0$ (Relative Maxima)").scale(0.9).shift(2*DOWN)
-
-
- self.play(ShowCreation(e_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(1)
- self.play(ShowCreation(tm_text))
- self.wait(2)
- self.play(FadeOut(e_text),FadeOut(f_text),FadeOut(c_text),FadeOut(d_text),FadeOut(t_text),FadeOut(tm_text))
-
-
-class Maxima(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -u**2-4*v**2
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[BLUE_C,PURPLE_D,TEAL_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=75 * DEGREES)
- self.begin_ambient_camera_rotation(rate=0.4)
-
- f_text = TextMobject("$f(x,y) = -x^2-4y^2$",color = YELLOW).shift(2*DOWN+3*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(1)
- self.move_camera(phi=30*DEGREES,theta=45*DEGREES,run_time=5)
- self.wait(2)
--
cgit
From 167452dd7e68203a39990f5af4ea99404078d958 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 23:33:12 +0530
Subject: Rename file2_Degenerate_Hessian_Matrix.py to
file3_Degenerate_Hessian_Matrix.py
---
.../file2_Degenerate_Hessian_Matrix.py | 52 ----------------------
.../file3_Degenerate_Hessian_Matrix.py | 52 ++++++++++++++++++++++
2 files changed, 52 insertions(+), 52 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
deleted file mode 100644
index c1e3516..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.py
+++ /dev/null
@@ -1,52 +0,0 @@
-from manimlib.imports import*
-
-class firstscene(Scene):
- def construct(self):
-
- h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
-
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
- c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
- m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
-
-
- t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
-
- self.play(ShowCreation(h_text))
- self.wait(1)
- self.play(FadeOut(h_text))
- self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
- self.wait(1)
- self.play(ShowCreation(m_text))
- self.wait(2)
- self.play(ReplacementTransform(m_text,d_text))
- self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(2)
-
-
-class SecondScene(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
-
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (2*u**3)+v**3
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.1)
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(2)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
new file mode 100644
index 0000000..c1e3516
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
@@ -0,0 +1,52 @@
+from manimlib.imports import*
+
+class firstscene(Scene):
+ def construct(self):
+
+ h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
+
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
+ c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
+ m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
+ d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
+
+
+ t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
+
+ self.play(ShowCreation(h_text))
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.play(ShowCreation(f_text))
+ self.wait(1)
+ self.play(ShowCreation(c_text))
+ self.wait(1)
+ self.play(ShowCreation(m_text))
+ self.wait(2)
+ self.play(ReplacementTransform(m_text,d_text))
+ self.wait(1)
+ self.play(ShowCreation(t_text))
+ self.wait(2)
+
+
+class SecondScene(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ f = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ (2*u**3)+v**3
+ ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
+ resolution=(20, 20)).scale(1)
+
+ self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.1)
+
+ f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
+ self.add_fixed_in_frame_mobjects(f_text)
+ self.add(axes)
+ self.play(Write(f))
+ self.wait(2)
--
cgit
From 1a08a9dcea173dcd180078a8032c2bb8853bcda2 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 23:33:25 +0530
Subject: Delete file2_Degenerate_Hessian_Matrix.gif
---
.../file2_Degenerate_Hessian_Matrix.gif | Bin 3202838 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif
deleted file mode 100644
index d49cdd5..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Degenerate_Hessian_Matrix.gif and /dev/null differ
--
cgit
From a9afb294a078ea365a1a42d714deb2a5bf5312f8 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Fri, 26 Jun 2020 23:34:19 +0530
Subject: Add files via upload
---
.../file2_Nondegenerate_Hessian_Matrix.gif | Bin 0 -> 2047897 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.gif
new file mode 100644
index 0000000..0d58b4f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.gif differ
--
cgit
From 2008bd765735cdef19a451940bfb6d0b3958c883 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:26:47 +0530
Subject: Update file3_Degenerate_Hessian_Matrix.py
---
.../file3_Degenerate_Hessian_Matrix.py | 83 ++++++++++++----------
1 file changed, 44 insertions(+), 39 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
index c1e3516..4f76daf 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
@@ -1,52 +1,57 @@
from manimlib.imports import*
-
-class firstscene(Scene):
+import math as m
+
+class DegenerateHessian(ThreeDScene):
def construct(self):
- h_text = TextMobject("Degenerate Hessian Matrix", color = RED).scale(1).shift(UP)
-
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$", color = TEAL).scale(1).to_corner(UL)
- c_text = TextMobject("Critical Point: $(0,0)$", color = TEAL).scale(1).next_to(f_text).shift(DOWN+4.3*LEFT)
- m_text = TextMobject("\\begin{equation*} D_2(x,y)= \\begin{vmatrix} 12x\\space & 0\\space \\\\ 0 & 6y \\end{vmatrix} \\end{equation*}",color = YELLOW)
- d_text = TextMobject("\\begin{equation*} D_2(0,0)= \\begin{vmatrix} 0 \\space & 0\\space \\\\ 0 & 0 \\end{vmatrix} \\end{equation*}",color = PURPLE)
+ heading = TextMobject("Degenerate Hessian Matrix",color = BLUE)
+ h_text = TextMobject("For $det \\hspace{1mm} H = 0$, the surface of the function at the critical point would be flat.").scale(0.7)
- t_text = TextMobject("$D_2 = 0$(Inconclusive)", color = TEAL).scale(1).shift(2*DOWN)
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
- self.play(ShowCreation(h_text))
+ #---- function f(x,y)
+ f_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -4*u**3-v**3
+ ]),u_min = -0.8, u_max = 0.8, v_min = -0.8, v_max = 0.8).set_color(TEAL).shift([0,1,0]).scale(1.3)
+
+ #---- function f(x,y)
+ zoom_surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ -4*u**3-v**3
+ ]),u_min = -0.8, u_max = 0.8, v_min = -0.8, v_max = 0.8).set_color(TEAL).shift([0,1,0]).scale(2.5)
+
+ f_text= TextMobject("surface of the function").to_corner(UL).scale(0.5)
+
+ d = Dot(color = "#800000").shift([0,1,0]) #---- critical point
+ d2 = Dot(color = "#800000").shift([0,0.7,0]) #---- critical point
+ plane = Rectangle(color = YELLOW,fill_opacity= 0.3).shift([0,0.6,0]).rotate(m.radians(90)).scale(0.4)
+
+ self.set_camera_orientation(phi = 70*DEGREES, theta = 45*DEGREES)
+ self.add_fixed_in_frame_mobjects(heading)
self.wait(1)
+ self.play(FadeOut(heading))
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(2)
self.play(FadeOut(h_text))
self.wait(1)
- self.play(ShowCreation(f_text))
- self.wait(1)
- self.play(ShowCreation(c_text))
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(f_surface))
+ self.add_fixed_in_frame_mobjects(f_text)
self.wait(1)
- self.play(ShowCreation(m_text))
+ self.play(Write(d))
+ self.wait(1)
+ self.play(ReplacementTransform(f_surface,zoom_surface),ReplacementTransform(d,d2))
self.wait(2)
- self.play(ReplacementTransform(m_text,d_text))
+ self.play(Write(plane))
self.wait(1)
- self.play(ShowCreation(t_text))
- self.wait(2)
-
-
-class SecondScene(ThreeDScene):
- def construct(self):
- axes = ThreeDAxes()
- f = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- (2*u**3)+v**3
- ]),v_min=-1,v_max=1,u_min=-1,u_max=1,checkerboard_colors=[TEAL_C,YELLOW_D,BLUE_E],
- resolution=(20, 20)).scale(1)
-
- self.set_camera_orientation(phi=25 * DEGREES,theta = 80*DEGREES)
- self.begin_ambient_camera_rotation(rate=0.1)
-
- f_text = TextMobject("$f(x,y) = 2x^3+y^3$",color = ORANGE).shift(2*DOWN+2*RIGHT).scale(0.8)
- self.add_fixed_in_frame_mobjects(f_text)
- self.add(axes)
- self.play(Write(f))
- self.wait(2)
--
cgit
From 4280330114ad16782a6b584c26adf78c1820d298 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:27:07 +0530
Subject: Update file3_Degenerate_Hessian_Matrix.py
---
.../The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py | 1 -
1 file changed, 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
index 4f76daf..732ef4f 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
@@ -54,4 +54,3 @@ class DegenerateHessian(ThreeDScene):
self.wait(2)
self.play(Write(plane))
self.wait(1)
-
--
cgit
From 38eac13cd8fc554d4bf10c5cc0a6c2dbfb31ca7b Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:27:47 +0530
Subject: Delete file3_Nondegenerate_Hessian_Matrix.gif
---
.../file3_Nondegenerate_Hessian_Matrix.gif | Bin 8724439 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif
deleted file mode 100644
index 2b0acb3..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Nondegenerate_Hessian_Matrix.gif and /dev/null differ
--
cgit
From 404ac6463e266bcb1cff33e7f85606a91496499d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:29:21 +0530
Subject: Add files via upload
---
.../file3_Degenerate_Hessian_Matrix.gif | Bin 0 -> 652724 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
new file mode 100644
index 0000000..36fd25c
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif differ
--
cgit
From a68eb145ac849444d222c3eaea619e7dfca9f410 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:50:19 +0530
Subject: Update and rename file4_Relative_Maxima_and_Relative_Minima.py to
file4_Relative_Maximum_and_Relative_Minimum.py
---
.../file4_Relative_Maxima_and_Relative_Minima.py | 51 ----------------------
.../file4_Relative_Maximum_and_Relative_Minimum.py | 51 ++++++++++++++++++++++
2 files changed, 51 insertions(+), 51 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.py
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
deleted file mode 100644
index 7999527..0000000
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.py
+++ /dev/null
@@ -1,51 +0,0 @@
-from manimlib.imports import*
-import math as m
-
-#---- locating extrema of a funtion using critical points
-class Extrema(ThreeDScene):
- def construct(self):
-
- h_text = TextMobject("Relative Maxima and Relative Minima",color = GREEN)
-
- axes = ThreeDAxes()
- label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
- label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
-
- #---- f(x,y) = 5(x+y)e^(-x^2-y^2)
- surface = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 5*(u+v)*m.exp(-u**2-v**2)
- ]),u_min = -PI, u_max = PI, v_min = -PI, v_max = PI).set_color(TEAL).shift([0,0,0]).fade(0.4)
-
- d1 = Dot(color = YELLOW).shift([0.5,0.5,3.02]) #---- critical point for maxima
- l1 = Line([0.5,0.5,0.1],[0.5,0.5,3],color = YELLOW)
-
- d2 = Dot(color = YELLOW).shift([-1.15,0,-2.98]) #---- critical point for minima
- l2 = Line([-1.15,0,0],[-1.15,0,-2.98],color = YELLOW)
-
- max_text = TextMobject("Relative Maxima").shift(3.1*UP+1.5*RIGHT).scale(0.5)
- min_text = TextMobject("Relative Minima").shift(3.1*DOWN+1.5*LEFT).scale(0.5)
-
- self.add_fixed_in_frame_mobjects(h_text)
- self.wait(1)
- self.wait(1)
- self.play(FadeOut(h_text))
- self.wait(1)
- self.set_camera_orientation(phi = 100*DEGREES, theta = -40*DEGREES)
- self.add(axes)
- self.add(label_x)
- self.add(label_y)
- self.play(Write(surface))
- self.wait(1)
- self.play(Write(l1),Write(d1))
- self.add_fixed_in_frame_mobjects(max_text)
- self.wait(1)
- self.play(Write(l2),Write(d2))
- self.add_fixed_in_frame_mobjects(min_text)
- self.wait(1)
- self.wait(1)
- self.play(FadeOut(l1),FadeOut(d1),FadeOut(l2),FadeOut(d2),FadeOut(max_text),FadeOut(min_text))
- self.begin_ambient_camera_rotation(rate = 0.3)
- self.wait(3)
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.py
new file mode 100644
index 0000000..3bd810d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.py
@@ -0,0 +1,51 @@
+from manimlib.imports import*
+import math as m
+
+#---- locating extrema of a funtion using critical points
+class Extrema(ThreeDScene):
+ def construct(self):
+
+ h_text = TextMobject("Relative Maximum and Relative Minimum",color = GREEN)
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.3,5.5,0]).rotate(-4.5) #---- y axis
+
+ #---- f(x,y) = 5(x+y)e^(-x^2-y^2)
+ surface = ParametricSurface(
+ lambda u, v: np.array([
+ u,
+ v,
+ 5*(u+v)*m.exp(-u**2-v**2)
+ ]),u_min = -PI, u_max = PI, v_min = -PI, v_max = PI).set_color(TEAL).shift([0,0,0]).fade(0.4)
+
+ d1 = Dot(color = YELLOW).shift([0.5,0.5,3.02]) #---- critical point for maxima
+ l1 = Line([0.5,0.5,0.1],[0.5,0.5,3],color = YELLOW)
+
+ d2 = Dot(color = YELLOW).shift([-1.15,0,-2.98]) #---- critical point for minima
+ l2 = Line([-1.15,0,0],[-1.15,0,-2.98],color = YELLOW)
+
+ max_text = TextMobject("Relative Maximum").shift(3.1*UP+1.5*RIGHT).scale(0.5)
+ min_text = TextMobject("Relative Minimum").shift(3.1*DOWN+1.5*LEFT).scale(0.5)
+
+ self.add_fixed_in_frame_mobjects(h_text)
+ self.wait(1)
+ self.wait(1)
+ self.play(FadeOut(h_text))
+ self.wait(1)
+ self.set_camera_orientation(phi = 100*DEGREES, theta = -40*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
+ self.play(Write(surface))
+ self.wait(1)
+ self.play(Write(l1),Write(d1))
+ self.add_fixed_in_frame_mobjects(max_text)
+ self.wait(1)
+ self.play(Write(l2),Write(d2))
+ self.add_fixed_in_frame_mobjects(min_text)
+ self.wait(1)
+ self.wait(1)
+ self.play(FadeOut(l1),FadeOut(d1),FadeOut(l2),FadeOut(d2),FadeOut(max_text),FadeOut(min_text))
+ self.begin_ambient_camera_rotation(rate = 0.3)
+ self.wait(3)
--
cgit
From ff66437567d0d7923d0e2291edba668aa05e7197 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:50:43 +0530
Subject: Delete file4_Relative_Maxima_and_Relative_Minima.gif
---
.../file4_Relative_Maxima_and_Relative_Minima.gif | Bin 1574608 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif
deleted file mode 100644
index 30cea35..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif and /dev/null differ
--
cgit
From 825d0d1b187d3d378869f8d77cfe1af5bd9c8a67 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:51:20 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Critical-Points/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
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
index 6cf8f40..83abfd3 100644
--- 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
@@ -19,9 +19,9 @@
-file4_Types_of_critical_points
+file4_Relative_Maximum_and_Relative_Minimum
-![file4_Relative_Maxima_and_Relative_Minima](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maxima_and_Relative_Minima.gif?raw=true)
+![file4_Relative_Maxima_and_Relative_Minima](?raw=true)
--
cgit
From 8ead1443c9c8f9eac9fa698e78c4dabfbac6c188 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:52:12 +0530
Subject: Add files via upload
---
.../file4_Relative_Maximum_and_Relative_Minimum.gif | Bin 0 -> 1587319 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.gif
new file mode 100644
index 0000000..6b93359
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.gif differ
--
cgit
From 9950f6e2906a69175c0474545ec489a952735920 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 02:54:14 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Critical-Points/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
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
index 83abfd3..857d298 100644
--- 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
@@ -21,7 +21,7 @@
file4_Relative_Maximum_and_Relative_Minimum
-![file4_Relative_Maxima_and_Relative_Minima](?raw=true)
+![file4_Relative_Maxima_and_Relative_Minima](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Critical-Points/file4_Relative_Maximum_and_Relative_Minimum.gif?raw=true)
--
cgit
From 84569f5fcc0195a488e055b5566225235d93011f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 03:03:52 +0530
Subject: Create README.md
---
.../The-Second-Derivative-Test/README.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
new file mode 100644
index 0000000..e9cc918
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
@@ -0,0 +1,21 @@
+SubTopic: The Second Derivative Test
+
+
+file1_Second_order_partial_derivatives
+
+![file1_Second_order_partial_derivatives](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file1_Second_order_partial_derivatives.gif?raw=true)
+
+
+
+file2_Nondegenerate_Hessian_Matrix
+
+![file2_Nondegenerate_Hessian_Matrix](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file2_Nondegenerate_Hessian_Matrix.gif?raw=true)
+
+
+
+file3_Degenerate_Hessian_Matrix
+
+![file3_Degenerate_Hessian_Matrix](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif?raw=true)
+
+
+
--
cgit
From 2fb88c2ae4a8218572ec276e80d80c3cdadd5fbb Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:44:01 +0530
Subject: Update file3_Degenerate_Hessian_Matrix.py
---
.../file3_Degenerate_Hessian_Matrix.py | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
index 732ef4f..9310553 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.py
@@ -17,22 +17,13 @@ class DegenerateHessian(ThreeDScene):
lambda u, v: np.array([
u,
v,
- -4*u**3-v**3
- ]),u_min = -0.8, u_max = 0.8, v_min = -0.8, v_max = 0.8).set_color(TEAL).shift([0,1,0]).scale(1.3)
-
- #---- function f(x,y)
- zoom_surface = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -4*u**3-v**3
- ]),u_min = -0.8, u_max = 0.8, v_min = -0.8, v_max = 0.8).set_color(TEAL).shift([0,1,0]).scale(2.5)
+ -u**4-v**4
+ ]),u_min = -0.8, u_max = 0.8, v_min = -0.8, v_max = 0.8).set_color(TEAL).shift([0,0,-0.5]).scale(2)
f_text= TextMobject("surface of the function").to_corner(UL).scale(0.5)
- d = Dot(color = "#800000").shift([0,1,0]) #---- critical point
- d2 = Dot(color = "#800000").shift([0,0.7,0]) #---- critical point
- plane = Rectangle(color = YELLOW,fill_opacity= 0.3).shift([0,0.6,0]).rotate(m.radians(90)).scale(0.4)
+ d = Dot(color = "#800000").shift([0,0,-0.5]) #---- critical point
+ plane = Square(color = YELLOW,fill_opacity= 0.2).shift([0,0,-0.5]).scale(1.3)
self.set_camera_orientation(phi = 70*DEGREES, theta = 45*DEGREES)
self.add_fixed_in_frame_mobjects(heading)
@@ -49,8 +40,6 @@ class DegenerateHessian(ThreeDScene):
self.add_fixed_in_frame_mobjects(f_text)
self.wait(1)
self.play(Write(d))
- self.wait(1)
- self.play(ReplacementTransform(f_surface,zoom_surface),ReplacementTransform(d,d2))
- self.wait(2)
+ self.wait(1)
self.play(Write(plane))
self.wait(1)
--
cgit
From 7d8096521d44ae96be2aac0d8c87b3eb55948185 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:45:05 +0530
Subject: Delete file4_Contour_Diagram.gif
---
.../file4_Contour_Diagram.gif | Bin 1150777 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
deleted file mode 100644
index 129fedc..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif and /dev/null differ
--
cgit
From 5520bb3fa19ef395385c52a78cac00c286e0be6a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:45:26 +0530
Subject: Update README.md
---
.../The-Second-Derivative-Test/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
index e9cc918..daf49f2 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
@@ -15,7 +15,7 @@
file3_Degenerate_Hessian_Matrix
-![file3_Degenerate_Hessian_Matrix](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif?raw=true)
+![file3_Degenerate_Hessian_Matrix](?raw=true)
--
cgit
From 03b84adf2345c2dc1cc63eaa29021b9a7ff024be Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:46:36 +0530
Subject: Delete file3_Degenerate_Hessian_Matrix.gif
---
.../file3_Degenerate_Hessian_Matrix.gif | Bin 652724 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
deleted file mode 100644
index 36fd25c..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif and /dev/null differ
--
cgit
From 1d4cf4cda4dc6c778c8339532e8baad5badfd9f1 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:47:28 +0530
Subject: Add files via upload
---
.../file3_Degenerate_Hessian_Matrix.gif | Bin 0 -> 407350 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif
new file mode 100644
index 0000000..5aae300
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif differ
--
cgit
From 8b578d7993f33115aaa3259be85ed87ab71466cb Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sat, 27 Jun 2020 19:48:48 +0530
Subject: Update README.md
---
.../The-Second-Derivative-Test/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
index daf49f2..e9cc918 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
@@ -15,7 +15,7 @@
file3_Degenerate_Hessian_Matrix
-![file3_Degenerate_Hessian_Matrix](?raw=true)
+![file3_Degenerate_Hessian_Matrix](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file3_Degenerate_Hessian_Matrix.gif?raw=true)
--
cgit
From c53b6cd7e1a10b0e5c4f12801412646fd17569c8 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sun, 28 Jun 2020 02:05:21 +0530
Subject: Add files via upload
---
.../file4_Contour_Diagram.gif | Bin 0 -> 1140109 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif
new file mode 100644
index 0000000..41068e2
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif differ
--
cgit
From 7650a4ad8777a8a979c4899c1e0d852bd5111be8 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Sun, 28 Jun 2020 02:06:42 +0530
Subject: Update README.md
---
.../The-Second-Derivative-Test/README.md | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
index e9cc918..96b32bf 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/README.md
@@ -19,3 +19,9 @@
+file4_Contour_Diagram
+
+![file4_Contour_Diagram](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/The-Second-Derivative-Test/file4_Contour_Diagram.gif?raw=true)
+
+
+
--
cgit
From f78f8e6889c00cc3d9ec4e0094fb8417cdf74240 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 00:42:54 +0530
Subject: Delete file1_Extrema_over_g(x,y)=k.gif
---
.../file1_Extrema_over_g(x,y)=k.gif | Bin 499796 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
deleted file mode 100644
index 1e1782e..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif and /dev/null differ
--
cgit
From a4c28a866815b0b2687e3baf2d1dbc96a7039324 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 00:43:56 +0530
Subject: Update file1_Extrema_over_g(x,y)=k.py
---
.../Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
index 17f31ac..17ba858 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
@@ -1,14 +1,18 @@
from manimlib.imports import*
+import math as m
class firstScene(ThreeDScene):
def construct(self):
- axes = ThreeDAxes()
+ axes = ThreeDAxes().fade(0.4)
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
surface = ParametricSurface(
lambda u, v: np.array([
u,
v,
u**2+v**2+u**3-v**3
- ]),u_min=-0.5,u_max=0.5, v_min=-0.5,v_max=0.5).scale(5).shift([0,1,2.5]).set_color('#F0FFFF').fade(0.4)
+ ]),u_min=-0.5,u_max=0.5, v_min=-0.5,v_max=0.5).scale(5).shift([0,1,2.5]).set_color(TEAL).fade(0.4)
c = Circle().set_color('#FF00FF').shift([-0.4,0,1.5]).rotate(1.9,UP).scale(0.7)
@@ -26,10 +30,11 @@ class firstScene(ThreeDScene):
max_text = TextMobject("maximum over $g(x,y)=k$",color = '#FFA074').shift([-1.7,0,0]).scale(0.5).shift(2.2*UP)
min_text = TextMobject("minimum over $g(x,y)=k$",color = '#FFA074').shift([2.5,0.5,1]).scale(0.5).shift(0.5*UP)
label_f = TextMobject("$z=f(x,y)$",color = '#8A2BE2').scale(0.5).shift(3*UP+3*RIGHT)
- label_g = TextMobject("$g(x,y)=k$",color = '#8A2BE2').scale(0.5).shift(2*RIGHT)
-
+ label_g = TextMobject("$g(x,y)=k$",color = '#8A2BE2').scale(0.5).shift(2*RIGHT)
self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.set_camera_orientation(phi=75*DEGREES,theta=45*DEGREES)
self.play(Write(surface))
self.add_fixed_in_frame_mobjects(label_f)
@@ -49,5 +54,3 @@ class firstScene(ThreeDScene):
self.play(Write(maxima_refl))
self.play(Write(minima_refl))
self.wait(1)
-
-
--
cgit
From 838dfb6f044db8a1ec2b0bfeb191632cfd60054f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 00:51:08 +0530
Subject: Add files via upload
---
.../file1_Extrema_over_g(x,y)=k.gif | Bin 0 -> 595677 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif
new file mode 100644
index 0000000..9d64d50
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.gif differ
--
cgit
From 076b497787e65f119430837acf8d8b812c82003c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 00:57:02 +0530
Subject: Update file1_Extrema_over_g(x,y)=k.py
---
.../Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
index 17ba858..da17aac 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file1_Extrema_over_g(x,y)=k.py
@@ -1,7 +1,8 @@
from manimlib.imports import*
import math as m
-class firstScene(ThreeDScene):
+#---- optimizing funtion f(x,y) w.r.t to g(x,y)
+class ConstrainedExtrema(ThreeDScene):
def construct(self):
axes = ThreeDAxes().fade(0.4)
label_x = TextMobject("$x$").shift([5.5,-0.5,0]).fade(0.4) #---- x axis
--
cgit
From 7638fde966190d0cdd22d763767df7551ccd980d Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 16:05:43 +0530
Subject: Delete file2_Geometric_Proof.gif
---
.../Lagrange-Multipliers/file2_Geometric_Proof.gif | Bin 419262 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif
deleted file mode 100644
index b22afb3..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.gif and /dev/null differ
--
cgit
From 85875270cfe25fe3e5b666fe45a76eece2419452 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Mon, 29 Jun 2020 16:15:49 +0530
Subject: Update file2_Geometric_Proof.py
---
.../Lagrange-Multipliers/file2_Geometric_Proof.py | 48 ++++++++++++++++------
1 file changed, 35 insertions(+), 13 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
index 4374ff7..2c2a9de 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Lagrange-Multipliers/file2_Geometric_Proof.py
@@ -1,8 +1,12 @@
from manimlib.imports import*
-class firstScene(ThreeDScene):
+#---- visualization of geometric proof of Lagrange multiplier
+class GeometricProof(ThreeDScene):
def construct(self):
- axes = ThreeDAxes().scale(0.7).rotate(math.radians(180))
+ axes = ThreeDAxes().scale(0.7).rotate(math.radians(180))
+ label_x = TextMobject("$x$").shift(4*RIGHT).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift(3.2*DOWN+0.2*RIGHT).rotate(math.radians(180)).fade(0.4) #---- y axis
+
surface = ParametricSurface(
lambda u, v: np.array([
1*np.sin(u)*np.cos(v),
@@ -11,15 +15,16 @@ class firstScene(ThreeDScene):
]),u_min=0,u_max=PI/2,v_min=0,v_max=2*PI,checkerboard_colors=[GREEN_C, GREEN_E]).scale(1).shift([-1.5,-1.5,0])
d = Dot([-2,-2.55,0],color = '#800000')
- a_df = Arrow(color = '#00FFFF').rotate(-2).shift(3.2*DOWN+2.3*LEFT) #---- f parallel to g
- a_dg = Arrow(color = '#FF00FF').scale(0.8).shift(3.2*DOWN+2.3*LEFT).rotate(-2) #---- f parallel to g
+ a_df = Arrow(color = '#00FFFF').rotate(-2).shift(3.2*DOWN+2.3*LEFT) #---- f parallel to g at maxima
+ a_dg = Arrow(color = '#FF00FF').scale(0.8).shift(3.2*DOWN+2.3*LEFT).rotate(-2) #---- g parallel to f at maxima
- b_df = Arrow(color = '#00FFFF').rotate(1.1).shift(0.82*LEFT+0.15*UP) #---- f parallel to g
- b_dg = Arrow(color = '#FF00FF').scale(0.6).rotate(-2).shift(1.43*LEFT+1.1*DOWN) #---- f parallel to g
+ b_dg = Arrow(color = '#00FFFF').rotate(1.1).shift(0.82*LEFT+0.15*UP) #---- g parallel to f at minima
+ b_df = Arrow(color = '#FF00FF').scale(0.6).rotate(-2).shift(1.43*LEFT+1.1*DOWN) #---- f parallel to g at minima
qd = Dot(color = '#800000').shift(1.2*LEFT+0.6*DOWN)
+ #---- level curves
l1 = Line([-1,-3.1,0],[-4,-3.1,0],color = PINK).rotate(-0.3).fade(0.6)
l2 = Line([-0.9,-2.9,0],[-4,-2.9,0],color = PINK).rotate(-0.3).fade(0.6)
l3= Line([-0.8,-2.7,0],[-4,-2.7,0],color = PINK).rotate(-0.3).fade(0.6)
@@ -36,19 +41,36 @@ class firstScene(ThreeDScene):
l14= Line([-0,-0.35,0],[-4,-0.35,0],color = PINK).rotate(-0.3).fade(0.6)
l15= Line([-0.,-0.15,0],[-4,-0.15,0],color = PINK).rotate(-0.3).fade(0.6)
- level_Curve = VGroup(l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15)
-
rel_text = TextMobject("$\\nabla f = \\lambda \\nabla g$",color = TEAL).shift([3,3.2,0]).scale(0.5)
f_text = TextMobject("$\\nabla f$",color = '#800000').shift([1,1,0]).scale(0.5)
g_text = TextMobject("$\\nabla g$").shift([1.2,-0.8,0]).scale(0.5)
p_text= TextMobject("$P$").shift([1.8,2.6,0]).scale(0.5)
-
-
- self.add(axes)
+ #---- labelling of level curves
+ l1_text = TextMobject("$w=$ 17").rotate(math.radians(180)).scale(0.4).shift(2.7*DOWN+4.36*LEFT)
+ l2_text = TextMobject("$w=$ 16").rotate(math.radians(180)).scale(0.4).shift(2.46*DOWN+4.36*LEFT)
+ l3_text = TextMobject("$w=$ 15").rotate(math.radians(180)).scale(0.4).shift(2.2*DOWN+4.36*LEFT)
+ l4_text = TextMobject("$w=$ 14").rotate(math.radians(180)).scale(0.4).shift(1.97*DOWN+4.36*LEFT)
+ l5_text = TextMobject("$w=$ 13").rotate(math.radians(180)).scale(0.4).shift(1.74*DOWN+4.36*LEFT)
+ l6_text = TextMobject("$w=$ 12").rotate(math.radians(180)).scale(0.4).shift(1.5*DOWN+4.36*LEFT)
+ l7_text = TextMobject("$w=$ 11").rotate(math.radians(180)).scale(0.4).shift(1.26*DOWN+4.36*LEFT)
+ l8_text = TextMobject("$w=$ 10").rotate(math.radians(180)).scale(0.4).shift(1.05*DOWN+4.36*LEFT)
+ l9_text = TextMobject("$w=$ 9").rotate(math.radians(180)).scale(0.4).shift(0.8*DOWN+4.32*LEFT)
+ l10_text = TextMobject("$w=$ 8").rotate(math.radians(180)).scale(0.4).shift(0.6*DOWN+4.32*LEFT)
+ l11_text = TextMobject("$w=$ 7").rotate(math.radians(180)).scale(0.4).shift(0.4*DOWN+4.32*LEFT)
+ l12_text = TextMobject("$w=$ 6").rotate(math.radians(180)).scale(0.4).shift(0.2*DOWN+4.32*LEFT)
+ l13_text = TextMobject("$w=$ 5").rotate(math.radians(180)).scale(0.4).shift(-0.02*DOWN+4.32*LEFT)
+ l14_text = TextMobject("$w=$ 4").rotate(math.radians(180)).scale(0.4).shift(-0.23*DOWN+4.32*LEFT)
+ l15_text = TextMobject("$w=$ 3").rotate(math.radians(180)).scale(0.4).shift(-0.44*DOWN+4.32*LEFT)
+
+ level_Curve = VGroup(l1,l1_text,l2,l2_text,l3,l3_text,l4,l4_text,l5,l5_text,l6,l6_text,l7,l7_text,l8,l8_text,l9,l9_text,l10,l10_text,l11,l11_text,l12,l12_text,l13,l13_text,l14,l14_text,l15,l15_text)
+
self.set_camera_orientation(phi=0 * DEGREES, theta = 90*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.play(Write(surface))
self.wait(1)
self.play(ShowCreation(level_Curve))
@@ -61,8 +83,8 @@ class firstScene(ThreeDScene):
self.play(Write(qd))
self.wait(1)
self.play(ShowCreation(b_df))
- self.play(ShowCreation(b_dg))
- self.wait(1)
self.add_fixed_in_frame_mobjects(f_text)
+ self.wait(1)
+ self.play(ShowCreation(b_dg))
self.add_fixed_in_frame_mobjects(g_text)
self.wait(1)
--
cgit
From 2fc0bbf646c2aaf31d3e1f578a6427012b4a214e Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:39:05 +0530
Subject: Delete file1_Visualization_of_dz.gif
---
.../Total-Differential/file1_Visualization_of_dz.gif | Bin 558983 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
deleted file mode 100644
index e00a946..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif and /dev/null differ
--
cgit
From 1d775364041157dbe2db000676ec2e185c0ccb84 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:42:21 +0530
Subject: Update file1_Visualization_of_dz.py
---
.../file1_Visualization_of_dz.py | 80 ++++++++++++++--------
1 file changed, 52 insertions(+), 28 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
index a097a96..2a1a750 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
@@ -1,53 +1,77 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
-
+#---- visualization of the differential dz between two points on the surface of the function
+class differentialdz(ThreeDScene):
def construct(self):
-
- axes = ThreeDAxes().rotate(1.571)
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
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).set_color("#FF69B4").fade(0.6).scale(2).shift(3*UP+1*LEFT)
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").shift([0,2.5,0.3]).scale(1.2) #----surface z = f(x,y)
+
- d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP)
- d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP)
+
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9) #---- x-y plane
+
+ d = Dot([1,2,1],color = '#9400D3').rotate(1.571,UP) #---- point on the surface
+ d2 = Dot([2,2.9,1],color = '#9400D3').rotate(1.571,UP) #---- point on the surface
p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
- p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.9*UP)
+ p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.4*UP)
- l = DashedLine(color = '#800000').rotate(1.571,UP).scale(1).shift(1.7*UP+1.6*RIGHT)
- l2 = DashedLine(color = '#800000').rotate(1.571,UP).scale(0.8).shift(2.26*UP+1.2*RIGHT)
- l_text = TextMobject("$(x_1,y_1)$",color = '#ADFF2F').scale(0.6).shift(2*RIGHT+1.6*DOWN)
- l2_text = TextMobject("$(x_2,y_2)$",color = '#ADFF2F').scale(0.6).shift(2.7*RIGHT+1.2*DOWN)
+ l1 = DashedLine(color = '#00BFFF').scale(1.6).shift(3.5*UP+3.25*LEFT).rotate(1.571)
+ l2 = DashedLine(color = '#00BFFF').scale(1).shift(4*UP+2*LEFT).rotate(1.571)
- a = Arrow(color = '#FFFACD').scale(0.7).rotate(1.38,RIGHT).shift(2.5*LEFT+3.1*UP)
+ label_dz= TextMobject("$dz$").scale(0.4).shift(5.3*RIGHT+0.4*UP)
- a_text = TextMobject("$dz$",color='#800000').scale(0.5).shift(2.3*RIGHT+0.5*UP)
- plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(1*RIGHT+3*UP).fade(0.9)
+ l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.2)
+ l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.2)
- label = TextMobject("$z = f(x,y)$").scale(0.6).shift(3.5*RIGHT+1.8*UP)
-
+ line_y1 = DashedLine(color = '#00BFFF').scale(1.3).shift(0.82*UP+3.25*RIGHT).rotate(1.571)
+ line_y2 = DashedLine(color = '#00BFFF').scale(1.7).shift(1.2*UP+2.8*RIGHT).rotate(1.571)
+
+ label_dy= TextMobject("$dy$").scale(0.6).shift(3*RIGHT+0.8*DOWN).rotate(math.radians(90))
+
+ line_x1 = DashedLine(color = '#00BFFF').scale(1.5).shift(2.2*UP+1.6*RIGHT).rotate(1.571,RIGHT)
+ line_x2 = DashedLine(color = '#00BFFF').scale(1.2).shift(2.9*UP+1.6*RIGHT).rotate(1.571,RIGHT)
+
+ label_dx= TextMobject("$dx$").scale(0.4).shift(-0.4*UP+2.5*RIGHT)
+
+ label = TextMobject("$f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
+
+
+ self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
self.add(axes)
- self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
- self.wait(1)
+ self.add(label_x)
+ self.add(label_y)
self.play(Write(plane))
- self.play(Write(surface))
+ self.play(Write(surface))
self.add_fixed_in_frame_mobjects(label)
self.wait(1)
- self.play(ShowCreation(l),ShowCreation(l2),Write(d),Write(d2))
- self.wait(1)
+ self.play(Write(d),Write(d2))
self.add_fixed_in_frame_mobjects(p1)
self.add_fixed_in_frame_mobjects(p2)
self.wait(1)
- self.add_fixed_in_frame_mobjects(l_text)
- self.add_fixed_in_frame_mobjects(l2_text)
- self.play(ShowCreation(a))
+ self.play(Write(l1))
+ self.play(Write(l2))
+ self.add_fixed_in_frame_mobjects(label_dz)
+ self.wait(1)
+ self.play(Write(l3))
+ self.play(Write(l4))
+ self.wait(1)
+ self.play(Write(line_y1))
+ self.play(Write(line_y2))
+ self.play(ShowCreation(label_dy))
+ self.wait(1)
+ self.play(Write(line_x1))
+ self.play(Write(line_x2))
+ self.add_fixed_in_frame_mobjects(label_dx)
self.wait(1)
- self.add_fixed_in_frame_mobjects(a_text)
- self.wait(2)
--
cgit
From ab75cfbbfbf634b6f06f7687d8defc9ab35038b1 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:43:20 +0530
Subject: Delete file2_Differentials.gif
---
.../Total-Differential/file2_Differentials.gif | Bin 576535 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
deleted file mode 100644
index 620b49e..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif and /dev/null differ
--
cgit
From 29fdeb06d1c7c7eaf740332dbcc28e33a98bc7f8 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:45:13 +0530
Subject: Delete file3_Total_differential_of_z.gif
---
.../file3_Total_differential_of_z.gif | Bin 732678 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
deleted file mode 100644
index 5aae2a1..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif and /dev/null differ
--
cgit
From 8fcc588bd40a5d8ea4daa24d9b4056598df5c96a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:46:16 +0530
Subject: Add files via upload
---
.../Total-Differential/file1_Visualization_of_dz.gif | Bin 0 -> 565199 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif
new file mode 100644
index 0000000..2e148af
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif differ
--
cgit
From 042395420527585b7880fc2690d236d607c3467f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:50:51 +0530
Subject: Update file1_Visualization_of_dz.py
---
.../file1_Visualization_of_dz.py | 80 +++++++++-------------
1 file changed, 31 insertions(+), 49 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
index 2a1a750..1fdd0b9 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
@@ -1,77 +1,59 @@
from manimlib.imports import*
-#---- visualization of the differential dz between two points on the surface of the function
-class differentialdz(ThreeDScene):
+#---- visualization of total differential dz between two points lying on the surface of the function
+class differentialdz(ThreeDScene):
+
def construct(self):
-
- axes = ThreeDAxes()
- label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]).fade(0.4) #---- x axis
label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
-
+
+ #---- surface of the funtion f(x,y)
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).set_color("#FF69B4").shift([0,2.5,0.3]).scale(1.2) #----surface z = f(x,y)
-
+ ]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").fade(0.6).scale(2).shift(3*UP+1*LEFT)
-
- plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9) #---- x-y plane
-
- d = Dot([1,2,1],color = '#9400D3').rotate(1.571,UP) #---- point on the surface
- d2 = Dot([2,2.9,1],color = '#9400D3').rotate(1.571,UP) #---- point on the surface
+ d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
+ d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
- p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.4*UP)
-
-
- l1 = DashedLine(color = '#00BFFF').scale(1.6).shift(3.5*UP+3.25*LEFT).rotate(1.571)
- l2 = DashedLine(color = '#00BFFF').scale(1).shift(4*UP+2*LEFT).rotate(1.571)
+ p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.9*UP)
- label_dz= TextMobject("$dz$").scale(0.4).shift(5.3*RIGHT+0.4*UP)
+ l = DashedLine(color = '#800000').rotate(1.571,UP).scale(1).shift(1.7*UP+1.6*RIGHT)
+ l2 = DashedLine(color = '#800000').rotate(1.571,UP).scale(0.8).shift(2.26*UP+1.2*RIGHT)
+ l_text = TextMobject("$(x_1,y_1)$",color = '#ADFF2F').scale(0.6).shift(2*RIGHT+1.6*DOWN)
+ l2_text = TextMobject("$(x_2,y_2)$",color = '#ADFF2F').scale(0.6).shift(2.7*RIGHT+1.2*DOWN)
- l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.2)
- l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.2)
+ a = Arrow(color = '#FFFACD').scale(0.7).rotate(1.38,RIGHT).shift(2.5*LEFT+3.1*UP)
- line_y1 = DashedLine(color = '#00BFFF').scale(1.3).shift(0.82*UP+3.25*RIGHT).rotate(1.571)
- line_y2 = DashedLine(color = '#00BFFF').scale(1.7).shift(1.2*UP+2.8*RIGHT).rotate(1.571)
+ a_text = TextMobject("$dz$",color='#800000').scale(0.5).shift(2.3*RIGHT+0.5*UP)
- label_dy= TextMobject("$dy$").scale(0.6).shift(3*RIGHT+0.8*DOWN).rotate(math.radians(90))
+ plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(1*RIGHT+3*UP).fade(0.9)
- line_x1 = DashedLine(color = '#00BFFF').scale(1.5).shift(2.2*UP+1.6*RIGHT).rotate(1.571,RIGHT)
- line_x2 = DashedLine(color = '#00BFFF').scale(1.2).shift(2.9*UP+1.6*RIGHT).rotate(1.571,RIGHT)
-
- label_dx= TextMobject("$dx$").scale(0.4).shift(-0.4*UP+2.5*RIGHT)
-
- label = TextMobject("$f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
-
-
- self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
+ label = TextMobject("$z = f(x,y)$").scale(0.6).shift(3.5*RIGHT+1.8*UP)
+
+ self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
self.add(axes)
self.add(label_x)
self.add(label_y)
+ self.wait(1)
self.play(Write(plane))
- self.play(Write(surface))
+ self.play(Write(surface))
self.add_fixed_in_frame_mobjects(label)
self.wait(1)
- self.play(Write(d),Write(d2))
+ self.play(ShowCreation(l),ShowCreation(l2),Write(d),Write(d2))
+ self.wait(1)
self.add_fixed_in_frame_mobjects(p1)
self.add_fixed_in_frame_mobjects(p2)
self.wait(1)
- self.play(Write(l1))
- self.play(Write(l2))
- self.add_fixed_in_frame_mobjects(label_dz)
- self.wait(1)
- self.play(Write(l3))
- self.play(Write(l4))
- self.wait(1)
- self.play(Write(line_y1))
- self.play(Write(line_y2))
- self.play(ShowCreation(label_dy))
- self.wait(1)
- self.play(Write(line_x1))
- self.play(Write(line_x2))
- self.add_fixed_in_frame_mobjects(label_dx)
+ self.add_fixed_in_frame_mobjects(l_text)
+ self.add_fixed_in_frame_mobjects(l2_text)
+ self.play(ShowCreation(a))
self.wait(1)
+ self.add_fixed_in_frame_mobjects(a_text)
+ self.wait(2)
--
cgit
From 50e24a7c48bb2ce318b66d8690776258f54224fe Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:52:47 +0530
Subject: Update file2_Differentials.py
---
.../Total-Differential/file2_Differentials.py | 31 +++++++++++++---------
1 file changed, 18 insertions(+), 13 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
index b40be70..1025210 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.py
@@ -1,16 +1,21 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
-
+#---- visualization of the differentials along the axes
+class differentials(ThreeDScene):
def construct(self):
- axes = ThreeDAxes()
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
- s = Rectangle(color = '#00FF7F',fill_opacity=0.3).shift(2.3*UP+3.9*LEFT).scale(1).rotate(0.2,UP) #----surface z = f(x,y)
+ 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).set_color("#FF69B4").shift([0,2.5,0.3]).scale(1.2) #----surface z = f(x,y)
- label_y = TextMobject("$y$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
- label_x = TextMobject("$x$").shift(-0.1*UP+5.6*RIGHT).scale(0.5)
+
plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
@@ -27,8 +32,8 @@ class firstScene(ThreeDScene):
label_dz= TextMobject("$dz$").scale(0.4).shift(5.3*RIGHT+0.4*UP)
- l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.7)
- l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.7)
+ l3 = Line(color = '#FFDAB9').scale(0.8).shift(1.95*UP+0.7*RIGHT).rotate(1.571,DOWN).fade(0.2)
+ l4 = Line(color = '#FFDAB9').scale(0.6).shift(2.86*UP+0.9*RIGHT).rotate(1.571,DOWN).fade(0.2)
line_y1 = DashedLine(color = '#00BFFF').scale(1.3).shift(0.82*UP+3.25*RIGHT).rotate(1.571)
line_y2 = DashedLine(color = '#00BFFF').scale(1.7).shift(1.2*UP+2.8*RIGHT).rotate(1.571)
@@ -43,12 +48,12 @@ class firstScene(ThreeDScene):
label = TextMobject("$f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.play(Write(plane))
- self.play(ShowCreation(label_y))
- self.add_fixed_in_frame_mobjects(label_x)
- self.play(Write(s))
+ self.play(Write(surface))
self.add_fixed_in_frame_mobjects(label)
self.wait(1)
self.play(Write(d),Write(d2))
--
cgit
From 6f6d931675d33a7a6e2b70c929f644d154dce847 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:55:01 +0530
Subject: Add files via upload
---
.../Total-Differential/file2_Differentials.gif | Bin 0 -> 725835 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
new file mode 100644
index 0000000..29207e3
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif differ
--
cgit
From 8f060d75dd518f8d2c235837962daa67e45e40d7 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 00:55:57 +0530
Subject: Add files via upload
---
.../file3_Total_differential_of_z.gif | Bin 0 -> 1444924 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif
new file mode 100644
index 0000000..a54d2da
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif differ
--
cgit
From 3a42ab7ee6ebce1ad7c97b4f466ce26d11c0506c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:02:18 +0530
Subject: Create README.md
---
.../Total-Differential/README.md | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
new file mode 100644
index 0000000..51768b6
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -0,0 +1,32 @@
+SubTopic: Total Differential
+
+
+file1_Visualization_of_dz
+
+![file1_Visualization_of_dz](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.gif?raw=true)
+
+
+
+file2_Differentials
+
+![file2_Differentials](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif?raw=true)
+
+
+
+file3_Total_differential_of_z
+
+![file3_Total_differential_of_z](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.gif?raw=true)
+
+
+
+file4_total_differential_change
+
+![file4_total_differential_change](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file4_total_differential_change.gif?raw=true)
+
+
+
+file5_Total_differential_approximation
+
+![file5_Total_differential_approximation](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif?raw=true)
+
+
--
cgit
From 2c18d3645c579576f7cc5caf2a0989d8a35510d6 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:14:41 +0530
Subject: Update file5_Total_differential_approximation.py
---
.../file5_Total_differential_approximation.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
index 83017ed..e7b39bb 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.py
@@ -1,11 +1,14 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
+#---- approximation value of function between two points using total differentials
+class approximation(ThreeDScene):
def construct(self):
- axes = ThreeDAxes().rotate(1.571)
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.3,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
surface = ParametricSurface(
lambda u, v: np.array([
np.sin(u),
@@ -29,9 +32,10 @@ class firstScene(ThreeDScene):
label = TextMobject("$z = f(x,y)$").scale(0.6).shift(4*RIGHT+3*UP)
-
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.wait(1)
self.play(Write(plane))
self.wait(1)
--
cgit
From 96d2742303391c0005c59f2317a16c1850da449a Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:15:42 +0530
Subject: Delete file5_Total_differential_approximation.gif
---
.../file5_Total_differential_approximation.gif | Bin 423652 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
deleted file mode 100644
index 4f4627d..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif and /dev/null differ
--
cgit
From e29f7549016c88960601bf0dfcee31bd1eabde3f Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:15:56 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Total-Differential/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
index 51768b6..089ecd3 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -27,6 +27,6 @@
file5_Total_differential_approximation
-![file5_Total_differential_approximation](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif?raw=true)
+![file5_Total_differential_approximation](?raw=true)
--
cgit
From 4ab55ba27c21b5009180e345500105d6469efd8c Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:16:18 +0530
Subject: Add files via upload
---
.../file5_Total_differential_approximation.gif | Bin 0 -> 423246 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
new file mode 100644
index 0000000..ebbf240
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif differ
--
cgit
From 9725bfc14b0f98e6542110125c5502484e3bf6a2 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:16:53 +0530
Subject: Delete file5_Total_differential_approximation.gif
---
.../file5_Total_differential_approximation.gif | Bin 423246 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
deleted file mode 100644
index ebbf240..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif and /dev/null differ
--
cgit
From 16d7412eff57960c262fd5417a227b5867821110 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:17:51 +0530
Subject: Add files via upload
---
.../file5_Total_differential_approximation.gif | Bin 0 -> 423246 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
new file mode 100644
index 0000000..ebbf240
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif differ
--
cgit
From b268e0e2187ec72061ebedf9236c65becc0d3fcb Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:19:15 +0530
Subject: Delete file5_Total_differential_approximation.gif
---
.../file5_Total_differential_approximation.gif | Bin 423246 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
deleted file mode 100644
index ebbf240..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif and /dev/null differ
--
cgit
From 89e6a94cc369de704573c502c83ece5d06fd5336 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:19:37 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Total-Differential/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
index 089ecd3..e51ede3 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -27,6 +27,6 @@
file5_Total_differential_approximation
-![file5_Total_differential_approximation](?raw=true)
+![file5_Total_differential_approximation]
--
cgit
From fe28c4c821cdc250beb6582f2f439e73b064daef Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:20:12 +0530
Subject: Add files via upload
---
.../file5_Total_differential_approximation.gif | Bin 0 -> 423246 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
new file mode 100644
index 0000000..ebbf240
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif differ
--
cgit
From b4d09c2c9fd0f5488fcffa7b747db1582af97521 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:20:44 +0530
Subject: Delete file5_Total_differential_approximation.gif
---
.../file5_Total_differential_approximation.gif | Bin 423246 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
deleted file mode 100644
index ebbf240..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif and /dev/null differ
--
cgit
From e4cde6e13778391e5fae623573d8656290b09988 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:21:47 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Total-Differential/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
index e51ede3..3987542 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -9,7 +9,7 @@
file2_Differentials
-![file2_Differentials](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif?raw=true)
+
@@ -27,6 +27,6 @@
file5_Total_differential_approximation
-![file5_Total_differential_approximation]
+
--
cgit
From d8ed52c1d3c09890c12c88e299aa0bfab66d2113 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:23:52 +0530
Subject: Add files via upload
---
.../file5_Total_differential_approximation.gif | Bin 0 -> 423246 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif
new file mode 100644
index 0000000..ebbf240
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif differ
--
cgit
From b5d70ad25e3a20278ab6483b099eb523e8e1f1c0 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:24:38 +0530
Subject: Delete file2_Differentials.gif
---
.../Total-Differential/file2_Differentials.gif | Bin 725835 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
deleted file mode 100644
index 29207e3..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif and /dev/null differ
--
cgit
From 25a650bf03669ce8b7acc1d19b2a7277a8dac2c4 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:25:20 +0530
Subject: Add files via upload
---
.../Total-Differential/file2_Differentials.gif | Bin 0 -> 729982 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
new file mode 100644
index 0000000..6baf271
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif differ
--
cgit
From 0175a361342a7baa627333c76ab5a7e248670241 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:26:07 +0530
Subject: Delete file2_Differentials.gif
---
.../Total-Differential/file2_Differentials.gif | Bin 729982 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
deleted file mode 100644
index 6baf271..0000000
Binary files a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif and /dev/null differ
--
cgit
From ce5466c5fa13951701a1737b84582cfe5cb61b53 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:27:44 +0530
Subject: Add files via upload
---
.../Total-Differential/file2_Differentials.gif | Bin 0 -> 729982 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif
new file mode 100644
index 0000000..6baf271
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif differ
--
cgit
From 96159e5ec9a939dea4a7d1adaa1fb729fa85fadd Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:29:58 +0530
Subject: Update README.md
---
.../approximations-and-optimizations/Total-Differential/README.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
index 3987542..ce4da11 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/README.md
@@ -9,6 +9,7 @@
file2_Differentials
+![file2_Differentials](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file2_Differentials.gif?raw=true)
@@ -27,6 +28,7 @@
file5_Total_differential_approximation
+ ![file5_Total_differential_approximation](https://github.com/vnb09/FSF-mathematics-python-code-archive/blob/fsf_tasks/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file5_Total_differential_approximation.gif?raw=true)
--
cgit
From 6eaafd2b199661ba0b2221ed8f75bfc4c5e18514 Mon Sep 17 00:00:00 2001
From: Vaishnavi
Date: Tue, 30 Jun 2020 01:34:49 +0530
Subject: Update file3_Total_differential_of_z.py
---
.../file3_Total_differential_of_z.py | 23 +++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
(limited to 'FSF-2020')
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
index b29a7a3..b8d6f96 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file3_Total_differential_of_z.py
@@ -1,8 +1,16 @@
from manimlib.imports import*
-class firstScene(ThreeDScene):
+#---- visualization of total differential definition
+class totaldifferential(ThreeDScene):
def construct(self):
axes = ThreeDAxes().fade(0.5)
+ 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).set_color("#FF69B4").fade(0.6).shift([1,0.8,1.5]).scale(2)
+
plane = Rectangle(color = '#E6E6FA',fill_opacity = 1).scale(3).shift(-1*RIGHT+3*UP).fade(0.9)
label_x = TextMobject("$x$").shift(5*RIGHT+0.4*DOWN).rotate(1.571)
label_y = TextMobject("$y$").shift(0.3*DOWN+5.6*RIGHT).scale(0.5)
@@ -57,17 +65,19 @@ class firstScene(ThreeDScene):
self.add_fixed_in_frame_mobjects(label_y)
self.add_fixed_in_frame_mobjects(label_z)
self.wait(1)
+ self.play(Write(surface))
+ self.play(ShowCreation(d1))
+ self.add_fixed_in_frame_mobjects(d1_text)
+ self.play(ShowCreation(d2))
+ self.add_fixed_in_frame_mobjects(d2_text)
+ self.wait(1)
self.play(Write(s2))
self.wait(1)
self.play(Write(l1),Write(l2),Write(l3))
self.wait(1)
self.play(Write(s1))
self.wait(1)
- self.play(ShowCreation(d1))
- self.add_fixed_in_frame_mobjects(d1_text)
- self.play(ShowCreation(d2))
- self.add_fixed_in_frame_mobjects(d2_text)
- self.wait(1)
+ self.play(FadeOut(surface))
self.play(ShowCreation(d3))
self.add_fixed_in_frame_mobjects(d3_text)
self.play(ShowCreation(m1_line))
@@ -88,4 +98,3 @@ class firstScene(ThreeDScene):
self.play(ShowCreation(delx))
self.add_fixed_in_frame_mobjects(delx_text)
self.wait(1)
-
--
cgit