From ba2e5d704cdafd73cc0e0dab91fcff110ffaf400 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 3 Jul 2020 19:53:49 +0530 Subject: Delete file1_multivar_func_examples.py --- .../file1_multivar_func_examples.py | 167 --------------------- 1 file changed, 167 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py deleted file mode 100644 index 55b2b7e..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py +++ /dev/null @@ -1,167 +0,0 @@ -from manimlib.imports import * - -class Examples1(GraphScene): - def construct(self): - - rectangle = Rectangle(height = 3, width = 4, color = GREEN) - rectangle_area_func = TexMobject("Area", "=", "f(", "Length", ",", "Breadth", ")").scale(0.6) - rectangle_area_func[0].set_color(RED_C) - rectangle_area_func[2].set_color(ORANGE) - rectangle_area_func[3].set_color(YELLOW_C) - rectangle_area_func[5].set_color(BLUE_C) - rectangle_area_func[6].set_color(ORANGE) - - - rectangle_area = TexMobject("Area", "=", "Length", "\\times", "Breadth").scale(0.6) - rectangle_area[0].set_color(RED_C) - rectangle_area[2].set_color(YELLOW_C) - rectangle_area[4].set_color(BLUE_C) - - - square = Square(side_length = 5, color = PURPLE) - square_area_func = TexMobject("Area", "=", "f(", "Length", ")") - square_area_func[0].set_color(GREEN_C) - square_area_func[2].set_color(ORANGE) - square_area_func[3].set_color(BLUE_C) - square_area_func[4].set_color(ORANGE) - - square_area = TexMobject("Area", "=", "Length^2") - square_area[0].set_color(GREEN_C) - square_area[2].set_color(BLUE_C) - - - circle = Circle(radius = 2, color = PINK) - circle_area_func = TexMobject("Area", "=", "f(", "r", ")") - circle_area_func[0].set_color(YELLOW_C) - circle_area_func[2].set_color(ORANGE) - circle_area_func[3].set_color(GREEN_C) - circle_area_func[4].set_color(ORANGE) - - circle_area = TexMobject("Area", "=", "\\pi", "r^2") - circle_area[0].set_color(YELLOW_C) - circle_area[2].set_color(BLUE_C) - circle_area[3].set_color(GREEN_C) - - radius = Line(ORIGIN,2*RIGHT, color = RED_C) - - - - braces_rect1 = Brace(rectangle, LEFT) - eq_text1 = braces_rect1.get_text("Length").set_color(YELLOW_C) - braces_rect2 = Brace(rectangle, UP) - eq_text2 = braces_rect2.get_text("Breadth").set_color(BLUE_C) - - braces_square = Brace(square, LEFT) - braces_square_text = braces_square.get_text("Length").set_color(BLUE_C) - - radius_text = TexMobject("r", color = GREEN_C).next_to(radius,UP) - - - - self.play(ShowCreation(rectangle)) - self.wait(1) - self.play(GrowFromCenter(braces_rect1),Write(eq_text1),GrowFromCenter(braces_rect2),Write(eq_text2)) - self.wait(1) - self.play(Write(rectangle_area_func)) - self.wait(1) - self.play(Transform(rectangle_area_func, rectangle_area)) - self.wait(1) - self.play(FadeOut(braces_rect1),FadeOut(eq_text1),FadeOut(braces_rect2),FadeOut(eq_text2),FadeOut(rectangle_area_func)) - - - self.play(Transform(rectangle, square)) - self.wait(1) - self.play(GrowFromCenter(braces_square),Write(braces_square_text)) - self.wait(1) - self.play(Write(square_area_func)) - self.wait(1) - self.play(Transform(square_area_func, square_area)) - self.wait(1) - self.play(FadeOut(braces_square),FadeOut(braces_square_text),FadeOut(square_area_func)) - - - self.play(Transform(rectangle, circle)) - self.wait(1) - self.play(ShowCreation(radius),Write(radius_text)) - self.wait(1) - self.play(FadeOut(radius_text),FadeOut(radius)) - self.wait(1) - self.play(Write(circle_area_func)) - self.wait(1) - self.play(Transform(circle_area_func, circle_area)) - self.wait(1) - self.play(FadeOut(circle_area_func)) - - - -class Examples2(ThreeDScene): - def construct(self): - axes = ThreeDAxes() - - rectangle_x_y_0 = Polygon(np.array([-1,-2,0]),np.array([-1,2,0]),np.array([1,2,0]),np.array([1,-2,0]),np.array([-1,-2,0]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - rectangle_x_y_3 = Polygon(np.array([-1,-2,3]),np.array([-1,2,3]),np.array([1,2,3]),np.array([1,-2,3]),np.array([-1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - - rectangle_y_z_1 = Polygon(np.array([1,-2,3]),np.array([1,2,3]),np.array([1,2,0]),np.array([1,-2,0]),np.array([1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - rectangle_y_z_minus_1 = Polygon(np.array([-1,-2,3]),np.array([-1,2,3]),np.array([-1,2,0]),np.array([-1,-2,0]),np.array([-1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - - rectangle_x_z_2 = Polygon(np.array([1,2,3]),np.array([-1,2,3]),np.array([-1,2,0]),np.array([1,2,0]),np.array([1,2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - rectangle_x_z_minus_2 = Polygon(np.array([1,-2,3]),np.array([-1,-2,3]),np.array([-1,-2,0]),np.array([1,-2,0]),np.array([1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) - - box = VGroup(rectangle_x_y_0, rectangle_x_y_3, rectangle_y_z_1, rectangle_y_z_minus_1, rectangle_x_z_2, rectangle_x_z_minus_2) - - braces_rectangle_x_y_0 = Line(np.array([1,2,0]), np.array([1,-2,0]), color = BLUE_C) - braces_rectangle_x_y_0_text = TextMobject("Length").set_color(BLUE_C).move_to(np.array([2,-1,0])) - - braces_rectangle_y_z_1 = Line(np.array([1,2,0]), np.array([1,2,3]), color = YELLOW_C) - braces_rectangle_y_z_1_text = TextMobject("Height").set_color(YELLOW_C).move_to(np.array([2,3.8,2])) - - braces_rectangle_x_z_2 = Line(np.array([1,2,3]), np.array([-1,2,3]), color = PURPLE) - braces_rectangle_x_z_2_text = TextMobject("Breadth").set_color(PURPLE).move_to(np.array([0,3.8,3.3])) - - box_area_func = TexMobject("Area =", "f(", "Length", ",", "Breadth", ",", "Height", ")").move_to(4*LEFT+3.5*UP).scale(0.6) - box_area_func[0].set_color(GREEN_C) - box_area_func[1].set_color(ORANGE) - box_area_func[2].set_color(BLUE_C) - box_area_func[4].set_color(PURPLE) - box_area_func[6].set_color(YELLOW_C) - box_area_func[7].set_color(ORANGE) - - box_area_func_2 = TexMobject("Area =", "Length", "\\times", "Breadth", "\\times", "Height").move_to(4*LEFT+3.5*UP).scale(0.6) - box_area_func_2[0].set_color(GREEN_C) - box_area_func_2[1].set_color(BLUE_C) - box_area_func_2[3].set_color(PURPLE) - box_area_func_2[5].set_color(YELLOW_C) - - - self.set_camera_orientation(phi=70 * 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(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(ShowCreation(box), ShowCreation(braces_rectangle_x_y_0)) - self.add_fixed_orientation_mobjects(braces_rectangle_x_y_0_text) - self.play(ShowCreation(braces_rectangle_y_z_1)) - self.add_fixed_orientation_mobjects(braces_rectangle_y_z_1_text) - self.play(ShowCreation(braces_rectangle_x_z_2)) - self.add_fixed_orientation_mobjects(braces_rectangle_x_z_2_text) - self.wait(2) - - self.move_camera(phi=60* DEGREES,theta=80*DEGREES) - self.add_fixed_in_frame_mobjects(box_area_func) - self.play(Write(box_area_func)) - self.wait() - - - self.play(ReplacementTransform(box_area_func,box_area_func_2)) - self.add_fixed_in_frame_mobjects(box_area_func_2) - - - self.wait(3) \ No newline at end of file -- cgit From acfcd90d303bb7f1e4cebcc4029c8382e4f89843 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 3 Jul 2020 19:55:33 +0530 Subject: Add files via upload --- .../file1_multivar_func_examples.py | 148 +++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py new file mode 100644 index 0000000..c15cdfb --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file1_multivar_func_examples.py @@ -0,0 +1,148 @@ +from manimlib.imports import * + +class Examples1(GraphScene): + def construct(self): + + rectangle = Rectangle(height = 3, width = 4, color = GREEN) + rectangle_area_func = TexMobject("Area", "=", "f(", "Length", ",", "Breadth", ")").scale(0.6) + rectangle_area_func[0].set_color(RED_C) + rectangle_area_func[2].set_color(ORANGE) + rectangle_area_func[3].set_color(YELLOW_C) + rectangle_area_func[5].set_color(BLUE_C) + rectangle_area_func[6].set_color(ORANGE) + + + rectangle_area = TexMobject("Area", "=", "Length", "\\times", "Breadth").scale(0.6) + rectangle_area[0].set_color(RED_C) + rectangle_area[2].set_color(YELLOW_C) + rectangle_area[4].set_color(BLUE_C) + + + triangle = Polygon(np.array([-3,-1.5,0]), np.array([2,-1.5,0]), np.array([2,1.5,0]), np.array([-3,-1.5,0]), color = PURPLE) + + triangle_area_func = TexMobject("Area", "=", "f(", "Base", ",", "Height", ")").scale(0.6).move_to(1*DOWN) + triangle_area_func[0].set_color(RED_C) + triangle_area_func[2].set_color(ORANGE) + triangle_area_func[3].set_color(YELLOW_C) + triangle_area_func[5].set_color(BLUE_C) + triangle_area_func[6].set_color(ORANGE) + + triangle_area = TexMobject("Area", "=", "\\frac{1}{2}", "\\times", "Base", "\\times", "Height").scale(0.6).move_to(1*DOWN) + triangle_area[0].set_color(RED_C) + triangle_area[2].set_color(GREEN_C) + triangle_area[4].set_color(YELLOW_C) + triangle_area[6].set_color(BLUE_C) + + + + braces_rect1 = Brace(rectangle, LEFT) + eq_text1 = braces_rect1.get_text("Length").set_color(YELLOW_C) + braces_rect2 = Brace(rectangle, UP) + eq_text2 = braces_rect2.get_text("Breadth").set_color(BLUE_C) + + + braces_triangle_height = Brace(triangle, RIGHT) + braces_triangle_height_text = braces_triangle_height.get_text("Height").set_color(BLUE_C) + + braces_triangle_base = Brace(triangle, DOWN) + braces_triangle_base_text = braces_triangle_base.get_text("Base").set_color(YELLOW_C) + + + self.play(ShowCreation(rectangle)) + self.wait(1) + self.play(GrowFromCenter(braces_rect1),Write(eq_text1),GrowFromCenter(braces_rect2),Write(eq_text2)) + self.wait(1) + self.play(Write(rectangle_area_func)) + self.wait(1) + self.play(Transform(rectangle_area_func, rectangle_area)) + self.wait(1) + self.play(FadeOut(braces_rect1),FadeOut(eq_text1),FadeOut(braces_rect2),FadeOut(eq_text2),FadeOut(rectangle_area_func)) + + + self.play(Transform(rectangle, triangle)) + self.wait(1) + self.play(GrowFromCenter(braces_triangle_height),Write(braces_triangle_height_text)) + self.wait(1) + self.play(GrowFromCenter(braces_triangle_base),Write(braces_triangle_base_text)) + self.wait(1) + self.play(Write(triangle_area_func)) + self.wait(1) + self.play(Transform(triangle_area_func, triangle_area)) + self.wait(1) + self.play(FadeOut(braces_triangle_height),FadeOut(braces_triangle_height_text),FadeOut(braces_triangle_base),FadeOut(braces_triangle_base_text),FadeOut(triangle_area_func)) + self.wait(1) + + + + +class Examples2(ThreeDScene): + def construct(self): + axes = ThreeDAxes() + + rectangle_x_y_0 = Polygon(np.array([-1,-2,0]),np.array([-1,2,0]),np.array([1,2,0]),np.array([1,-2,0]),np.array([-1,-2,0]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + rectangle_x_y_3 = Polygon(np.array([-1,-2,3]),np.array([-1,2,3]),np.array([1,2,3]),np.array([1,-2,3]),np.array([-1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + + rectangle_y_z_1 = Polygon(np.array([1,-2,3]),np.array([1,2,3]),np.array([1,2,0]),np.array([1,-2,0]),np.array([1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + rectangle_y_z_minus_1 = Polygon(np.array([-1,-2,3]),np.array([-1,2,3]),np.array([-1,2,0]),np.array([-1,-2,0]),np.array([-1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + + rectangle_x_z_2 = Polygon(np.array([1,2,3]),np.array([-1,2,3]),np.array([-1,2,0]),np.array([1,2,0]),np.array([1,2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + rectangle_x_z_minus_2 = Polygon(np.array([1,-2,3]),np.array([-1,-2,3]),np.array([-1,-2,0]),np.array([1,-2,0]),np.array([1,-2,3]), color = RED_E, fill_color = RED_C, fill_opacity = 0.1) + + box = VGroup(rectangle_x_y_0, rectangle_x_y_3, rectangle_y_z_1, rectangle_y_z_minus_1, rectangle_x_z_2, rectangle_x_z_minus_2) + + braces_rectangle_x_y_0 = Line(np.array([1,2,0]), np.array([1,-2,0]), color = BLUE_C) + braces_rectangle_x_y_0_text = TextMobject("Length").set_color(BLUE_C).move_to(np.array([2,-1,0])) + + braces_rectangle_y_z_1 = Line(np.array([1,2,0]), np.array([1,2,3]), color = YELLOW_C) + braces_rectangle_y_z_1_text = TextMobject("Height").set_color(YELLOW_C).move_to(np.array([2,3.8,2])) + + braces_rectangle_x_z_2 = Line(np.array([1,2,3]), np.array([-1,2,3]), color = PURPLE) + braces_rectangle_x_z_2_text = TextMobject("Breadth").set_color(PURPLE).move_to(np.array([0,3.8,3.3])) + + box_area_func = TexMobject("Area =", "f(", "Length", ",", "Breadth", ",", "Height", ")").move_to(4*LEFT+3.5*UP).scale(0.6) + box_area_func[0].set_color(GREEN_C) + box_area_func[1].set_color(ORANGE) + box_area_func[2].set_color(BLUE_C) + box_area_func[4].set_color(PURPLE) + box_area_func[6].set_color(YELLOW_C) + box_area_func[7].set_color(ORANGE) + + box_area_func_2 = TexMobject("Area =", "Length", "\\times", "Breadth", "\\times", "Height").move_to(4*LEFT+3.5*UP).scale(0.6) + box_area_func_2[0].set_color(GREEN_C) + box_area_func_2[1].set_color(BLUE_C) + box_area_func_2[3].set_color(PURPLE) + box_area_func_2[5].set_color(YELLOW_C) + + + self.set_camera_orientation(phi=70 * 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(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(ShowCreation(box), ShowCreation(braces_rectangle_x_y_0)) + self.add_fixed_orientation_mobjects(braces_rectangle_x_y_0_text) + self.play(ShowCreation(braces_rectangle_y_z_1)) + self.add_fixed_orientation_mobjects(braces_rectangle_y_z_1_text) + self.play(ShowCreation(braces_rectangle_x_z_2)) + self.add_fixed_orientation_mobjects(braces_rectangle_x_z_2_text) + self.wait(2) + + self.move_camera(phi=60* DEGREES,theta=80*DEGREES) + self.add_fixed_in_frame_mobjects(box_area_func) + self.play(Write(box_area_func)) + self.wait() + + + self.play(ReplacementTransform(box_area_func,box_area_func_2)) + self.add_fixed_in_frame_mobjects(box_area_func_2) + + + self.wait(3) \ No newline at end of file -- cgit From 90e3c80b13fa66693a03858999644982157f06b2 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 3 Jul 2020 19:56:01 +0530 Subject: Delete file1_multivar_func_examples.gif --- .../gifs/file1_multivar_func_examples.gif | Bin 1440511 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif deleted file mode 100644 index 43c3a42..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif and /dev/null differ -- cgit From 6cbec5e50a290209cc5e1d619de81df32f4b83ca Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 3 Jul 2020 19:56:31 +0530 Subject: Add files via upload --- .../gifs/file1_multivar_func_examples.gif | Bin 0 -> 1453898 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif new file mode 100644 index 0000000..d078fb9 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file1_multivar_func_examples.gif differ -- cgit From 71e2d324f507de92f97a96b223e69e0e8da17b48 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 10 Jul 2020 19:04:47 +0530 Subject: Delete Multivariable_Functions_Quiz.pdf --- .../Multivariable_Functions_Quiz.pdf | Bin 109631 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf deleted file mode 100644 index 7895843..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf and /dev/null differ -- cgit From 3dc783b7e274aef55572c7642c491229826dc6e6 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 10 Jul 2020 19:05:00 +0530 Subject: Add files via upload --- .../Multivariable_Functions_Quiz.pdf | Bin 0 -> 108179 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf new file mode 100644 index 0000000..1155206 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf differ -- cgit From 9bba6d8d3f567dd5b04d1aedf0d7750a9a2d3eed Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 10 Jul 2020 19:06:25 +0530 Subject: Delete Multivariable_Functions_Quiz.pdf --- .../Multivariable_Functions_Quiz.pdf | Bin 108179 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf deleted file mode 100644 index 1155206..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf and /dev/null differ -- cgit From db8149cefa1fd09d46b3c6e01810c34c824276d4 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Fri, 10 Jul 2020 19:06:41 +0530 Subject: Add files via upload --- .../Multivariable_Functions_Quiz.pdf | Bin 0 -> 108179 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf new file mode 100644 index 0000000..1155206 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/Multivariable_Functions_Quiz.pdf differ -- cgit From 0e1744bab2d394a096b72133c9aa9dd28b3831d3 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:04:56 +0530 Subject: Delete file2_multivariable_func_respresentation.py --- .../file2_multivariable_func_respresentation.py | 98 ---------------------- 1 file changed, 98 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py deleted file mode 100644 index d10ff0a..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py +++ /dev/null @@ -1,98 +0,0 @@ -from manimlib.imports import * - -class MultivariableFunc(Scene): - def construct(self): - - topic = TextMobject("Multivariable Functions") - topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - topic.scale(1.5) - - self.play(Write(topic)) - self.wait() - self.play(FadeOut(topic)) - - - #circle = Circle() - #circle.scale(3) - - scalar_function = TextMobject("Scalar Valued Function") - scalar_function.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - scalar_function.scale(1.5) - scalar_function.move_to(2.5*UP) - - rectangle = Rectangle(height = 2, width = 4) - rectangle.set_color(PURPLE) - - eqn1 = TextMobject(r"f(x,y) = $x^2y$") - eqn1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) - - - - number1 = TextMobject("(2,1)") - number1.move_to(2.5*UP+ 4*LEFT) - number1.scale(1.2) - number1.set_color(ORANGE) - - output1 = TextMobject("4") - output1.scale(1.5) - output1.set_color(BLUE_C) - output1.move_to(3*RIGHT) - - eqn1_1 = TextMobject(r"f(2,1) = $2^2(1)$") - eqn1_1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) - - - self.play(Write(eqn1),ShowCreation(rectangle)) - self.wait() - self.play(ApplyMethod(number1.move_to, 3*LEFT)) - self.play(FadeOut(number1)) - self.play(Transform(eqn1, eqn1_1)) - self.wait() - self.play(ApplyMethod(output1.move_to, 2.5*DOWN+4*RIGHT)) - self.wait() - self.play(Write(scalar_function)) - self.play(FadeOut(output1), FadeOut(scalar_function), FadeOut(eqn1)) - - - vector_function = TextMobject("Vector Valued Function") - vector_function.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - vector_function.scale(1.5) - vector_function.move_to(2.5*UP) - - - eqn2 = TextMobject(r"f(x,y,z) = $ \begin{bmatrix} x^2y \\ 2yz \end{bmatrix}$") - eqn2.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - - number2 = TextMobject("(2,1,3)") - number2.move_to(2.5*UP+ 4*LEFT) - number2.scale(1.2) - number2.set_color(ORANGE) - - output2 = TextMobject(r"$ \begin{bmatrix} 4 \\ 6 \end{bmatrix}$") - #output2.scale(1.5) - output2.set_color(BLUE_C) - output2.move_to(3*RIGHT) - - #eqn2_1 = TextMobject(r"f(2,1,3) = $2^2(1) + 2(1)(3)$") - #eqn2_1.set_color(YELLOW) - - #eqn2_2 = TextMobject(r"f(2,1,3) = $2 + 6$") - #eqn2_2.set_color(YELLOW) - - - self.play(Write(eqn2)) - - self.wait() - self.play(ApplyMethod(number2.move_to, 3*LEFT)) - self.play(FadeOut(number2)) - - #self.play(Transform(eqn2, eqn2_1)) - #self.wait(1) - #self.play(Transform(eqn2, eqn2_2)) - #self.wait(1) - - self.play(ApplyMethod(output2.move_to, 2.5*DOWN+4*RIGHT)) - self.wait() - self.play(Write(vector_function)) - self.play(FadeOut(output2),FadeOut(eqn2), FadeOut(vector_function), FadeOut(rectangle)) - self.wait() \ No newline at end of file -- cgit From c4b083a8a4b5665a2df7683cdd2d7b981a7abc53 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:05:19 +0530 Subject: Add files via upload --- .../file2_multivariable_func_respresentation.py | 148 +++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py new file mode 100644 index 0000000..e413e02 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file2_multivariable_func_respresentation.py @@ -0,0 +1,148 @@ +from manimlib.imports import * + +class MultivariableFunc(Scene): + def construct(self): + + topic = TextMobject("Multivariable Functions") + topic.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + topic.scale(1.5) + + self.play(Write(topic)) + self.wait() + self.play(FadeOut(topic)) + + + scalar_function = TextMobject("Scalar Valued Function") + scalar_function.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + scalar_function.scale(1.5) + scalar_function.move_to(2.5*UP) + + rectangle = Rectangle(height = 2, width = 4) + rectangle.set_color(PURPLE) + + eqn1 = TextMobject(r"f(x,y) = $x^2y$") + eqn1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) + + + + number1 = TextMobject("(2,1)") + number1.move_to(2.5*UP+ 4*LEFT) + number1.scale(1.2) + number1.set_color(ORANGE) + + output1 = TextMobject("4") + output1.scale(1.5) + output1.set_color(BLUE_C) + output1.move_to(3*RIGHT) + + eqn1_1 = TextMobject(r"f(2,1) = $2^2(1)$") + eqn1_1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) + + + self.play(Write(eqn1),ShowCreation(rectangle)) + self.wait() + self.play(ApplyMethod(number1.move_to, 3*LEFT)) + self.play(FadeOut(number1)) + self.play(Transform(eqn1, eqn1_1)) + self.wait() + self.play(ApplyMethod(output1.move_to, 2.5*DOWN+4*RIGHT)) + self.wait() + self.play(Write(scalar_function)) + self.play(FadeOut(output1), FadeOut(scalar_function), FadeOut(eqn1)) + + + vector_function = TextMobject("Vector Valued Function") + vector_function.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + vector_function.scale(1.5) + vector_function.move_to(2.5*UP) + + + eqn2 = TextMobject(r"f(x,y,z) = $ \begin{bmatrix} x^2y \\ 2yz \end{bmatrix}$") + eqn2.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + + number2 = TextMobject("(2,1,3)") + number2.move_to(2.5*UP+ 4*LEFT) + number2.scale(1.2) + number2.set_color(ORANGE) + + output2 = TextMobject(r"$ \begin{bmatrix} 4 \\ 6 \end{bmatrix}$") + output2.set_color(BLUE_C) + output2.move_to(3*RIGHT) + + + + self.play(Write(eqn2)) + + self.wait() + self.play(ApplyMethod(number2.move_to, 3*LEFT)) + self.play(FadeOut(number2)) + + self.play(ApplyMethod(output2.move_to, 2.5*DOWN+4*RIGHT)) + self.wait() + self.play(Write(vector_function)) + self.play(FadeOut(output2),FadeOut(eqn2), FadeOut(vector_function), FadeOut(rectangle)) + self.wait() + + + +class VectorValuedFunc(Scene): + def construct(self): + numberplane = NumberPlane() + + rectangle = Rectangle(height = 1, width = 2, color = PURPLE).move_to(2.5*UP+5*RIGHT) + + eqn = TextMobject(r"f(x,y) = $ \begin{bmatrix} xy \\ \frac{y}{x} \end{bmatrix}$").scale(0.6).move_to(2.5*UP+5*RIGHT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + + dot1 = Dot().set_color(PINK).move_to(np.array([2,2,0])) + + number1 = TextMobject("(2,2)").scale(0.6).next_to(dot1, RIGHT).set_color(PINK) + + output1 = TextMobject(r"$ \begin{bmatrix} 4 \\ 1 \end{bmatrix}$").scale(0.6).set_color(YELLOW_C).move_to(2.5*UP+6.5*RIGHT) + + vector1 = Arrow(np.array([2,2,0]), np.array([4,1,0]), color = RED_C, buff = 0.01, tip_length = 0.25) + + dot2 = Dot().set_color(PINK).move_to(np.array([-1,2,0])) + + number2 = TextMobject("(-1,2)").scale(0.6).next_to(dot2, RIGHT).set_color(PINK) + + output2 = TextMobject(r"$ \begin{bmatrix} -2 \\ -2 \end{bmatrix}$").scale(0.6).set_color(YELLOW_C).move_to(2.5*UP+6.5*RIGHT) + + vector2 = Arrow(np.array([-1,2,0]), np.array([-2,-2,0]), color = RED_C, buff = 0.01, tip_length = 0.25) + + + vector_valued_function = TextMobject("Vector Valued Function").move_to(2.5*UP+3*LEFT).set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + + + self.play(ShowCreation(numberplane)) + self.wait() + self.play(ShowCreation(rectangle), ShowCreation(eqn)) + self.wait() + self.play(ShowCreation(dot1), ShowCreation(number1)) + self.wait(0.5) + self.play(ApplyMethod(number1.move_to, 2.5*UP+ 3.5*RIGHT)) + self.wait(0.5) + self.play(FadeOut(number1)) + self.wait(0.5) + self.play(ShowCreation(output1)) + self.wait(0.5) + self.play(ShowCreation(vector1)) + self.wait(0.5) + self.play(ApplyMethod(output1.move_to, 1*UP+ 4.5*RIGHT)) + self.wait() + + + self.play(ShowCreation(dot2), ShowCreation(number2)) + self.wait(0.5) + self.play(ApplyMethod(number2.move_to, 2.5*UP+ 3.5*RIGHT)) + self.wait(0.5) + self.play(FadeOut(number2)) + self.wait(0.5) + self.play(ShowCreation(output2)) + self.wait(0.5) + self.play(ShowCreation(vector2)) + self.wait(0.5) + self.play(ApplyMethod(output2.move_to, 2*DOWN+ 2.5*LEFT)) + self.wait() + self.play(Write(vector_valued_function)) + self.wait(2) + -- cgit From 438c82b8acece26f40be3f70873f272c8ede2fec Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:07:34 +0530 Subject: Delete file3_sphere.py --- .../multivariable-functions/file3_sphere.py | 177 --------------------- 1 file changed, 177 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py deleted file mode 100644 index 86239ae..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py +++ /dev/null @@ -1,177 +0,0 @@ -from manimlib.imports import * - -class Sphere(ThreeDScene): - def construct(self): - axes = ThreeDAxes() # creates a 3D Axis - - text3d = TextMobject(r"$f(x,y) \rightarrow Point(x,y,z)$") - text3d1 = TextMobject(r"$f(x,y) \rightarrow Point(x,y, \sqrt{r^2 - x^2 - y^2})$") - self.add_fixed_in_frame_mobjects(text3d) - text3d.scale(0.7) - text3d1.scale(0.7) - text3d.to_corner(UL) - text3d1.to_corner(UL) - text3d.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - text3d1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - self.play(Write(text3d)) - self.wait(1) - - self.play(Transform(text3d,text3d1)) - self.add_fixed_in_frame_mobjects(text3d1) - self.play(FadeOut(text3d)) - - sphere = ParametricSurface( - lambda u, v: np.array([ - 2*np.sin(u)*np.cos(v), - 2*np.sin(u)*np.sin(v), - 2*np.cos(u) - ]),u_min=0,u_max=PI,v_min=0,v_max=2*PI,checkerboard_colors=[RED_D, RED_E], - resolution=(15, 32)).scale(1) - - - #Experiment with circles by changing difference value of u and v - ''' - sphere_points = [np.array([2*np.sin(u*DEGREES)*np.cos(v*DEGREES), 2*np.sin(u*DEGREES)*np.sin(v*DEGREES), 2*np.cos(u*DEGREES)]) for u in range(0, 185, 5) for v in range(0, 365, 5)] - - sphere_spheres = [Dot().move_to(pts) for pts in sphere_points] - - sphere = VGroup(*sphere_spheres) - ''' - - self.set_camera_orientation(phi=75 * 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]) - - dot_x_y1 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([-1,1,0])) - dot_x_y_z1 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([-1,1,1.414])) - dot_x_y_z_1 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([-1,1,-1.414])) - line1 = DashedLine(np.array([-1,1,-1.414]), np.array([-1,1,1.414]), color = YELLOW_C) - - point_x_y1 = TexMobject("(-1,1,0)").set_color(BLUE_C).move_to(np.array([-1.5,1.5,0])).scale(0.5) - point_x_y_z1 = TexMobject("(-1,1,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) - point_x_y_z1_2 = TexMobject("(-1,1,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) - point_x_y_z1_3 = TexMobject("(-1,1,\\sqrt{4 - 1 - 1})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) - point_x_y_z1_4 = TexMobject("(-1,1,\\sqrt{2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) - point_x_y_z1_5 = TexMobject("(-1,1,1.414)").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) - - point_x_y_z_1 = TexMobject("(-1,1,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,-1.414])).scale(0.5) - point_x_y_z_1_2 = TexMobject("(-1,1,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,-1.414])).scale(0.5) - point_x_y_z_1_3 = TexMobject("(-1,1,\\sqrt{4 - 1 - 1})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,-1.414])).scale(0.5) - point_x_y_z_1_4 = TexMobject("(-1,1,\\sqrt{2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,-1.414])).scale(0.5) - point_x_y_z_1_5 = TexMobject("(-1,1,-1.414)").set_color(BLUE_C).move_to(np.array([-1.5,1.5,-1.414])).scale(0.5) - - - self.play(ShowCreation(dot_x_y1)) - self.add_fixed_orientation_mobjects(point_x_y1) - self.play(ShowCreation(dot_x_y_z1), ShowCreation(dot_x_y_z_1), ShowCreation(line1)) - self.add_fixed_orientation_mobjects(point_x_y_z1, point_x_y_z_1) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z1,point_x_y_z1_2), ReplacementTransform(point_x_y_z_1,point_x_y_z_1_2)) - self.add_fixed_orientation_mobjects(point_x_y_z1_2, point_x_y_z_1_2) - - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z1_2,point_x_y_z1_3), ReplacementTransform(point_x_y_z_1_2,point_x_y_z_1_3)) - self.add_fixed_orientation_mobjects(point_x_y_z1_3, point_x_y_z_1_3) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z1_3,point_x_y_z1_4), ReplacementTransform(point_x_y_z_1_3,point_x_y_z_1_4)) - self.add_fixed_orientation_mobjects(point_x_y_z1_4, point_x_y_z_1_4) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z1_4,point_x_y_z1_5), ReplacementTransform(point_x_y_z_1_4,point_x_y_z_1_5)) - self.add_fixed_orientation_mobjects(point_x_y_z1_5, point_x_y_z_1_5) - - - - dot_x_y2 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([0.5,-0.5,0])) - dot_x_y_z2 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([0.5,-0.5,1.87])) - dot_x_y_z_2 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([0.5,-0.5,-1.87])) - line2 = DashedLine(np.array([0.5,-0.5,-1.87]), np.array([0.5,-0.5,1.87]), color = YELLOW_C) - - point_x_y2 = TexMobject("(0.5,-0.5,0)").set_color(BLUE_C).move_to(np.array([1.5,-1.5,0])).scale(0.5) - point_x_y_z2 = TexMobject("(0.5,-0.5,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) - point_x_y_z2_2 = TexMobject("(0.5,-0.5,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) - point_x_y_z2_3 = TexMobject("(0.5,-0.5,\\sqrt{4 - 0.25 - 0.25})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) - point_x_y_z2_4 = TexMobject("(0.5,-0.5,\\sqrt{3.5})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) - point_x_y_z2_5 = TexMobject("(0.5,-0.5,1.87)").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) - - point_x_y_z_2 = TexMobject("(0.5,-0.5,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,-1.87])).scale(0.5) - point_x_y_z_2_2 = TexMobject("(0.5,-0.5,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,-1.87])).scale(0.5) - point_x_y_z_2_3 = TexMobject("(0.5,-0.5,\\sqrt{4 - 0.25 - 0.25})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,-1.87])).scale(0.5) - point_x_y_z_2_4 = TexMobject("(0.5,-0.5,\\sqrt{3.5})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,-1.87])).scale(0.5) - point_x_y_z_2_5 = TexMobject("(0.5,-0.5,-1.87)").set_color(BLUE_C).move_to(np.array([1.5,-1.5,-1.87])).scale(0.5) - - - self.play(ShowCreation(dot_x_y2)) - self.add_fixed_orientation_mobjects(point_x_y2) - self.play(ShowCreation(dot_x_y_z2), ShowCreation(dot_x_y_z_2), ShowCreation(line2)) - self.add_fixed_orientation_mobjects(point_x_y_z2, point_x_y_z_2) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z2,point_x_y_z2_2), ReplacementTransform(point_x_y_z_2,point_x_y_z_2_2)) - self.add_fixed_orientation_mobjects(point_x_y_z2_2, point_x_y_z_2_2) - - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z2_2,point_x_y_z2_3), ReplacementTransform(point_x_y_z_2_2,point_x_y_z_2_3)) - self.add_fixed_orientation_mobjects(point_x_y_z2_3, point_x_y_z_2_3) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z2_3,point_x_y_z2_4), ReplacementTransform(point_x_y_z_2_3,point_x_y_z_2_4)) - self.add_fixed_orientation_mobjects(point_x_y_z2_4, point_x_y_z_2_4) - self.wait(0.5) - self.play(ReplacementTransform(point_x_y_z2_4,point_x_y_z2_5), ReplacementTransform(point_x_y_z_2_4,point_x_y_z_2_5)) - self.add_fixed_orientation_mobjects(point_x_y_z2_5, point_x_y_z_2_5) - - self.play(FadeOut(point_x_y1), FadeOut(point_x_y_z1_5), FadeOut(point_x_y_z_1_5), FadeOut(dot_x_y1), FadeOut(dot_x_y_z1), FadeOut(dot_x_y_z_1), FadeOut(line1)) - self.play(FadeOut(point_x_y2), FadeOut(point_x_y_z2_5), FadeOut(point_x_y_z_2_5), FadeOut(dot_x_y2), FadeOut(dot_x_y_z2), FadeOut(dot_x_y_z_2), FadeOut(line2)) - - - - - sphere_final = [] - - for u in range(0, 180, 15): - sphere_points1 = [np.array([2*np.sin(u*DEGREES)*np.cos(v*DEGREES), 2*np.sin(u*DEGREES)*np.sin(v*DEGREES), 2*np.cos(u*DEGREES)]) for v in range(0, 370, 10)] - sphere_dots1 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points1] - - sphere_points2 = [np.array([2*np.sin((u+5)*DEGREES)*np.cos(v*DEGREES), 2*np.sin((u+5)*DEGREES)*np.sin(v*DEGREES), 2*np.cos((u+5)*DEGREES)]) for v in range(0, 370, 10)] - sphere_dots2 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points2] - - sphere_points3 = [np.array([2*np.sin((u+10)*DEGREES)*np.cos(v*DEGREES), 2*np.sin((u+10)*DEGREES)*np.sin(v*DEGREES), 2*np.cos((u+10)*DEGREES)]) for v in range(0, 370, 10)] - sphere_dots3 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points3] - - sphere_final = sphere_final + sphere_dots1 + sphere_dots2 + sphere_dots3 - - sphere_dots = sphere_dots1 + sphere_dots2 + sphere_dots3 - - sphere_with_dots = VGroup(*sphere_dots) - self.play(ShowCreation(sphere_with_dots)) - - sphere_final_with_dots = VGroup(*sphere_final) - - - self.begin_ambient_camera_rotation(rate=0.5) - self.wait(3) - self.play(ReplacementTransform(sphere_final_with_dots, sphere)) - self.wait(5) - - - - - - - - - - - - - - - - -- cgit From af3ee5e5194098b387402475b09773a82983d887 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:07:49 +0530 Subject: Add files via upload --- .../multivariable-functions/file3_sphere.py | 145 +++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py new file mode 100644 index 0000000..fcbc410 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file3_sphere.py @@ -0,0 +1,145 @@ +from manimlib.imports import * + +class Sphere(ThreeDScene): + def construct(self): + axes = ThreeDAxes() # creates a 3D Axis + + text3d1 = TextMobject(r"$z = f(x,y) = \sqrt{r^2 - x^2 - y^2}$") + + text3d1.scale(0.7) + + text3d1.to_corner(UL) + + text3d1.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) + self.play(Write(text3d1)) + self.wait(1) + + self.add_fixed_in_frame_mobjects(text3d1) + + sphere = ParametricSurface( + lambda u, v: np.array([ + 2*np.sin(u)*np.cos(v), + 2*np.sin(u)*np.sin(v), + 2*np.cos(u) + ]),u_min=0,u_max=PI/2,v_min=0,v_max=2*PI,checkerboard_colors=[RED_D, RED_E], + resolution=(15, 32)).scale(1) + + + #Experiment with circles by changing difference value of u and v + ''' + sphere_points = [np.array([2*np.sin(u*DEGREES)*np.cos(v*DEGREES), 2*np.sin(u*DEGREES)*np.sin(v*DEGREES), 2*np.cos(u*DEGREES)]) for u in range(0, 185, 5) for v in range(0, 365, 5)] + + sphere_spheres = [Dot().move_to(pts) for pts in sphere_points] + + sphere = VGroup(*sphere_spheres) + ''' + + self.set_camera_orientation(phi=75 * 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]) + + dot_x_y1 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([-1,1,0])) + dot_x_y_z1 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([-1,1,1.414])) + + line1 = DashedLine(np.array([-1,1,0]), np.array([-1,1,1.414]), color = YELLOW_C) + + point_x_y1 = TexMobject("(-1,1,0)").set_color(BLUE_C).move_to(np.array([-1.5,1.5,0])).scale(0.5) + point_x_y_z1 = TexMobject("(-1,1,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) + point_x_y_z1_2 = TexMobject("(-1,1,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) + point_x_y_z1_3 = TexMobject("(-1,1,\\sqrt{4 - 1 - 1})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) + point_x_y_z1_4 = TexMobject("(-1,1,\\sqrt{2})").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) + point_x_y_z1_5 = TexMobject("(-1,1,1.414)").set_color(BLUE_C).move_to(np.array([-1.5,1.5,1.414])).scale(0.5) + + + self.play(ShowCreation(dot_x_y1)) + self.add_fixed_orientation_mobjects(point_x_y1) + self.play(ShowCreation(dot_x_y_z1), ShowCreation(line1)) + self.add_fixed_orientation_mobjects(point_x_y_z1) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z1,point_x_y_z1_2)) + self.add_fixed_orientation_mobjects(point_x_y_z1_2) + + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z1_2,point_x_y_z1_3)) + self.add_fixed_orientation_mobjects(point_x_y_z1_3) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z1_3,point_x_y_z1_4)) + self.add_fixed_orientation_mobjects(point_x_y_z1_4) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z1_4,point_x_y_z1_5)) + self.add_fixed_orientation_mobjects(point_x_y_z1_5) + + + + dot_x_y2 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([0.5,-0.5,0])) + dot_x_y_z2 = Dot().scale(0.75).set_fill(RED_C).move_to(np.array([0.5,-0.5,1.87])) + + line2 = DashedLine(np.array([0.5,-0.5,0]), np.array([0.5,-0.5,1.87]), color = YELLOW_C) + + point_x_y2 = TexMobject("(0.5,-0.5,0)").set_color(BLUE_C).move_to(np.array([1.5,-1.5,0])).scale(0.5) + point_x_y_z2 = TexMobject("(0.5,-0.5,\\sqrt{r^2 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) + point_x_y_z2_2 = TexMobject("(0.5,-0.5,\\sqrt{4 - x^2 - y^2})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) + point_x_y_z2_3 = TexMobject("(0.5,-0.5,\\sqrt{4 - 0.25 - 0.25})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) + point_x_y_z2_4 = TexMobject("(0.5,-0.5,\\sqrt{3.5})").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) + point_x_y_z2_5 = TexMobject("(0.5,-0.5,1.87)").set_color(BLUE_C).move_to(np.array([1.5,-1.5,1.87])).scale(0.5) + + + self.play(ShowCreation(dot_x_y2)) + self.add_fixed_orientation_mobjects(point_x_y2) + self.play(ShowCreation(dot_x_y_z2), ShowCreation(line2)) + self.add_fixed_orientation_mobjects(point_x_y_z2) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z2,point_x_y_z2_2)) + self.add_fixed_orientation_mobjects(point_x_y_z2_2) + + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z2_2,point_x_y_z2_3)) + self.add_fixed_orientation_mobjects(point_x_y_z2_3) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z2_3,point_x_y_z2_4)) + self.add_fixed_orientation_mobjects(point_x_y_z2_4) + self.wait(0.5) + self.play(ReplacementTransform(point_x_y_z2_4,point_x_y_z2_5)) + self.add_fixed_orientation_mobjects(point_x_y_z2_5) + + self.play(FadeOut(point_x_y1), FadeOut(point_x_y_z1_5)) + self.play(FadeOut(point_x_y2), FadeOut(point_x_y_z2_5)) + + + + + sphere_final = [] + + for u in range(0, 90, 15): + sphere_points1 = [np.array([2*np.sin(u*DEGREES)*np.cos(v*DEGREES), 2*np.sin(u*DEGREES)*np.sin(v*DEGREES), 2*np.cos(u*DEGREES)]) for v in range(0, 370, 10)] + sphere_dots1 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points1] + + sphere_points2 = [np.array([2*np.sin((u+5)*DEGREES)*np.cos(v*DEGREES), 2*np.sin((u+5)*DEGREES)*np.sin(v*DEGREES), 2*np.cos((u+5)*DEGREES)]) for v in range(0, 370, 10)] + sphere_dots2 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points2] + + sphere_points3 = [np.array([2*np.sin((u+10)*DEGREES)*np.cos(v*DEGREES), 2*np.sin((u+10)*DEGREES)*np.sin(v*DEGREES), 2*np.cos((u+10)*DEGREES)]) for v in range(0, 370, 10)] + sphere_dots3 = [Dot().scale(0.75).set_fill(RED_C).move_to(pts) for pts in sphere_points3] + + sphere_final = sphere_final + sphere_dots1 + sphere_dots2 + sphere_dots3 + + sphere_dots = sphere_dots1 + sphere_dots2 + sphere_dots3 + + sphere_with_dots = VGroup(*sphere_dots) + self.play(ShowCreation(sphere_with_dots)) + + sphere_final_with_dots = VGroup(*sphere_final) + + + self.begin_ambient_camera_rotation(rate=0.5) + self.wait(3) + self.play(ReplacementTransform(sphere_final_with_dots, sphere)) + self.wait(5) \ No newline at end of file -- cgit From 6e98ea022e8e27e592d905dd04c07fc07164dde5 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:09:41 +0530 Subject: Delete file4_vectorvf_sine.py --- .../multivariable-functions/file4_vectorvf_sine.py | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py deleted file mode 100644 index 06e225e..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py +++ /dev/null @@ -1,91 +0,0 @@ -from manimlib.imports import * - -class SineVectors(GraphScene): - CONFIG = { - "x_min": 0, - "x_max": 10, - "y_min": -1, - "y_max": 1, - "graph_origin": ORIGIN+4*LEFT, - #"x_labeled_nums": list(range(-5, 6)), - #"y_labeled_nums": list(range(0, 5)), - } - def construct(self): - - - - - - XTD = self.x_axis_width/(self.x_max - self.x_min) - YTD = self.y_axis_height/(self.y_max - self.y_min) - - self.setup_axes(animate = True) - - - sine1 = self.get_graph(lambda x : np.sin(x), x_min = 0, x_max = 1.575, color = GREEN) - - point1 = Dot().shift(self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT) - point1_lab = TextMobject(r"$t = (\frac{\pi}{2})$") - point1_lab.scale(0.7) - point1_lab.next_to(point1, UP) - - vector1 = Arrow(self.graph_origin, self.graph_origin+1*YTD*UP + 1.575*XTD*RIGHT, buff=0.1, color = RED) - vector1_lab = TextMobject(r"$r(\frac{\pi}{2})$", color = RED) - vector1_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.5*YTD*UP) - - self.play(GrowArrow(vector1),Write(vector1_lab)) - self.play(ShowCreation(point1), Write(point1_lab)) - self.play(ShowCreation(sine1)) - self.wait(1) - - - sine2 = self.get_graph(lambda x : np.sin(x), x_min = 1.575, x_max = 3.15, color = GREEN) - - point2 = Dot().shift(self.graph_origin+3.15*XTD*RIGHT) - point2_lab = TextMobject(r"$t = (\pi)$") - point2_lab.scale(0.7) - point2_lab.next_to(point2, UP+RIGHT) - - vector2 = Arrow(self.graph_origin, self.graph_origin+3.15*XTD*RIGHT, buff=0.1, color = BLUE) - vector2_lab = TextMobject(r"$r(\pi)$", color = BLUE) - vector2_lab.move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.15*YTD*UP) - - self.play(GrowArrow(vector2),Write(vector2_lab)) - self.play(ShowCreation(point2), Write(point2_lab)) - self.play(ShowCreation(sine2)) - self.wait(1) - - - sine3 = self.get_graph(lambda x : np.sin(x), x_min = 3.15, x_max = 4.725, color = GREEN) - - point3 = Dot().shift(self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT) - point3_lab = TextMobject(r"$t = (\frac{3\pi}{2})$") - point3_lab.scale(0.7) - point3_lab.next_to(point3, DOWN) - - vector3 = Arrow(self.graph_origin, self.graph_origin+1*YTD*DOWN + 4.725*XTD*RIGHT, buff=0.1, color = YELLOW_C) - vector3_lab = TextMobject(r"$r(\frac{3\pi}{2})$", color = YELLOW_C) - vector3_lab.move_to(self.graph_origin+2*XTD*RIGHT+ 0.7*YTD*DOWN) - - self.play(GrowArrow(vector3),Write(vector3_lab)) - self.play(ShowCreation(point3), Write(point3_lab)) - self.play(ShowCreation(sine3)) - self.wait(1) - - - sine4 = self.get_graph(lambda x : np.sin(x), x_min = 4.725, x_max = 6.3, color = GREEN) - - point4 = Dot().shift(self.graph_origin+6.3*XTD*RIGHT) - point4_lab = TextMobject(r"$t = (2\pi)$") - point4_lab.scale(0.7) - point4_lab.next_to(point4, UP+RIGHT) - - vector4 = Arrow(self.graph_origin, self.graph_origin+6.3*XTD*RIGHT, buff=0.1, color = PURPLE) - vector4_lab = TextMobject(r"$r(2\pi)$", color = PURPLE) - vector4_lab.move_to(self.graph_origin+4.5*XTD*RIGHT+ 0.15*YTD*DOWN) - - self.play(GrowArrow(vector4),Write(vector4_lab)) - self.play(ShowCreation(point4), Write(point4_lab)) - self.play(ShowCreation(sine4)) - self.wait(3) - -- cgit From b4e29874270e2af618fb57d0ab3b0a511da4370a Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:09:53 +0530 Subject: Add files via upload --- .../multivariable-functions/file4_vectorvf_sine.py | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py new file mode 100644 index 0000000..3c5bb25 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file4_vectorvf_sine.py @@ -0,0 +1,114 @@ +from manimlib.imports import * + +class SineVectors(GraphScene): + CONFIG = { + "x_min": 0, + "x_max": 10, + "y_min": -5, + "y_max": 5, + "graph_origin": ORIGIN+4*LEFT, + "x_axis_width": 7, + "y_axis_height": 7, + } + def construct(self): + + + + XTD = self.x_axis_width/(self.x_max - self.x_min) + YTD = self.y_axis_height/(self.y_max - self.y_min) + + self.setup_axes(animate = True) + + sine = self.get_graph(lambda x : np.pi*np.sin(x), x_min = 0, x_max = 6.3, color = GREEN) + + + dot1 = Dot().rotate(PI/2).set_color(RED_C) + alpha1 = ValueTracker(0) + vector1 = self.get_vector(alpha1.get_value(),sine) + dot1.add_updater(lambda m: m.move_to(vector1.get_end())) + self.play( + ShowCreation(sine), + GrowFromCenter(dot1), + GrowArrow(vector1) + ) + vector1.add_updater( + lambda m: m.become( + self.get_vector(alpha1.get_value()%1,sine) + ) + ) + self.add(vector1,dot1) + self.play(alpha1.increment_value, 1, run_time=5, rate_func=linear) + + + self.play(FadeOut(vector1), FadeOut(dot1), FadeOut(sine)) + + self.wait() + + + sine1 = self.get_graph(lambda x : np.pi*np.sin(x), x_min = 0, x_max = 1.575, color = GREEN_C) + + point1 = Dot().shift(self.graph_origin+np.pi*YTD*UP + 1.575*XTD*RIGHT) + point1_lab = TextMobject(r"$t = (\frac{\pi}{2})$", color = GREY).scale(0.6).next_to(point1, 0.5*UP) + + + vector1 = Arrow(self.graph_origin, self.graph_origin+np.pi*YTD*UP + 1.575*XTD*RIGHT, buff=0, color = RED_C, tip_length = 0.25) + vector1_lab = TextMobject(r"$r(\frac{\pi}{2})$", color = RED).scale(0.7).move_to(self.graph_origin+1.5*XTD*RIGHT+ 1.5*YTD*UP) + + self.play(GrowArrow(vector1),Write(vector1_lab)) + self.play(ShowCreation(point1), Write(point1_lab)) + self.play(ShowCreation(sine1)) + self.wait(1) + + + sine2 = self.get_graph(lambda x : np.pi*np.sin(x), x_min = 1.575, x_max = 3.15, color = GREEN_C) + + point2 = Dot().shift(self.graph_origin+3.15*XTD*RIGHT) + point2_lab = TextMobject(r"$t = (\pi)$", color = GREY).scale(0.6).next_to(point2, 0.5*UP+0.5*RIGHT) + + vector2 = Arrow(self.graph_origin, self.graph_origin+3.15*XTD*RIGHT, buff=0, color = BLUE, tip_length = 0.25) + vector2_lab = TextMobject(r"$r(\pi)$", color = BLUE).scale(0.7).move_to(self.graph_origin+1.5*XTD*RIGHT+ 0.4*YTD*UP) + + self.play(GrowArrow(vector2),Write(vector2_lab)) + self.play(ShowCreation(point2), Write(point2_lab)) + self.play(ShowCreation(sine2)) + self.wait(1) + + + sine3 = self.get_graph(lambda x : np.pi*np.sin(x), x_min = 3.15, x_max = 4.725, color = GREEN_C) + + point3 = Dot().shift(self.graph_origin+np.pi*YTD*DOWN + 4.725*XTD*RIGHT) + point3_lab = TextMobject(r"$t = (\frac{3\pi}{2})$", color = GREY).scale(0.6).next_to(point3, 0.5*DOWN) + + vector3 = Arrow(self.graph_origin, self.graph_origin+np.pi*YTD*DOWN + 4.725*XTD*RIGHT, buff=0, color = YELLOW_C, tip_length = 0.25) + vector3_lab = TextMobject(r"$r(\frac{3\pi}{2})$", color = YELLOW_C).scale(0.7).move_to(self.graph_origin+2.5*XTD*RIGHT+ 1*YTD*DOWN) + + self.play(GrowArrow(vector3),Write(vector3_lab)) + self.play(ShowCreation(point3), Write(point3_lab)) + self.play(ShowCreation(sine3)) + self.wait(1) + + + sine4 = self.get_graph(lambda x : np.pi*np.sin(x), x_min = 4.725, x_max = 6.3, color = GREEN_C) + + point4 = Dot().shift(self.graph_origin+6.3*XTD*RIGHT) + point4_lab = TextMobject(r"$t = (2\pi)$", color = GREY).scale(0.6).next_to(point4, 0.5*UP+0.5*RIGHT) + + vector4 = Arrow(self.graph_origin, self.graph_origin+6.3*XTD*RIGHT, buff=0, color = PURPLE, tip_length = 0.25) + vector4_lab = TextMobject(r"$r(2\pi)$", color = PURPLE).scale(0.7).move_to(self.graph_origin+4.5*XTD*RIGHT+ 0.4*YTD*DOWN) + + self.play(GrowArrow(vector4),Write(vector4_lab)) + self.play(ShowCreation(point4), Write(point4_lab)) + self.play(ShowCreation(sine4)) + self.wait(3) + + self.play(FadeOut(sine1), FadeOut(point1), FadeOut(point1_lab), FadeOut(vector1), FadeOut(vector1_lab), + FadeOut(sine2), FadeOut(point2), FadeOut(point2_lab), FadeOut(vector2), FadeOut(vector2_lab), + FadeOut(sine3), FadeOut(point3), FadeOut(point3_lab), FadeOut(vector3), FadeOut(vector3_lab), + FadeOut(sine4), FadeOut(point4), FadeOut(point4_lab), FadeOut(vector4), FadeOut(vector4_lab)) + + + + def get_vector(self, proportion, curve): + vector = Arrow(np.array([-4,0,0]), curve.point_from_proportion(proportion), color = ORANGE, buff=0, tip_length = 0.25) + return vector + -- cgit From d8287cdac4d80a32e1995a3f926822eac2e6e914 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:11:33 +0530 Subject: Delete file5_vectorvf_helix.py --- .../file5_vectorvf_helix.py | 92 ---------------------- 1 file changed, 92 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py deleted file mode 100644 index fc151ac..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py +++ /dev/null @@ -1,92 +0,0 @@ -from manimlib.imports import * - -class Helix(ThreeDScene): - def construct(self): - axes = ThreeDAxes() # creates a 3D Axis - - helix1=ParametricFunction( - lambda u : np.array([ - 1.5*np.cos(u), - 1.5*np.sin(u), - u/4 - ]),color=PURPLE,t_min=-TAU,t_max=TAU, - ) - - helix2=ParametricFunction( - lambda u : np.array([ - 2*np.cos(u), - 2*np.sin(u), - u/2 - ]),color=GREEN_C,t_min=-TAU,t_max=TAU, - ) - - function = TexMobject("f(", "r", ",", "\\theta", ")", "=", "[", "r", "\\cos", "\\theta", ",", "r", "\\sin" ,"\\theta", ",", "h" ,"\\theta", "]" ).scale(0.6).to_corner(UL) - function.set_color_by_tex(r"\theta", BLUE_C) - function.set_color_by_tex(r"r", RED_C) - function.set_color_by_tex(r"\cos", GREEN_C) - function.set_color_by_tex(r"\sin", YELLOW_C) - function[0].set_color(ORANGE) - function[4].set_color(ORANGE) - - - self.add_fixed_in_frame_mobjects(function) - - self.set_camera_orientation(phi=60*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]) - - - dot1 = Dot().rotate(PI/2).set_color(RED_C) - alpha1 = ValueTracker(0) - vector1 = self.get_vector(alpha1.get_value(),helix1) - dot1.add_updater(lambda m: m.move_to(vector1.get_end())) - self.play( - ShowCreation(helix1), - GrowFromCenter(dot1), - GrowArrow(vector1) - ) - vector1.add_updater( - lambda m: m.become( - self.get_vector(alpha1.get_value()%1,helix1) - ) - ) - self.add(vector1,dot1) - self.play(alpha1.increment_value, 1, run_time=10, rate_func=linear) - - - self.play(FadeOut(vector1), FadeOut(dot1)) - self.play(ReplacementTransform(helix1, helix2)) - - - dot2 = Dot().rotate(PI/2).set_color(RED_C) - alpha2 = ValueTracker(0) - vector2 = self.get_vector(alpha2.get_value(),helix2) - dot2.add_updater(lambda m: m.move_to(vector2.get_end())) - self.play( - ShowCreation(helix2), - GrowFromCenter(dot2), - GrowArrow(vector2) - ) - vector2.add_updater( - lambda m: m.become( - self.get_vector(alpha2.get_value()%1,helix2) - ) - ) - self.add(vector2,dot2) - self.play(alpha2.increment_value, 1, run_time=10, rate_func=linear) - self.wait() - - - - def get_vector(self, proportion, curve): - vector = Line(np.array([0,0,0]), curve.point_from_proportion(proportion), color = YELLOW_C, buff=0) - return vector \ No newline at end of file -- cgit From c2dba9cce931e58d2d097771d93af7d24be2532c Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:11:54 +0530 Subject: Add files via upload --- .../file5_vectorvf_helix.py | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py new file mode 100644 index 0000000..c02f540 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/file5_vectorvf_helix.py @@ -0,0 +1,99 @@ +from manimlib.imports import * + +class Helix(ThreeDScene): + def construct(self): + axes = ThreeDAxes() # creates a 3D Axis + + helix1=ParametricFunction( + lambda u : np.array([ + 1.5*np.cos(u), + 1.5*np.sin(u), + u/4 + ]),color=PURPLE,t_min=-TAU,t_max=TAU, + ) + + helix2=ParametricFunction( + lambda u : np.array([ + 2*np.cos(u), + 2*np.sin(u), + u/2 + ]),color=GREEN_C,t_min=-TAU,t_max=TAU, + ) + + + function = TexMobject("f(", "r", ",", "\\theta", ")", "=", "{ \\begin{bmatrix} r \\cos\\theta \\\ r \\sin \\theta \\\ h \\theta \\end{bmatrix}}" ).scale(0.6).to_corner(UL) + + function.set_color_by_tex(r"\theta", BLUE_C) + function.set_color_by_tex(r"r", RED_C) + function.set_color_by_tex(r"\cos", GREEN_C) + function.set_color_by_tex(r"\sin", YELLOW_C) + function[0].set_color(ORANGE) + function[4].set_color(ORANGE) + + + + slope_text = TextMobject(r"$\theta = $").move_to(3*UP+3*RIGHT) + number = DecimalNumber(0,unit=r" rad", color=RED_C).next_to(slope_text, RIGHT) + + + self.add_fixed_in_frame_mobjects(function,slope_text, number) + + self.set_camera_orientation(phi=60*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]) + + + dot1 = Dot().rotate(PI/2).set_color(RED_C) + alpha1 = ValueTracker(0) + vector1 = self.get_vector(alpha1.get_value(),helix1) + dot1.add_updater(lambda m: m.move_to(vector1.get_end())) + number.add_updater(lambda m: m.set_value(alpha1.get_value()*4*np.pi)) + number.add_updater(lambda m: self.add_fixed_in_frame_mobjects(m)) + + + self.play( + ShowCreation(helix1), + GrowFromCenter(dot1), + GrowArrow(vector1) + + ) + + vector1.add_updater( + lambda m: m.become( + self.get_vector(alpha1.get_value()%1,helix1) + ) + ) + + + + self.add(vector1,dot1) + + + self.play(alpha1.increment_value, 1, run_time=10, rate_func=linear) + + + self.play(FadeOut(vector1), FadeOut(dot1), FadeOut(number)) + + self.move_camera(phi=0* DEGREES,theta=90*DEGREES) + + alpha1 = ValueTracker(0) + + self.add(vector1,dot1) + + + self.play(alpha1.increment_value, 1, run_time=10, rate_func=linear) + + + + def get_vector(self, proportion, curve): + vector = Line(np.array([0,0,0]), curve.point_from_proportion(proportion), color = YELLOW_C, buff=0) + return vector \ No newline at end of file -- cgit From 9fbc860b2d108c38a48e970eb2e8642afc7edeea Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:13:16 +0530 Subject: Delete file2_multivariable_func_respresentation.gif --- .../gifs/file2_multivariable_func_respresentation.gif | Bin 1828325 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif deleted file mode 100644 index 8c4506c..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif and /dev/null differ -- cgit From 4d62c80935deb4078369dae2cf3e97349cb306e0 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:13:27 +0530 Subject: Delete file3_sphere.gif --- .../multivariable-functions/gifs/file3_sphere.gif | Bin 5971004 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif deleted file mode 100644 index 3e35ec8..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif and /dev/null differ -- cgit From f6f326b3063c1912a70c6222dcaf6e74cf53f791 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:13:37 +0530 Subject: Delete file4_vectorvf_sine.gif --- .../gifs/file4_vectorvf_sine.gif | Bin 283795 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif deleted file mode 100644 index 215459e..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif and /dev/null differ -- cgit From c080a4cf326672b0065f00ff4939fc738a1bcf12 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:13:46 +0530 Subject: Delete file5_vectorvf_helix.gif --- .../gifs/file5_vectorvf_helix.gif | Bin 654632 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif deleted file mode 100644 index c3d37f6..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif and /dev/null differ -- cgit From fcfa5ea8a481ad6e802e29e370c0a64d87619f08 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:20:29 +0530 Subject: Add files via upload --- .../gifs/file2_multivariable_func_respresentation.gif | Bin 0 -> 1850503 bytes .../multivariable-functions/gifs/file3_sphere.gif | Bin 0 -> 4653900 bytes .../gifs/file4_vectorvf_sine.gif | Bin 0 -> 283795 bytes .../gifs/file5_vectorvf_helix.gif | Bin 0 -> 1700964 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif new file mode 100644 index 0000000..83faaa6 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file2_multivariable_func_respresentation.gif differ diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif new file mode 100644 index 0000000..86fa8fe Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file3_sphere.gif differ diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif new file mode 100644 index 0000000..215459e Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif differ diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif new file mode 100644 index 0000000..bee019c Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file5_vectorvf_helix.gif differ -- cgit From a5e5868c72e6bed9ea2996485f4e1b313aee6eac Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:24:54 +0530 Subject: Delete file4_vectorvf_sine.gif --- .../gifs/file4_vectorvf_sine.gif | Bin 283795 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif deleted file mode 100644 index 215459e..0000000 Binary files a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif and /dev/null differ -- cgit From 8011e2c8f700f1aee69fbbc5938ed68cc90d8f02 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Sat, 25 Jul 2020 11:25:44 +0530 Subject: Add files via upload --- .../gifs/file4_vectorvf_sine.gif | Bin 0 -> 623433 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif new file mode 100644 index 0000000..b6a266f Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-functions/gifs/file4_vectorvf_sine.gif differ -- cgit