From d19e96406447a0cc155896d6a73c7e9d9647897b Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Wed, 1 Jul 2020 11:46:09 +0530 Subject: Delete file3_parabola_example.py --- .../scalar-functions/file3_parabola_example.py | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py') 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 deleted file mode 100644 index 74dc063..0000000 --- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py +++ /dev/null @@ -1,35 +0,0 @@ -from manimlib.imports import * - -class Parabola(ThreeDScene): - def construct(self): - axes = ThreeDAxes() # creates a 3D Axis - - paraboloid = ParametricSurface( - lambda u, v: np.array([ - 2*np.cosh(u)*np.cos(v), - 2*np.cosh(u)*np.sin(v), - 2*np.sinh(u) - ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E], - resolution=(15, 32)) - - text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", "z = f(x,y)") - self.add_fixed_in_frame_mobjects(text3d) - text3d[0].move_to(4*LEFT+2*DOWN) - text3d[1].next_to(text3d[0], DOWN) - text3d[0].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE) - text3d[1].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) - - #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES) - self.move_camera(phi=110* DEGREES,theta=45*DEGREES) - self.add(axes) - self.play(ShowCreation(paraboloid)) - self.play(Write(text3d[0])) - self.play(Write(text3d[1])) - self.begin_ambient_camera_rotation(rate=0.2) - self.wait(3) - self.move_camera(phi=0 * DEGREES,theta=180*DEGREES,run_time=3) - self.wait(3) - self.move_camera(phi=110* DEGREES,theta=90*DEGREES,run_time=3) - self.wait(3) - - \ No newline at end of file -- cgit From 49ced9e502d4c0bb930731d37d1223d9b34d01d5 Mon Sep 17 00:00:00 2001 From: nishanpoojary Date: Wed, 1 Jul 2020 11:48:28 +0530 Subject: Added updated scalar-functions folder --- .../scalar-functions/file3_parabola_example.py | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py') diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py new file mode 100644 index 0000000..63c16b3 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/scalar-functions/file3_parabola_example.py @@ -0,0 +1,47 @@ +from manimlib.imports import * + +class Parabola(ThreeDScene): + def construct(self): + axes = ThreeDAxes() # creates a 3D Axis + + paraboloid = ParametricSurface( + lambda u, v: np.array([ + 2*np.cosh(u)*np.cos(v), + 2*np.cosh(u)*np.sin(v), + 2*np.sinh(u) + ]),v_min=0,v_max=TAU,u_min=0,u_max=2,checkerboard_colors=[YELLOW_D, YELLOW_E],# + resolution=(15, 32)) + + text3d = TextMobject(r"Plot of $f: \mathbb{R}^2 \rightarrow \mathbb{R}$", 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) + text3d[1].set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE) + + #self.set_camera_orientation(phi=0 * DEGREES,theta=270*DEGREES) + self.move_camera(phi=110* DEGREES,theta=45*DEGREES) + + self.add(axes) + + 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) + self.wait(3) + self.move_camera(phi=0 * DEGREES,theta=180*DEGREES,run_time=3) + self.wait(3) + self.move_camera(phi=110* DEGREES,theta=90*DEGREES,run_time=3) + self.wait(3) + + \ No newline at end of file -- cgit