summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py314
1 files changed, 235 insertions, 79 deletions
diff --git a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py
index 803c122..052b1eb 100644
--- a/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py
+++ b/FSF-2020/calculus-of-several-variables/multivariable-functions-and-paritial-derivatives/multivariable-limits-and-continuity/file1_epsilon_delta_defn.py
@@ -2,8 +2,7 @@ from manimlib.imports import *
class EpsilonDelta(ThreeDScene):
def construct(self):
- axes = ThreeDAxes() # creates a 3D Axis
-
+ axes = ThreeDAxes()
sphere = ParametricSurface(
lambda u, v: np.array([
@@ -12,46 +11,85 @@ class EpsilonDelta(ThreeDScene):
3*np.cos(u)
]),u_min=0,u_max=PI/4,v_min=PI/2,v_max=PI,checkerboard_colors=[RED_D, RED_E],
resolution=(15, 32)).scale(1)
+
+ delta_circle_boundary = Circle(radius= 0.3, color = GREEN_E).shift(1*LEFT+1*UP)
+
+ circle = [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, 0]) for i in range(361)]
+
+ circle_above = [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, np.sqrt(9 - (0.3*np.cos(i*DEGREES)-1)**2 - (0.3*np.sin(i*DEGREES)+1)**2)]) for i in range(361)]
+
+ delta_circle = Polygon(*circle, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
+
+ delta_circle_above = Polygon(*circle_above, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
+
+ dot_circle = Dot().scale(0.6).move_to(np.array([-1,1,0])).set_fill(PINK)
+ dot_surface = Dot().rotate(-PI/3).scale(0.7).move_to(np.array([-1.2,1.2,2.7])).set_fill(PINK)
- cylinder_z = ParametricSurface(
- lambda u, v: np.array([
- 0.25*np.cos(TAU * v),
- 1.8* (1 - u),
- 0.25*np.sin(TAU * v)
-
- ]),
- checkerboard_colors=[YELLOW_C, YELLOW_E], resolution=(6, 32)).fade(0.2).rotate(PI/4).move_to(np.array([-0.65,0.65,2.54]))
- cylinder_x = ParametricSurface(
- lambda u, v: np.array([
- 0.3*np.cos(TAU * v)-1,
- 0.3*np.sin(TAU * v)+1,
- 2.6*(1 - u)
- ]),
- checkerboard_colors=[BLUE_C, BLUE_E], resolution=(6, 32)).fade(0.2)
+ #Creating cylinder
+ ######
+ '''
+ cylinder = []
+ cylinder.append(np.array([-0.7, 1, 0]))
+ cylinder.append(np.array([-0.7, 1, np.sqrt(9 - (0.7)**2 - 1)]))
+
+
+ #circle_above_reverse = [ele for ele in reversed(circle_above)]
+ circle_above_reverse = [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, np.sqrt(9 - (0.3*np.cos(i*DEGREES)-1)**2 - (0.3*np.sin(i*DEGREES)+1)**2)]) for i in range(181)]
+ cylinder = cylinder + circle_above_reverse
- delta_circle = Circle(radius= 0.3, color = BLACK).shift(1*LEFT+1*UP).set_fill(GREEN_E, opacity = 0.5)
+ #cylinder.append(np.array([-0.7, 1, np.sqrt(9 - (0.7)**2 - 1)]))
+ cylinder.append(np.array([0.3*np.cos(180)-1, 0.3*np.sin(180)+1, np.sqrt(9 - (0.3*np.cos(180)-1)**2 - (0.3*np.sin(180)+1)**2)]))
+ #cylinder.append(np.array([-0.7, 1, 0]))
+ cylinder.append(np.array([0.3*np.cos(180)-1, 0.3*np.sin(180)+1, 0]))
- epsilon_circle = [np.array([0.25*np.cos(i*DEGREES),0,0.25*np.sin(i*DEGREES)]) for i in range(361)]
+
+ cylinder = cylinder + [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, 0]) for i in range(180,-1,-1)]
+ #y_x_2.append(np.array([-3, 9, 0]))
+ #cylinder.append(np.array([-0.7, 1, 0]))
- epsilon_circle_polygon = Polygon(*epsilon_circle, color = RED_E, fill_color = RED_E, fill_opacity = 0.5).rotate(PI/4).move_to(np.array([0,0,2.54]))
+ cylinder_plane = Polygon(*cylinder, color = BLACK, fill_color = YELLOW_C, fill_opacity= 0.3, stroke_width=0.1)
+ #plane_y_x_2_text = TextMobject(r"$y = x^2$", color = RED_C).move_to(np.array([5,0,2]))
+
+ #cylinder_plane2 = cylinder_plane.copy().rotate(2*PI)
+ cylinder = []
+ cylinder.append(np.array([-0.7, 1, 0]))
+ cylinder.append(np.array([-0.7, 1, np.sqrt(9 - (0.7)**2 - 1)]))
+
- dot_circle = Dot().move_to(np.array([-1,1,0])).set_fill("#000080")
+ #circle_above_reverse = [ele for ele in reversed(circle_above)]
+ circle_above_reverse = [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, np.sqrt(9 - (0.3*np.cos(i*DEGREES)-1)**2 - (0.3*np.sin(i*DEGREES)+1)**2)]) for i in range(360, 179, -1)]
- dot_surface = Dot().rotate(-PI/4).scale(1.5).move_to(np.array([-1.2,1.2,2.7])).set_fill("#000080")
+ cylinder = cylinder + circle_above_reverse
- dot_L_epsilon1 = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#000080", fill_color = "#000080", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,2.3]))
+ #cylinder.append(np.array([-0.7, 1, np.sqrt(9 - (0.7)**2 - 1)]))
+ cylinder.append(np.array([0.3*np.cos(180)-1, 0.3*np.sin(180)+1, np.sqrt(9 - (0.3*np.cos(180)-1)**2 - (0.3*np.sin(180)+1)**2)]))
+ #cylinder.append(np.array([-0.7, 1, 0]))
+ cylinder.append(np.array([0.3*np.cos(180)-1, 0.3*np.sin(180)+1, 0]))
- dot_L_epsilon2 = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#000080", fill_color = "#000080", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,2.8]))
- dot_L = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#006400", fill_color = "#006400", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,2.54]))
+ cylinder = cylinder + [np.array([0.3*np.cos(i*DEGREES)-1, 0.3*np.sin(i*DEGREES)+1, 0]) for i in range(180,360)]
+ #y_x_2.append(np.array([-3, 9, 0]))
+ #cylinder.append(np.array([-0.7, 1, 0]))
+ cylinder_plane = Polygon(*cylinder, color = BLACK, fill_color = YELLOW_C, fill_opacity= 0.3, stroke_width=0.1)
-
+ ######
+ '''
+
+
+ lines = [Line(circle[i], circle_above[i], color = BLUE_B, opacity=0.01, stroke_width=0.1) for i in range(0,len(circle),1)]
+ lines_group = VGroup(*lines)
+
+ line_epsilon_first = DashedLine(np.array([-1, 1, 0]), np.array([-1, 1, np.sqrt(7)]), color = YELLOW_C)
+
+
+
+
self.add(axes)
axis = TextMobject(r"X",r"Y",r"Z")
@@ -63,117 +101,235 @@ class EpsilonDelta(ThreeDScene):
self.add_fixed_orientation_mobjects(axis[0])
self.add_fixed_orientation_mobjects(axis[1])
- self.set_camera_orientation(phi=75*DEGREES,theta=135*DEGREES)
- #self.set_camera_orientation(phi=80*DEGREES,theta=45*DEGREES)
+ self.set_camera_orientation(distance=200,phi=70*DEGREES,theta=135*DEGREES)
+
+ self.play(ShowCreation(sphere))
+ self.wait()
+
+ text1 = TexMobject("\\sqrt{(x-a)^2+(y-b)^2}", color = GREEN_E).scale(0.7).to_corner(UR)
+
+ self.play(ShowCreation(delta_circle_boundary), ShowCreation(dot_circle))
+ self.add_fixed_in_frame_mobjects(text1)
+ self.wait(2)
+
+ text2 = TexMobject("\\sqrt{(x-a)^2+(y-b)^2}", "<", "\\delta ", color = GREEN_E).scale(0.7).to_corner(UR)
+ text2[1].set_color(YELLOW_C)
+ text2[2].set_color(ORANGE)
+ self.play(FadeOut(text1), FadeOut(delta_circle_boundary), ShowCreation(delta_circle))
+ self.bring_to_front(dot_circle)
+ self.add_fixed_in_frame_mobjects(text2)
- self.play(ShowCreation(sphere),ShowCreation(delta_circle), ShowCreation(dot_circle))
+ #self.play(ShowCreation(sphere), ShowCreation(delta_circle), ShowCreation(delta_circle_above))
- temp_circle_center = TextMobject(r"$(a,b,0)$").scale(0.6).set_color(BLUE_C).move_to(1.7*LEFT+1.1*UP)
+ temp_circle_center = TextMobject(r"$(a,b,0)$").scale(0.6).set_color(PINK).move_to(1.7*LEFT+1.1*UP)
self.add_fixed_orientation_mobjects(temp_circle_center)
self.wait()
- delta_lab = TextMobject(r"$\delta$", r"$-$", "disk").scale(0.5).move_to(0.6*LEFT+1.7*UP)
- delta_lab[0].set_color(PINK).scale(1.3)
- delta_lab[1].set_color(ORANGE)
- delta_lab[2].set_color(GREEN_E)
+ delta_lab = TextMobject(r"$\delta$", "disk").scale(0.5).move_to(0.6*LEFT+1.7*UP)
+ delta_lab[0].set_color(ORANGE).scale(1.3)
+ delta_lab[1].set_color(GREEN_E)
self.add_fixed_orientation_mobjects(delta_lab)
- self.play(ShowCreation(dot_surface))
-
- temp_curve_circle_center = TextMobject(r"$(a,b,L)$").scale(0.6).set_color("#006400").move_to(np.array([-2,1,2.7]))
+ self.play(ShowCreation(lines_group), ShowCreation(line_epsilon_first))
+ self.bring_to_front(delta_circle_above, dot_surface)
+ temp_curve_circle_center = TextMobject(r"$(a,b,L)$").scale(0.6).set_color(PINK).move_to(np.array([-1.7,1.1,2.7]))
self.add_fixed_orientation_mobjects(temp_curve_circle_center)
-
- self.wait()
- self.play(ShowCreation(cylinder_x), FadeOut(dot_surface))
- self.wait()
+ self.move_camera(distance = 5, phi=50*DEGREES,theta=135*DEGREES)
+ self.wait(3)
- self.move_camera(phi=0* DEGREES,theta=135*DEGREES)
+
+ self.play(FadeOut(dot_surface))
+
+ self.move_camera(distance=200,phi=0* DEGREES,theta=135*DEGREES)
self.wait()
- self.move_camera(phi=80* DEGREES,theta=225*DEGREES)
+ self.move_camera(distance=10,phi=80* DEGREES,theta=225*DEGREES)
self.wait()
- self.play(FadeOut(delta_lab), ShowCreation(cylinder_z))
+ self.play(FadeOut(delta_lab), FadeOut(temp_circle_center), FadeOut(temp_curve_circle_center), FadeOut(text2))
self.wait()
- self.play(FadeOut(temp_circle_center), FadeOut(temp_curve_circle_center),ShowCreation(epsilon_circle_polygon))
- self.move_camera(phi=80* DEGREES,theta=325*DEGREES)
+ line_epsilon1 = DashedLine(np.array([0.3*np.cos(315*DEGREES)-1, 0.3*np.sin(315*DEGREES)+1, np.sqrt(9 - (0.3*np.cos(315*DEGREES)-1)**2 - (0.3*np.sin(315*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.3*np.cos(315*DEGREES)-1)**2 - (0.3*np.sin(315*DEGREES)+1)**2)]), color = YELLOW_C)
- dot_L_epsilon1_lab = TextMobject(r"$L$", r"$-$", r"$\epsilon$").scale(0.6).move_to(np.array([-0.4,-0.4,2.3]))
+ line_epsilon2 = DashedLine(np.array([0.3*np.cos(135*DEGREES)-1, 0.3*np.sin(135*DEGREES)+1, np.sqrt(9 - (0.3*np.cos(135*DEGREES)-1)**2 - (0.3*np.sin(135*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.3*np.cos(135*DEGREES)-1)**2 - (0.3*np.sin(135*DEGREES)+1)**2)]), color = YELLOW_C)
+
+ line_epsilon = DashedLine(np.array([-1, +1, np.sqrt(7)]), np.array([0, 0, np.sqrt(7)]), color = YELLOW_C)
+
+
+ self.play(ShowCreation(line_epsilon1), ShowCreation(line_epsilon2), ShowCreation(line_epsilon))
+ self.wait()
+
+ self.move_camera(distance=5,phi=75* DEGREES,theta=325*DEGREES)
+
+
+
+ dot_L_epsilon1 = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#000080", fill_color = "#000080", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,np.sqrt(9 - (0.3*np.cos(315*DEGREES)-1)**2 - (0.3*np.sin(315*DEGREES)+1)**2)]))
+
+ dot_L_epsilon2 = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#000080", fill_color = "#000080", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,np.sqrt(9 - (0.3*np.cos(135*DEGREES)-1)**2 - (0.3*np.sin(135*DEGREES)+1)**2)]))
+
+ dot_L = Polygon(*[np.array([0.05*np.cos(i*DEGREES),0,0.05*np.sin(i*DEGREES)]) for i in range(361)], color = "#006400", fill_color = "#006400", fill_opacity = 1).rotate(PI/4).move_to(np.array([0,0,np.sqrt(7)]))
+
+ dot_L_epsilon1_lab = TextMobject(r"$L$", r"$-$", r"$\epsilon$").scale(0.6).move_to(np.array([-0.4,-0.4,np.sqrt(9 - (0.3*np.cos(315*DEGREES)-1)**2 - (0.3*np.sin(315*DEGREES)+1)**2)]))
dot_L_epsilon1_lab[0].set_color("#D4108A")
dot_L_epsilon1_lab[1].set_color("#006400")
dot_L_epsilon1_lab[2].set_color("#4DC8A1").scale(1.5)
- dot_L_epsilon2_lab = TextMobject(r"$L$", r"$+$", r"$\epsilon$").scale(0.6).move_to(np.array([-0.4,-0.4,2.8]))
+ dot_L_epsilon2_lab = TextMobject(r"$L$", r"$+$", r"$\epsilon$").scale(0.6).move_to(np.array([-0.4,-0.4,np.sqrt(9 - (0.3*np.cos(135*DEGREES)-1)**2 - (0.3*np.sin(135*DEGREES)+1)**2)]))
dot_L_epsilon2_lab[0].set_color("#D4108A")
dot_L_epsilon2_lab[1].set_color("#006400")
dot_L_epsilon2_lab[2].set_color("#4DC8A1").scale(1.5)
- dot_L_lab = TextMobject(r"$L$").scale(0.6).set_color("#D4108A").move_to(np.array([-0.4,-0.4,2.54]))
+ dot_L_lab = TextMobject(r"$L$").scale(0.6).set_color("#D4108A").move_to(np.array([-0.4,-0.4,np.sqrt(7)]))
+
+ epsilon_line = Line(np.array([0,0,np.sqrt(9 - (0.3*np.cos(315*DEGREES)-1)**2 - (0.3*np.sin(315*DEGREES)+1)**2)]), np.array([0,0,np.sqrt(9 - (0.3*np.cos(135*DEGREES)-1)**2 - (0.3*np.sin(135*DEGREES)+1)**2)]), color = "#4DC8A1")
+ delta_line = Line(np.array([-1,1,0]), np.array([0.3*np.cos(0*DEGREES)-1, 0.3*np.sin(0*DEGREES)+1, 0]), color = "#000080")
+ delta_line_lab = TexMobject("\\delta", color = ORANGE).scale(0.6).move_to(delta_line.get_center())
- self.play(ShowCreation(dot_L_epsilon1), ShowCreation(dot_L), ShowCreation(dot_L_epsilon2))
- self.add_fixed_orientation_mobjects(dot_L_epsilon1_lab, dot_L_epsilon2_lab, dot_L_lab)
- self.wait(4)
+ self.play(ShowCreation(epsilon_line), ShowCreation(delta_line), ShowCreation(dot_L_epsilon1), ShowCreation(dot_L), ShowCreation(dot_L_epsilon2))
+ self.bring_to_front(dot_L_epsilon1, dot_L, dot_L_epsilon2)
+ self.add_fixed_orientation_mobjects(delta_line_lab, dot_L_epsilon1_lab, dot_L_epsilon2_lab, dot_L_lab)
- self.move_camera(phi=80* DEGREES,theta=45*DEGREES)
self.wait(2)
-
+ circle_1 = [np.array([0.6*np.cos(i*DEGREES)-1, 0.6*np.sin(i*DEGREES)+1, 0]) for i in range(361)]
+
+ circle_above_1 = [np.array([0.6*np.cos(i*DEGREES)-1, 0.6*np.sin(i*DEGREES)+1, np.sqrt(9 - (0.6*np.cos(i*DEGREES)-1)**2 - (0.6*np.sin(i*DEGREES)+1)**2)]) for i in range(361)]
+
+ delta_circle_1 = Polygon(*circle_1, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
+
+ delta_circle_above_1 = Polygon(*circle_above_1, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
+
+ lines_1 = [Line(circle_1[i], circle_above_1[i], color = BLUE_B, opacity=0.01, stroke_width=0.1) for i in range(0,len(circle_1),1)]
+ lines_group_1 = VGroup(*lines_1)
-
+ line_epsilon1_1 = DashedLine(np.array([0.6*np.cos(315*DEGREES)-1, 0.6*np.sin(315*DEGREES)+1, np.sqrt(9 - (0.6*np.cos(315*DEGREES)-1)**2 - (0.6*np.sin(315*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.6*np.cos(315*DEGREES)-1)**2 - (0.6*np.sin(315*DEGREES)+1)**2)]), color = YELLOW_C)
+
+ line_epsilon2_1 = DashedLine(np.array([0.6*np.cos(135*DEGREES)-1, 0.6*np.sin(135*DEGREES)+1, np.sqrt(9 - (0.6*np.cos(135*DEGREES)-1)**2 - (0.6*np.sin(135*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.6*np.cos(135*DEGREES)-1)**2 - (0.6*np.sin(135*DEGREES)+1)**2)]), color = YELLOW_C)
+
+
+ epsilon_line_1 = Line(np.array([0,0,np.sqrt(9 - (0.6*np.cos(315*DEGREES)-1)**2 - (0.6*np.sin(315*DEGREES)+1)**2)]), np.array([0,0,np.sqrt(9 - (0.6*np.cos(135*DEGREES)-1)**2 - (0.6*np.sin(135*DEGREES)+1)**2)]), color = "#4DC8A1")
+ delta_line1 = Line(np.array([-1,1,0]), np.array([0.6*np.cos(0*DEGREES)-1, 0.6*np.sin(0*DEGREES)+1, 0]), color = "#000080")
+ delta_line_lab1 = TexMobject("\\delta", color = ORANGE).scale(0.6).move_to(delta_line1.get_center())
+
+
+
+
+ epsilon_text1 = TextMobject(r"For every", r"$\epsilon$", " ,", color = YELLOW_C).scale(0.7).move_to(4.2*RIGHT+3.2*UP)
+ epsilon_text1[1].set_color("#4DC8A1")
+
+ epsilon_text2 = TextMobject("there exists a corresponding", r"$\delta$", r"disk", color = YELLOW_C).scale(0.7)
+ epsilon_text2[1].set_color(ORANGE)
+ epsilon_text2.next_to(epsilon_text1, DOWN)
+ epsilon_text3 = TextMobject(r"So that for every value", color = YELLOW_C).scale(0.7).move_to(4*RIGHT+3.2*UP)
-
+ epsilon_text4 = TextMobject("that lies within the", r"$\delta$", r"disk,", color = YELLOW_C).scale(0.7).next_to(epsilon_text3, DOWN)
+ epsilon_text4[1].set_color(ORANGE)
+ epsilon_text5 = TextMobject(r"the limit lies within the", r"$\epsilon$", r"band", color = YELLOW_C).scale(0.7)
+ epsilon_text5[1].set_color("#4DC8A1")
+ epsilon_text5.next_to(epsilon_text4, DOWN)
+ self.add_fixed_in_frame_mobjects(epsilon_text1)
- '''
-
+ self.play( ReplacementTransform(line_epsilon1, line_epsilon1_1), ReplacementTransform(line_epsilon2, line_epsilon2_1), ReplacementTransform(epsilon_line, epsilon_line_1),
+ ApplyMethod(dot_L_epsilon1.move_to, np.array([0,0,np.sqrt(9 - (0.6*np.cos(315*DEGREES)-1)**2 - (0.6*np.sin(315*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon2.move_to, np.array([0,0,np.sqrt(9 - (0.6*np.cos(135*DEGREES)-1)**2 - (0.6*np.sin(135*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon1_lab.move_to, np.array([-0.4,-0.4,np.sqrt(9 - (0.6*np.cos(315*DEGREES)-1)**2 - (0.6*np.sin(315*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon2_lab.move_to, np.array([-0.4,-0.4,np.sqrt(9 - (0.6*np.cos(135*DEGREES)-1)**2 - (0.6*np.sin(135*DEGREES)+1)**2)])))
-
-
+ self.bring_to_front(dot_L_epsilon1, dot_L, dot_L_epsilon2)
+
+ self.wait()
+
+ self.add_fixed_in_frame_mobjects(epsilon_text2)
+
+ self.play(ReplacementTransform(lines_group, lines_group_1), ReplacementTransform(delta_circle, delta_circle_1), ReplacementTransform(delta_circle_above, delta_circle_above_1),
+ ReplacementTransform(delta_line, delta_line1), ReplacementTransform(delta_line_lab, delta_line_lab1))
+ self.bring_to_front(dot_L_epsilon1, dot_L, dot_L_epsilon2)
+
+ self.add_fixed_orientation_mobjects(delta_line_lab1 ,dot_L_epsilon1_lab, dot_L_epsilon2_lab, dot_L_lab)
- delta_lab = TextMobject(r"$\delta - disk$")
- delta_lab.scale(0.5)
- delta_lab.set_color(PINK)
+ self.wait(2)
+
+ self.play(FadeOut(epsilon_text1), FadeOut(epsilon_text2))
+
+ self.add_fixed_in_frame_mobjects(epsilon_text3, epsilon_text4)
+
+ self.wait(2)
+
+ self.add_fixed_in_frame_mobjects(epsilon_text5)
+
+ self.wait(2)
+
+
+ self.play(FadeOut(epsilon_text3), FadeOut(epsilon_text4), FadeOut(epsilon_text5))
- self.play(ShowCreation(circle_center))
- self.add_fixed_in_frame_mobjects(temp_circle_center)
- temp_circle_center.move_to(1.5*RIGHT)
- self.play(Write(temp_circle_center))
- self.play(ShowCreation(curve_circle_center))
- self.add_fixed_in_frame_mobjects(temp_curve_circle_center)
- temp_curve_circle_center.move_to(1.9*UP+1*RIGHT)
- self.play(Write(temp_curve_circle_center))
+ self.move_camera(distance=10,phi=80* DEGREES,theta=45*DEGREES)
+ self.bring_to_front(dot_L_epsilon1_lab, dot_L_lab, dot_L_epsilon2_lab)
+ self.wait(2)
+
+ self.move_camera(distance=10,phi=75* DEGREES,theta=135*DEGREES)
+ self.bring_to_front(dot_L_epsilon1_lab, dot_L_lab, dot_L_epsilon2_lab)
+ self.wait(2)
+
+ circle_2 = [np.array([0.5*np.cos(i*DEGREES)-1, 0.5*np.sin(i*DEGREES)+1, 0]) for i in range(361)]
+
+ circle_above_2 = [np.array([0.5*np.cos(i*DEGREES)-1, 0.5*np.sin(i*DEGREES)+1, np.sqrt(9 - (0.5*np.cos(i*DEGREES)-1)**2 - (0.5*np.sin(i*DEGREES)+1)**2)]) for i in range(361)]
+
+ delta_circle_2 = Polygon(*circle_2, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
- self.add_fixed_in_frame_mobjects(delta_lab)
- delta_lab.move_to(0.4*DOWN+1.7*RIGHT)
- self.play(Write(delta_lab))
+ delta_circle_above_2 = Polygon(*circle_above_2, color = BLACK, fill_color = GREEN_E, fill_opacity= 0.5, stroke_width=0.1)
+ lines_2 = [Line(circle_2[i], circle_above_2[i], color = BLUE_B, opacity=0.01, stroke_width=0.1) for i in range(0,len(circle_2),1)]
+ lines_group_2 = VGroup(*lines_2)
+ line_epsilon1_2 = DashedLine(np.array([0.5*np.cos(315*DEGREES)-1, 0.5*np.sin(315*DEGREES)+1, np.sqrt(9 - (0.5*np.cos(315*DEGREES)-1)**2 - (0.5*np.sin(315*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.5*np.cos(315*DEGREES)-1)**2 - (0.5*np.sin(315*DEGREES)+1)**2)]), color = YELLOW_C)
+ line_epsilon2_2 = DashedLine(np.array([0.5*np.cos(135*DEGREES)-1, 0.5*np.sin(135*DEGREES)+1, np.sqrt(9 - (0.5*np.cos(135*DEGREES)-1)**2 - (0.5*np.sin(135*DEGREES)+1)**2)]),
+ np.array([0, 0, np.sqrt(9 - (0.5*np.cos(135*DEGREES)-1)**2 - (0.5*np.sin(135*DEGREES)+1)**2)]), color = YELLOW_C)
- self.begin_ambient_camera_rotation(rate=0.2)
+
+ epsilon_line_2 = Line(np.array([0,0,np.sqrt(9 - (0.5*np.cos(315*DEGREES)-1)**2 - (0.5*np.sin(315*DEGREES)+1)**2)]), np.array([0,0,np.sqrt(9 - (0.5*np.cos(135*DEGREES)-1)**2 - (0.5*np.sin(135*DEGREES)+1)**2)]), color = "#4DC8A1")
- self.play(ShowCreation(circle), ShowCreation(line1), ShowCreation(line2))
- self.play(ShowCreation(line3), ShowCreation(line4))
- self.wait(8)
- ''' \ No newline at end of file
+ delta_line2 = Line(np.array([-1,1,0]), np.array([0.5*np.cos(0*DEGREES)-1, 0.5*np.sin(0*DEGREES)+1, 0]), color = "#000080")
+ delta_line_lab2 = TexMobject("\\delta", color = ORANGE).scale(0.6).move_to(delta_line1.get_center())
+
+ self.bring_to_front(dot_L_epsilon1, dot_L, dot_L_epsilon2)
+
+ self.play(ReplacementTransform(lines_group_1, lines_group_2), ReplacementTransform(delta_circle_1, delta_circle_2), ReplacementTransform(delta_circle_above_1, delta_circle_above_2),
+ ReplacementTransform(line_epsilon1_1, line_epsilon1_2), ReplacementTransform(line_epsilon2_1, line_epsilon2_2), ReplacementTransform(epsilon_line_1, epsilon_line_2),
+ ReplacementTransform(delta_line1, delta_line2), ReplacementTransform(delta_line_lab1, delta_line_lab2),
+ ApplyMethod(dot_L_epsilon1.move_to, np.array([0,0,np.sqrt(9 - (0.5*np.cos(315*DEGREES)-1)**2 - (0.5*np.sin(315*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon2.move_to, np.array([0,0,np.sqrt(9 - (0.5*np.cos(135*DEGREES)-1)**2 - (0.5*np.sin(135*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon1_lab.move_to, np.array([-0.4,-0.4,np.sqrt(9 - (0.5*np.cos(315*DEGREES)-1)**2 - (0.5*np.sin(315*DEGREES)+1)**2)])),
+ ApplyMethod(dot_L_epsilon2_lab.move_to, np.array([-0.4,-0.4,np.sqrt(9 - (0.5*np.cos(135*DEGREES)-1)**2 - (0.5*np.sin(135*DEGREES)+1)**2)])))
+
+ self.bring_to_front(dot_L_epsilon1, dot_L, dot_L_epsilon2)
+ self.add_fixed_orientation_mobjects(delta_line_lab2 ,dot_L_epsilon1_lab, dot_L_epsilon2_lab, dot_L_lab)
+
+ self.wait(2)
+ \ No newline at end of file