diff options
author | Vaishnavi | 2020-06-24 05:01:05 +0530 |
---|---|---|
committer | GitHub | 2020-06-24 05:01:05 +0530 |
commit | f61bef8de2ee952f3dbb73fd148024931426e427 (patch) | |
tree | 4e06a6d4c8abc6b2b9a94a8e7137b54005f2a18c /FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations | |
parent | cf4ac5da5fd0cd1322bcdbd5ef8e2d641fc8bdf4 (diff) | |
download | FSF-mathematics-python-code-archive-f61bef8de2ee952f3dbb73fd148024931426e427.tar.gz FSF-mathematics-python-code-archive-f61bef8de2ee952f3dbb73fd148024931426e427.tar.bz2 FSF-mathematics-python-code-archive-f61bef8de2ee952f3dbb73fd148024931426e427.zip |
Rename FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py to FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py
Diffstat (limited to 'FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations')
-rw-r--r-- | FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py b/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py deleted file mode 100644 index 4c17f90..0000000 --- a/FSF-2020/approximations-and-optimizations/Tangent-Plane-Approximations/file1_Tangent_Plane.py +++ /dev/null @@ -1,50 +0,0 @@ -from manimlib.imports import* - -#---- tangent plane is parallel to the surface of the funtion at a point -class firstScene(ThreeDScene): - def construct(self): - - s1_text=TextMobject("Suppose, the point $(x,y)$ lies on the surface of the function.").scale(0.5).shift(2*UP) - s2_text=TextMobject("When zooming on that point, the surface would appear more and more like a plane.").scale(0.5).shift(1*UP) - s3_text=TextMobject("This plane is called the tangent plane.").scale(0.5) - - #---- graph of function f(x,y) = -x^2-y^2 - - f = ParametricSurface( - lambda u, v: np.array([ - u, - v, - -u**2-v**2 - ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_B,YELLOW_C,YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(1) - - - d = Dot([0,0,0],color = '#800000') #---- critical point - - r = Rectangle(color = PURPLE,fill_opacity=0.2).shift([0.1,0,0]).scale(0.3) #---- tangent plane - - s = ParametricSurface( - lambda u, v: np.array([ - u, - v, - -u**2-v**2 - ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [YELLOW_B,YELLOW_C,YELLOW_D, YELLOW_E]).shift([0,0,0]).scale(3.5) - - d2 = Dot([0,0,2.5],color = '#800000') #---- changing position of critical point - - r2 = Rectangle(color = PURPLE,fill_opacity=0.5).shift([0.1,0,2.5]).scale(0.3) #---- changing position of tangent plane - - self.set_camera_orientation(phi = 50 * DEGREES, theta = 45 * DEGREES) - self.add_fixed_in_frame_mobjects(s1_text) - self.add_fixed_in_frame_mobjects(s2_text) - self.add_fixed_in_frame_mobjects(s3_text) - self.wait(2) - self.play(FadeOut(s1_text)) - self.play(FadeOut(s2_text)) - self.play(FadeOut(s3_text)) - self.wait(1) - self.play(Write(f)) - self.play(Write(d)) - self.play(Write(r)) - self.wait(2) - self.play(ReplacementTransform(f,s),ReplacementTransform(d,d2),ReplacementTransform(r,r2)) - self.wait(2) |