summaryrefslogtreecommitdiff
path: root/FSF-2020
diff options
context:
space:
mode:
authorVaishnavi2020-05-26 03:23:18 +0530
committerGitHub2020-05-26 03:23:18 +0530
commitc09da0b478863bfcfa05ce0a687717cbbc3445aa (patch)
tree5ba6ac531733c9cd52a380c930c048f0165d26a2 /FSF-2020
parent42c96d26831f9b99a3f01e52e6a51b3cdce4ceb5 (diff)
downloadFSF-mathematics-python-code-archive-c09da0b478863bfcfa05ce0a687717cbbc3445aa.tar.gz
FSF-mathematics-python-code-archive-c09da0b478863bfcfa05ce0a687717cbbc3445aa.tar.bz2
FSF-mathematics-python-code-archive-c09da0b478863bfcfa05ce0a687717cbbc3445aa.zip
Update example.py
Diffstat (limited to 'FSF-2020')
-rw-r--r--FSF-2020/approximations-and-optimizations/Critical Points/example.py41
1 files changed, 2 insertions, 39 deletions
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/example.py b/FSF-2020/approximations-and-optimizations/Critical Points/example.py
index bdbb6ed..3a41be7 100644
--- a/FSF-2020/approximations-and-optimizations/Critical Points/example.py
+++ b/FSF-2020/approximations-and-optimizations/Critical Points/example.py
@@ -18,33 +18,8 @@ class ExampleAnimation(ThreeDScene):
]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [PURPLE_D, PURPLE_E],
resolution=(20, 20)).scale(1)
- fx_text = TextMobject("$\\frac{\\partial f}{\\partial x} = 4x-1+y$").to_corner(UL)
-
- #----fx = 4x-1+y
- fx = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- 4*u-1+v
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [BLUE_D, BLUE_E],
- resolution = (20, 20)).scale(1)
-
- fy_text = TextMobject("$\\frac{\\partial f}{\\partial y} = -6y+1+x$").to_corner(UL)
-
- #----fy = -6y+1+x
- fy = ParametricSurface(
- lambda u, v: np.array([
- u,
- v,
- -6*v+1+u
- ]),v_min = -1, v_max = 1, u_min = -1, u_max = 1, checkerboard_colors = [RED_D, RED_E],
- resolution = (20, 20)).scale(1)
-
self.set_camera_orientation(phi = 75 * DEGREES)
- self.begin_ambient_camera_rotation(rate=0.2)
-
- group1 = VGroup(axes,f,d,d_text,r_text,f_text)
- group2 = VGroup(axes,fx,fx_text)
+ self.begin_ambient_camera_rotation(rate=0.5)
self.add_fixed_in_frame_mobjects(f_text)
self.wait(1)
@@ -54,16 +29,4 @@ class ExampleAnimation(ThreeDScene):
self.add_fixed_in_frame_mobjects(d_text)
self.wait(1)
self.add_fixed_in_frame_mobjects(r_text)
- self.wait(2)
- self.play(FadeOut(group1))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(fx_text)
- self.add(axes)
- self.play(Write(fx))
- self.wait(2)
- self.play(FadeOut(group2))
- self.wait(1)
- self.add_fixed_in_frame_mobjects(fy_text)
- self.add(axes)
- self.play(Write(fy))
- self.wait(2)
+ self.wait(3)