summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions')
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/README.md20
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_scalar_functions.py50
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_domain_range.py (renamed from FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py)62
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py18
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_level_curves.py118
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file5_level_surface.py78
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file6_scalar_function_application.py (renamed from FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py)15
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file7_neural_nets.py (renamed from FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py)0
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gifbin74879 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_scalar_functions.gifbin0 -> 1408290 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_domain_range.gifbin0 -> 6625947 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gifbin225144 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gifbin905534 -> 5660857 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_level_curves.gifbin0 -> 4096583 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file5_level_surface.gifbin0 -> 3796274 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file6_scalar_function_application.gifbin0 -> 2236609 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file7_neural_nets.gif (renamed from FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif)bin95828 -> 95828 bytes
17 files changed, 354 insertions, 7 deletions
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/README.md b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/README.md
new file mode 100644
index 0000000..4339c30
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/README.md
@@ -0,0 +1,20 @@
+**file1_scalar_function**
+![file1_scalar_function](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_scalar_functions.gif)
+
+**file2_domain_range**
+![file2_domain_range](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_domain_range.gif)
+
+**file3_parabola_example**
+![file3_parabola_example](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif)
+
+**file4_level_curves**
+![file4_non_rect_region](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_level_curves.gif)
+
+**file5_level_surface**
+![file5_level_surface](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file5_level_surface.gif)
+
+**file6_scalar_function_application**
+![file6_scalar_function_application](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file6_scalar_function_application.gif)
+
+**file7_neural_nets**
+![file7_neural_nets](https://github.com/nishanpoojary/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file7_neural_nets.gif)
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_scalar_functions.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_scalar_functions.py
new file mode 100644
index 0000000..1a6f4ed
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_scalar_functions.py
@@ -0,0 +1,50 @@
+from manimlib.imports import *
+
+class ScalarFunction(Scene):
+ def construct(self):
+ circle = Circle(radius = 1.5, color = BLUE_E, fill_color = BLUE_C, fill_opacity = 0.1).move_to(2*LEFT)
+ dot_circle = Dot().shift(np.array([-1.5,0,0])).set_color(BLUE_E)
+ dot_circle_lab = TextMobject(r"$a$", color = BLUE_E).next_to(dot_circle, DOWN)
+
+ arrow = Arrow(np.array([3,-3,0]),np.array([3,3,0]))
+ line = Line(np.array([3,-1.5,0]),np.array([3,1.5,0]), color = RED_C)
+
+ dot0 = Dot().shift(np.array([3,0,0])).set_color(RED_E)
+ dot0_lab = TextMobject(r"$f(a)$", color = RED_E).scale(0.8).next_to(dot0, RIGHT)
+
+ dot1 = Dot().shift(np.array([3,-1.5,0])).set_color(RED_C)
+
+ dot2 = Dot().shift(np.array([3,1.5,0])).set_color(RED_C)
+ dot2_lab = TextMobject(r"$f(A)$", color = RED_C).scale(0.8).next_to(dot2, RIGHT)
+
+ arrow_f = Arrow(np.array([-1.5,0,0]),np.array([3,0,0]), color = YELLOW_C, buff = 0.1)
+
+ R = TextMobject(r"$\mathbb{R}$", color = WHITE).move_to(np.array([3,-3.3,0]))
+
+ A = TextMobject(r"$A$", color = BLUE_E).move_to(np.array([-2.5,-3.3,0]))
+
+ F = TextMobject(r"$f$", color = GREY).move_to(np.array([0,-2.9,0]))
+
+ F_center = TextMobject(r"$f$", color = YELLOW_C).move_to(np.array([0.8,0.5,0]))
+
+ arrow_R_A = Arrow(np.array([-2.3,-3.3,0]),np.array([2.7,-3.3,0]), color = GREY, buff = 0.1)
+
+ scalar_function = TextMobject(r"Scalar Valued Function", r"$f: A \rightarrow \mathbb{R}$", color = PURPLE).move_to(np.array([0,3.5,0]))
+ scalar_function[1].set_color(GREEN_C)
+
+
+
+ self.play(ShowCreation(circle))
+ self.play(ShowCreation(arrow))
+
+
+ self.play(ShowCreation(dot1), ShowCreation(dot2))
+ self.play(ShowCreation(dot_circle))
+ self.play(ShowCreation(dot_circle_lab), ShowCreation(dot2_lab))
+ self.play(ShowCreation(A), ShowCreation(R))
+ self.play(GrowArrow(arrow_f), ShowCreation(dot0), ShowCreation(dot0_lab), ShowCreation(F_center), GrowArrow(arrow_R_A), ShowCreation(F), Transform(circle.copy(), line.copy()))
+
+ self.play(Write(scalar_function))
+
+
+ self.wait(2) \ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_domain_range.py
index 9b1ca7b..1b54cb6 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file1_domain_range.py
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_domain_range.py
@@ -20,6 +20,11 @@ class PlotGraphs(GraphScene):
self.play(FadeOut(topic))
self.wait(1)
+ scalar_func_R = TextMobject(r"Scalar Valued Functions in $R$").scale(1.5).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(scalar_func_R))
+ self.play(FadeOut(scalar_func_R))
+ self.wait(1)
+
XTD = self.x_axis_width/(self.x_max- self.x_min)
YTD = self.y_axis_height/(self.y_max- self.y_min)
@@ -40,8 +45,8 @@ class PlotGraphs(GraphScene):
rangeMsg.scale(0.5)
rangeMsg.set_color(YELLOW)
- domainline1 = Line(self.graph_origin+0.6*YTD*DOWN+1.2*XTD*LEFT, self.graph_origin+0.6*YTD*DOWN + 4*XTD*LEFT)
- domainline2 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.1*XTD*RIGHT, self.graph_origin+0.6*YTD*DOWN + 5.3*XTD*RIGHT)
+ domainline1 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.2*XTD*LEFT, self.graph_origin+0.6*YTD*DOWN + 4*XTD*LEFT, buff = 0.1)
+ domainline2 = Arrow(self.graph_origin+0.6*YTD*DOWN+1.1*XTD*RIGHT, self.graph_origin+0.6*YTD*DOWN + 5.3*XTD*RIGHT, buff = 0.1)
domainline1.set_color(PINK)
domainline2.set_color(PINK)
@@ -128,5 +133,58 @@ class PlotSineGraphs(GraphScene):
self.play(Write(domainMsg))
self.wait(3)
+
+
+
+class Paraboloid(ThreeDScene):
+ def construct(self):
+
+ scalar_func_R2 = TextMobject(r"Scalar Valued Functions in $R^2$").scale(1.5).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+ self.play(Write(scalar_func_R2))
+ self.play(FadeOut(scalar_func_R2))
+ self.wait(1)
+
+ axes = ThreeDAxes()
+
+ paraboloid = ParametricSurface(
+ lambda u, v: np.array([
+ 2*np.sin(u)*np.cos(v),
+ 2*np.sin(u)*np.sin(v),
+ 2*2*np.sin(u)*np.sin(u)
+ ]),u_min=0,u_max=PI/2,v_min=0,v_max=2*PI,checkerboard_colors=[GREEN_C, GREEN_E],
+ resolution=(15, 32)).scale(1)
+
+ domain = Polygon(np.array([-5,-5,0]),np.array([5,-5,0]),np.array([5,5,0]),np.array([-5,5,0]),np.array([-5,-5,0]), color = BLUE_C, fill_color = BLUE_C, fill_opacity = 0.2)
+ domain_lab = TextMobject(r"$Domain: R^2$", color = YELLOW_C).scale(0.7).move_to(1*DOWN + 2*LEFT)
+
+ rangef = Line(np.array([0, 0,0]), np.array([0, 0,5]), color = RED_C)
+ rangef_lab = TextMobject(r"$Range: z \geq 0$", color = RED_C).scale(0.7).move_to(2*UP + 1.5*RIGHT)
+
+ func = TextMobject(r"$z = f(x,y) = x^2+y^2$").scale(0.7).move_to(3*UP + 4*LEFT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.set_camera_orientation(phi=60 * DEGREES, theta = 0*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+ self.add(axes)
+
+ axis = TextMobject(r"X",r"Y",r"Z")
+ axis[0].move_to(6*RIGHT)
+ axis[1].move_to(6*UP)
+ axis[2].move_to(np.array([0,0,3.7]))
+
+ self.add_fixed_orientation_mobjects(axis[2])
+ self.add_fixed_orientation_mobjects(axis[0])
+ self.add_fixed_orientation_mobjects(axis[1])
+
+
+
+ self.add_fixed_in_frame_mobjects(func)
+ self.play(Write(paraboloid))
+ self.play(ShowCreation(domain))
+ self.add_fixed_in_frame_mobjects(domain_lab)
+ self.wait()
+ self.play(ShowCreation(rangef))
+ self.add_fixed_in_frame_mobjects(rangef_lab)
+ self.wait(5)
\ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
index 74dc063..63c16b3 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py
@@ -9,11 +9,10 @@ class Parabola(ThreeDScene):
2*np.cosh(u)*np.cos(v),
2*np.cosh(u)*np.sin(v),
2*np.sinh(u)
- ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],
+ ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],#
resolution=(15, 32))
- text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", "z = f(x,y)")
- self.add_fixed_in_frame_mobjects(text3d)
+ text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", r"$z = f(x,y) = \sqrt{x^2 + y^2 - 4}$")
text3d[0].move_to(4*LEFT+2*DOWN)
text3d[1].next_to(text3d[0], DOWN)
text3d[0].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
@@ -21,8 +20,21 @@ class Parabola(ThreeDScene):
#self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
self.move_camera(phi=110* DEGREES,theta=45*DEGREES)
+
self.add(axes)
+
+ axis = TextMobject(r"X",r"Y",r"Z")
+ axis[0].move_to(6*RIGHT)
+ axis[1].move_to(6*UP)
+ axis[2].move_to(np.array([0,0,3.7]))
+
+ self.add_fixed_orientation_mobjects(axis[2])
+ self.add_fixed_orientation_mobjects(axis[0])
+ self.add_fixed_orientation_mobjects(axis[1])
+
+
self.play(ShowCreation(paraboloid))
+ self.add_fixed_in_frame_mobjects(text3d)
self.play(Write(text3d[0]))
self.play(Write(text3d[1]))
self.begin_ambient_camera_rotation(rate=0.2)
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_level_curves.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_level_curves.py
new file mode 100644
index 0000000..2b6f719
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_level_curves.py
@@ -0,0 +1,118 @@
+from manimlib.imports import *
+
+class LevelCurves(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ paraboloid = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ -u*u+2
+ ]),u_min=-1.414,u_max=1.414,v_min=0,v_max=2*PI, color = BLUE_C, fill_color = BLUE_C, fill_opacity = 0.1,
+ resolution=(15, 32)).scale(1)
+
+ plane_0 = Polygon(np.array([2,-2,0]),np.array([2,2,0]),np.array([-2,2,0]),np.array([-2,-2,0]),np.array([2,-2,0]), color = BLUE_E, fill_color = BLUE_E, fill_opacity = 0.3)
+ plane_0_lab = TextMobject("C = 0").move_to(0.4*UP+3.2*RIGHT).set_color(BLUE_E).scale(0.6)
+ circle_0 = Circle(radius = 1.414 , color = BLUE_E)
+ circle_0_lab = TextMobject("0").move_to(1.1*DOWN+1.1*RIGHT).set_color(BLUE_E).scale(0.6)
+
+ plane_0_5 = Polygon(np.array([2,-2,0.5]),np.array([2,2,0.5]),np.array([-2,2,0.5]),np.array([-2,-2,0.5]),np.array([2,-2,0.5]), color = GREEN_C, fill_color = GREEN_C, fill_opacity = 0.3)
+ plane_0_5_lab = TextMobject("C = 0.5").move_to(0.8*UP+3.4*RIGHT).set_color(GREEN_C).scale(0.6)
+ circle_0_5 = Circle(radius = 1.224 , color = GREEN_C)
+ circle_0_5_lab = TextMobject("0.5").move_to(0.9*DOWN+0.9*RIGHT).set_color(GREEN_C).scale(0.6)
+ circle_0_5_copy = circle_0_5.copy().move_to(np.array([0,0,0.5]))
+
+ plane_1 = Polygon(np.array([2,-2,1]),np.array([2,2,1]),np.array([-2,2,1]),np.array([-2,-2,1]),np.array([2,-2,1]), color = YELLOW_C, fill_color = YELLOW_C, fill_opacity = 0.3)
+ plane_1_lab = TextMobject("C = 1").move_to(1.2*UP+3.3*RIGHT).set_color(YELLOW_C).scale(0.6)
+ circle_1 = Circle(radius = 1 , color = YELLOW_C)
+ circle_1_lab = TextMobject("1").move_to(0.7*DOWN+0.7*RIGHT).set_color(YELLOW_C).scale(0.6)
+ circle_1_copy = circle_1.copy().move_to(np.array([0,0,1]))
+
+ plane_1_5 = Polygon(np.array([2,-2,1.5]),np.array([2,2,1.5]),np.array([-2,2,1.5]),np.array([-2,-2,1.5]),np.array([2,-2,1.5]), color = ORANGE, fill_color = ORANGE, fill_opacity = 0.3)
+ plane_1_5_lab = TextMobject("C = 1.5").move_to(1.7*UP+3.4*RIGHT).set_color(ORANGE).scale(0.6)
+ circle_1_5 = Circle(radius = 0.707 , color = ORANGE)
+ circle_1_5_lab = TextMobject("1.5").move_to(0.5*DOWN+0.5*RIGHT).set_color(ORANGE).scale(0.6)
+ circle_1_5_copy = circle_1_5.copy().move_to(np.array([0,0,1.5]))
+
+ plane_2 = Polygon(np.array([2,-2,2]),np.array([2,2,2]),np.array([-2,2,2]),np.array([-2,-2,2]),np.array([2,-2,2]), color = RED_C, fill_color = RED_C, fill_opacity = 0.3)
+ plane_2_lab = TextMobject("C = 2").move_to(2.1*UP+3.3*RIGHT).set_color(RED_C).scale(0.6)
+ dot_2 = Dot().set_fill(RED_C)
+ circle_2_lab = TextMobject("2").move_to(0.2*DOWN+0.2*RIGHT).set_color(RED_C).scale(0.6)
+ dot_2_copy = dot_2.copy().move_to(np.array([0,0,2]))
+
+ level_curves_line1 = DashedLine(np.array([0,-1.414,0]),np.array([0,-2,1]), color = WHITE)
+ level_curves_line2 = DashedLine(np.array([0,-1.224,0.5]),np.array([0,-2,1]), color = WHITE)
+ level_curves_line3 = DashedLine(np.array([0,-1,1]),np.array([0,-2,1]), color = WHITE)
+ level_curves_line4 = DashedLine(np.array([0,-0.707,1.5]),np.array([0,-2,1]), color = WHITE)
+ level_curves_line5 = DashedLine(np.array([0,0,2]),np.array([0,-2,1]), color = WHITE)
+
+ level_curves = TextMobject("Level Curves").move_to(1.4*UP+3*LEFT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE).scale(0.8)
+
+
+ contour_line1 = DashedLine(np.array([0,-1.414,0]),np.array([0,-2,1]), color = WHITE)
+ contour_line2 = DashedLine(np.array([0,-1.224,0]),np.array([0,-2,1]), color = WHITE)
+ contour_line3 = DashedLine(np.array([0,-1,0]),np.array([0,-2,1]), color = WHITE)
+ contour_line4 = DashedLine(np.array([0,-0.707,0]),np.array([0,-2,1]), color = WHITE)
+ contour_line5 = DashedLine(np.array([0,0,0]),np.array([0,-2,1]), color = WHITE)
+
+ contours = TextMobject("Contours").move_to(1.4*UP+2.7*LEFT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE).scale(0.8)
+
+
+ topic = TextMobject("Contour Plot").move_to(3*UP+3*LEFT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE).scale(0.8)
+
+ self.set_camera_orientation(phi=80 * DEGREES, theta = 0*DEGREES)
+ #self.set_camera_orientation(phi=0 * DEGREES, theta = 0*DEGREES)
+
+ self.add(axes)
+
+ axis = TextMobject(r"X",r"Y",r"Z")
+ axis[0].move_to(6*RIGHT)
+ axis[1].move_to(6*UP)
+ axis[2].move_to(np.array([0,0,3.7]))
+
+ self.add_fixed_orientation_mobjects(axis[2])
+ self.add_fixed_orientation_mobjects(axis[0])
+ self.add_fixed_orientation_mobjects(axis[1])
+
+ self.play(Write(paraboloid))
+ self.wait()
+ self.play(ShowCreation(plane_0), ShowCreation(circle_0))
+ self.add_fixed_in_frame_mobjects(plane_0_lab)
+ self.wait()
+ self.play(ShowCreation(plane_0_5), ShowCreation(circle_0_5_copy), ShowCreation(circle_0_5))
+ self.add_fixed_in_frame_mobjects(plane_0_5_lab)
+ self.wait()
+ self.play(ShowCreation(plane_1), ShowCreation(circle_1_copy), ShowCreation(circle_1))
+ self.add_fixed_in_frame_mobjects(plane_1_lab)
+ self.wait()
+ self.play(ShowCreation(plane_1_5), ShowCreation(circle_1_5_copy), ShowCreation(circle_1_5))
+ self.add_fixed_in_frame_mobjects(plane_1_5_lab)
+ self.wait()
+ self.play(ShowCreation(plane_2), ShowCreation(dot_2_copy), ShowCreation(dot_2))
+ self.add_fixed_in_frame_mobjects(plane_2_lab)
+ self.wait()
+
+ self.move_camera(phi=60 * DEGREES, theta = 30*DEGREES,run_time=3)
+ self.play(FadeOut(plane_0), FadeOut(plane_0_lab), FadeOut(plane_0_5), FadeOut(plane_0_5_lab), FadeOut(plane_1), FadeOut(plane_1_lab), FadeOut(plane_1_5), FadeOut(plane_1_5_lab), FadeOut(plane_2), FadeOut(plane_2_lab))
+
+ self.play(GrowArrow(level_curves_line1), GrowArrow(level_curves_line2), GrowArrow(level_curves_line3), GrowArrow(level_curves_line4), GrowArrow(level_curves_line5))
+ self.add_fixed_in_frame_mobjects(level_curves)
+ self.wait()
+ self.play(FadeOut(level_curves_line1), FadeOut(level_curves_line2), FadeOut(level_curves_line3), FadeOut(level_curves_line4), FadeOut(level_curves_line5), FadeOut(level_curves))
+ self.play(FadeOut(circle_0_5_copy), FadeOut(circle_1_copy), FadeOut(circle_1_5_copy), FadeOut(dot_2_copy))
+ self.wait()
+
+ self.play(GrowArrow(contour_line1), GrowArrow(contour_line2), GrowArrow(contour_line3), GrowArrow(contour_line4), GrowArrow(contour_line5))
+ self.add_fixed_in_frame_mobjects(contours)
+ self.wait()
+ self.play(FadeOut(contour_line1), FadeOut(contour_line2), FadeOut(contour_line3), FadeOut(contour_line4), FadeOut(contour_line5), FadeOut(contours))
+
+
+ self.move_camera(phi=0 * DEGREES, theta = 0*DEGREES,run_time=3)
+ self.play(FadeOut(paraboloid))
+ self.wait()
+
+ self.add_fixed_in_frame_mobjects(circle_0_lab, circle_0_5_lab, circle_1_lab, circle_1_5_lab,circle_2_lab)
+ self.add_fixed_in_frame_mobjects(topic)
+ self.wait(3) \ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file5_level_surface.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file5_level_surface.py
new file mode 100644
index 0000000..8052676
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file5_level_surface.py
@@ -0,0 +1,78 @@
+from manimlib.imports import *
+
+class LevelSurface(ThreeDScene):
+ def construct(self):
+ axes = ThreeDAxes()
+
+ surface_0 = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ (u*u*np.cos(v)*np.cos(v))-(u*np.sin(v)/5)+0
+ ]),u_min=-1,u_max=1,v_min=0,v_max=2*PI,checkerboard_colors=[RED_C, RED_E],
+ resolution=(15, 32)).scale(1)
+
+ k_0 = TextMobject("K = 0", color = RED_C).scale(0.7)
+
+ surface_1 = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ (u*u*np.cos(v)*np.cos(v))-(u*np.sin(v)/5)+1
+ ]),u_min=-1,u_max=1,v_min=0,v_max=2*PI,checkerboard_colors=[GREEN_C, GREEN_E],
+ resolution=(15, 32)).scale(1)
+
+ k_1 = TextMobject("K = 1", color = GREEN_C).scale(0.7)
+
+ surface_2 = ParametricSurface(
+ lambda u, v: np.array([
+ u*np.cos(v),
+ u*np.sin(v),
+ (u*u*np.cos(v)*np.cos(v))-(u*np.sin(v)/5)+2
+ ]),u_min=-1,u_max=1,v_min=0,v_max=2*PI,checkerboard_colors=[YELLOW_C, YELLOW_E],
+ resolution=(15, 32)).scale(1)
+
+ k_2 = TextMobject("K = 2", color = YELLOW_C).scale(0.7)
+
+ func = TextMobject(r"$w = g(x,y,z)$", r"$= z - f(x,y)$", r"$z-x^2+y/5 = K$")
+ func.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
+
+ self.set_camera_orientation(phi=90 * DEGREES, theta = 90*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.3)
+
+
+ self.add(axes)
+
+ axis = TextMobject(r"X",r"Y",r"Z")
+ axis[0].move_to(6*RIGHT)
+ axis[1].move_to(6*UP)
+ axis[2].move_to(3.7*UP)
+
+ self.add_fixed_in_frame_mobjects(axis[2])
+ self.add_fixed_orientation_mobjects(axis[0])
+ self.add_fixed_orientation_mobjects(axis[1])
+
+ self.play(Write(surface_0))
+ self.add_fixed_in_frame_mobjects(k_0)
+ k_0.move_to(np.array([1.4*RIGHT ]))
+
+ self.play(Write(surface_1))
+ self.add_fixed_in_frame_mobjects(k_1)
+ k_1.move_to(np.array([1.4*RIGHT + 1*UP]))
+
+ self.play(Write(surface_2))
+ self.add_fixed_in_frame_mobjects(k_2)
+ k_2.move_to(np.array([1.4*RIGHT + 2*UP]))
+ self.wait()
+
+ self.add_fixed_in_frame_mobjects(func)
+ func[0].move_to(np.array([4.5*LEFT + 3*UP]))
+ func[1].move_to(np.array([4.5*LEFT + 2.5*UP]))
+ func[2].move_to(np.array([4.5*LEFT + 2*UP]))
+
+ self.wait(3)
+ self.move_camera(phi=60 * DEGREES,run_time=3)
+ self.wait(2)
+
+
+ \ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file6_scalar_function_application.py
index 56b3e53..3ccfad6 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file2_scalar_function_application.py
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file6_scalar_function_application.py
@@ -3,12 +3,23 @@ from manimlib.imports import *
class ScalarApplication(ThreeDScene):
def construct(self):
axes = ThreeDAxes() # creates a 3D Axis
+
+ self.add(axes)
+
+ axis = TextMobject(r"X",r"Y",r"Z")
+ axis[0].move_to(6*RIGHT)
+ axis[1].move_to(6*UP)
+ axis[2].move_to(np.array([0,0,3.7]))
+
+ self.add_fixed_orientation_mobjects(axis[2])
+ self.add_fixed_orientation_mobjects(axis[0])
+ self.add_fixed_orientation_mobjects(axis[1])
cube = Cube()
- cube.set_fill(YELLOW_E, opacity = 0.1)
+ cube.set_fill(YELLOW_C, opacity = 0.2)
cube.scale(2)
self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES)
- self.play(ShowCreation(cube),ShowCreation(axes))
+ self.play(ShowCreation(cube))
dot = Sphere()
dot.scale(0.1)
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file7_neural_nets.py
index eb6bf45..eb6bf45 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file4_neural_nets.py
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file7_neural_nets.py
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif
deleted file mode 100644
index d0351e5..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_domain_range.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_scalar_functions.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_scalar_functions.gif
new file mode 100644
index 0000000..bea9c7b
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file1_scalar_functions.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_domain_range.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_domain_range.gif
new file mode 100644
index 0000000..6801e4f
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_domain_range.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif
deleted file mode 100644
index 831ec8e..0000000
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file2_scalar_function_application.gif
+++ /dev/null
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif
index 3fdecf4..af9e536 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file3_parabola_example.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_level_curves.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_level_curves.gif
new file mode 100644
index 0000000..b4ac106
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_level_curves.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file5_level_surface.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file5_level_surface.gif
new file mode 100644
index 0000000..e4dc80d
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file5_level_surface.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file6_scalar_function_application.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file6_scalar_function_application.gif
new file mode 100644
index 0000000..8bb176a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file6_scalar_function_application.gif
Binary files differ
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file7_neural_nets.gif
index 9d24688..9d24688 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file4_neural_nets.gif
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/gifs/file7_neural_nets.gif
Binary files differ