summaryrefslogtreecommitdiff
path: root/FSF-2020/approximations-and-optimizations
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/approximations-and-optimizations')
-rw-r--r--FSF-2020/approximations-and-optimizations/Critical Points/motivation.py30
-rw-r--r--FSF-2020/approximations-and-optimizations/Critical Points/theorem.py55
2 files changed, 0 insertions, 85 deletions
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py b/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py
deleted file mode 100644
index 27354ef..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/motivation.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from manimlib.imports import*
-
-class MotivationAnimation(Scene):
- def construct(self):
-
- r = Rectangle(height = 7,breadth = 2,color = BLUE, fill_opacity = 0.3).scale(0.6) #----metal strip
- b = Brace(r,UP)
- r_text = TextMobject("$x$ metres",color = YELLOW).shift(3*UP)
- m_text = TextMobject("Metal Strip").shift(3*DOWN)
- a = Arc(radius=2).rotate(1).shift(LEFT+0.5*UP)
- a2 = Arc(radius=2).rotate(5).shift(0.7*LEFT+0.9*UP).scale(0.2)
- START = [1,0,0]
- END = [0,3,0]
- l = Line(START,END,color = RED).shift(0.9*DOWN)
- a2_text = TextMobject("$\\theta$",color = PINK).shift(1.6*UP+0.4*RIGHT)
-
- group1 = VGroup(r_text,b,a,l,a2,a2_text)
- f_text = TextMobject("$A = f(x,\\theta)$").shift(2*DOWN)
-
- ring = Annulus(inner_radius = 0.7, outer_radius = 1, color = BLUE) #--bent metal strip
-
- self.play(Write(r))
- self.wait(1)
- self.play(ShowCreation(m_text))
- self.wait(1)
- self.play(Write(group1))
- self.wait(2)
- self.play(FadeOut(group1))
- self.wait(1)
- self.play(ReplacementTransform(r,ring),ShowCreation(f_text))
diff --git a/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py b/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py
deleted file mode 100644
index 7c82aa9..0000000
--- a/FSF-2020/approximations-and-optimizations/Critical Points/theorem.py
+++ /dev/null
@@ -1,55 +0,0 @@
-from manimlib.imports import*
-
-class TheoremAnimation(ThreeDScene):
- def construct(self):
-
- axes = ThreeDAxes()
-
- #----parabola: x**2+y**2
- parabola1 = 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 = [TEAL_E],
- resolution = (20, 20)).scale(1)
-
- #----parabola: -x**2-y**2
- parabola2 = 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 = [PURPLE_E,PURPLE_E],
- resolution = (20, 20)).scale(1)
-
- self.set_camera_orientation(phi = 75 * DEGREES)
- self.begin_ambient_camera_rotation(rate = 0.4)
-
- d = Dot(np.array([0,0,0]), color = '#800000') #---- critical point
- r = Rectangle(fill_color = '#C0C0C0',fill_opacity = 0.3).move_to(ORIGIN) #----tangent plane
-
- parabola1_text = TextMobject("Maximum with horizontal tangent plane").scale(0.7).to_corner(UL)
-
- parabola2_text = TextMobject("Minimum with horizontal tangent plane").scale(0.7).to_corner(UL)
-
- self.add(axes)
- self.add_fixed_in_frame_mobjects(parabola2_text)
- self.wait(1)
- self.play(Write(parabola1))
- self.wait(1)
- self.play(ShowCreation(d))
- self.wait(1)
- self.play(ShowCreation(r))
- self.wait(2)
- self.play(FadeOut(parabola2_text),FadeOut(parabola1),FadeOut(r),FadeOut(d))
-
- self.wait(1)
- self.add_fixed_in_frame_mobjects(parabola1_text)
- self.wait(1)
- self.play(Write(parabola2))
- self.wait(1)
- self.play(ShowCreation(d))
- self.wait(1)
- self.play(ShowCreation(r))
- self.wait(2)