diff options
9 files changed, 73 insertions, 24 deletions
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif Binary files differindex 858a8de..3f7ecd1 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py index 7ab8908..45058d7 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py @@ -32,6 +32,8 @@ class randomcurve(GraphScene): dot6 = Dot(tgt6.get_start(), color = RED) dot7 = Dot(tgt7.get_start(), color = RED) + arc = ArcBetweenPoints(dot1.get_center(), dot2.get_center(), color = GREEN_SCREEN, angle = 10*DEGREES).rotate(180*DEGREES) + dots = VGroup(*[dot1, dot2, dot3, dot4, dot5, dot6, dot7]) ds = CurvedArrow((-4, 2, 0), (tgt1.get_start() + tgt2.get_start()) / 2, color = YELLOW) @@ -43,15 +45,13 @@ class randomcurve(GraphScene): self.wait(2) self.play(FadeOut(intro)) self.setup_axes(hideaxes=False) - self.play(ShowCreation(graphobj), FadeIn(dots), FadeIn(ds), FadeIn(ds_text)) + self.play(ShowCreation(graphobj), FadeIn(dots), FadeIn(ds), FadeIn(ds_text), FadeIn(arc)) self.wait(1) - self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid), FadeOut(dots), FadeOut(ds), FadeOut(ds_text)) - self.wait(2) + self.play(FadeOut(self.axes), FadeOut(arc), FadeOut(graphobj),FadeIn(mid), FadeOut(dots), FadeOut(ds), FadeOut(ds_text)) + self.wait(3) self.play(FadeOut(mid)) self.play(FadeIn(self.axes), FadeIn(graphobj), FadeIn(dots)) - - tangents = [tgt1, tgt2, tgt3, tgt4, tgt5, tgt6, tgt7] for tangent in tangents: self.play(ShowCreation(tangent), run_time = 0.2) @@ -60,7 +60,7 @@ class randomcurve(GraphScene): self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents), FadeOut(dots)) self.wait(1) self.play(FadeIn(outro)) - self.wait(2) + self.wait(3) self.play(FadeOut(outro)) self.wait(1) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py index d71adda..3ecd57c 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py @@ -47,10 +47,24 @@ class GR(GraphScene): line.move_to(p0) return line + circle1 = Circle(radius = 0.8, color = GREY, opacity = 0.2).shift(2.2*UP) + tgt1 = Line((-2,3,0), (2,3,0), color = GREY, opacity = 0.2).scale(0.4) + + curvature1 = VGroup(*[circle1, tgt1]) + + circle2 = Circle(radius = 0.6, color = GREY, opacity = 0.2).shift(0.4*DOWN + 4*RIGHT) + tgt2 = Line((4,-2,0), (6, -2, 0), color = GREY, opacity = 0.2).scale(0.5).shift(LEFT + UP) + + curvature2 = VGroup(*[circle2, tgt2]) + line = always_redraw(get_tangent_line) self.add(graph,line, dots, text) self.wait(1.2) - self.play(tracker.set_value, 6, rate_func=smooth, run_time=13) - self.play(FadeOut(VGroup(*[graph, self.axes, line, dots, text]))) + self.play(tracker.set_value, 0, rate_func=smooth, run_time=5) + self.play(FadeIn(curvature1)) + self.play(tracker.set_value, 4, rate_func=smooth, run_time=5) + self.play(FadeIn(curvature2)) + self.play(tracker.set_value, 6, rate_func=smooth, run_time=3) + self.play(FadeOut(VGroup(*[curvature1, curvature2, graph, self.axes, line, dots, text]))) self.wait() diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py index 40b5150..37d079e 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file1_parametric_circle.py @@ -11,12 +11,15 @@ class parametricCircle(ThreeDScene, GraphScene): self.y_axis_label = "" self.x_axis_width = 10 self.y_axis_height = 10 + self.y_tick_frequency = 1.9 + self.x_tick_frequency = 1.4 axes = [] - self.setup_axes() - self.axes.scale(0.5).shift(3*LEFT) - axes.append(self.axes) + # self.setup_axes() + ax = Axes(y_tick_frequency = 1, x_axis_width = 10, y_axis_height = 10, y_min = -5, x_max = 5, y_max = 5, x_tick_frequency = 1, x_axis_label = "", y_axis_label = "", x_min = -5, ) + ax.scale(0.5).shift(3*LEFT) + axes.append(ax) self.setup_axes() self.axes.scale(0.3).shift(3*RIGHT + 2*UP) axes.append(self.axes) @@ -38,7 +41,7 @@ class parametricCircle(ThreeDScene, GraphScene): asint = ParametricFunction( lambda t: np.array([ t, - np.sin(t), + 2*np.sin(t), 0 ]), t_min = -np.pi, t_max = np.pi, color = GREEN_E ).shift(3*RIGHT + 2*UP).scale(0.4) @@ -50,7 +53,7 @@ class parametricCircle(ThreeDScene, GraphScene): acost = ParametricFunction( lambda t: np.array([ t, - np.cos(t), + 2*np.cos(t), 0 ]), t_min = -np.pi, t_max = np.pi, color = BLUE ).shift(3*RIGHT + 2*DOWN).scale(0.4) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif Binary files differdeleted file mode 100644 index c8668e3..0000000 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_prescribed_plane.gif +++ /dev/null diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.gif Binary files differnew file mode 100644 index 0000000..c028db4 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.gif diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.py new file mode 100644 index 0000000..5c68f69 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file1_tnb_basic.py @@ -0,0 +1,31 @@ +from manimlib.imports import * + +class tnb(ThreeDScene): + def construct(self): + t = TextMobject(r'T', color = YELLOW) + n = TextMobject(r'N', color = BLUE).next_to(t, RIGHT, buff=0) + b = TextMobject(r'B', color = GREEN_E).next_to(n, RIGHT, buff=0) + frame = TextMobject(r'Frame').next_to(b, RIGHT, buff=0.2) + + text = VGroup(*[t,n,b,frame]).move_to(ORIGIN).shift(3*UP) + curve = ParametricFunction( + lambda t: np.array([ + np.sin(TAU*t), + np.cos(TAU*t), + 0 + ]) + ).scale(2.5) + dot = Dot(color = RED).scale(1.5).shift(1.05*LEFT) + tgt = Arrow(dot.get_center(), (-2, 2, 0), color = YELLOW).shift(0.3*DOWN + 0.09*RIGHT) + normal = Arrow(tgt.get_start(), (1, 1, 0), color = BLUE).shift(0.2*LEFT + 0.05*DOWN) + binormal = Arrow(dot.get_center() - np.array([0,0,0.3]), (tgt.get_start()[0], tgt.get_start()[1],2), color = GREEN) + square = Square(color = DARK_BROWN, fill_color = WHITE, fill_opacity=0.3).move_to(tgt.get_start()).rotate(27*DEGREES).shift(UP+0.4*RIGHT).scale(1.2) + group = VGroup(*[dot, tgt, normal, square, binormal]).shift(np.array([-1.24,-1,0])) + + self.add_fixed_in_frame_mobjects(text) + self.add(curve, group) + self.wait(1) + self.move_camera(phi = 75*DEGREES, theta=45*DEGREES, run_time = 2) + self.begin_ambient_camera_rotation(rate = 0.5) + self.wait(5) + self.play(FadeOut(VGroup(*[text, curve, dot, tgt, normal, square, binormal]))) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame.gif Binary files differdeleted file mode 100644 index 097652f..0000000 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame.gif +++ /dev/null diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py index ee5e717..176cac5 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/tnb-frame-and-serret-frenet-formulae/file2_tnb_frame_manim.py @@ -79,15 +79,16 @@ class tnb(ThreeDScene): self.play(FadeIn(helix), FadeIn(text)) self.play(ApplyMethod(helix.scale, 4)) self.add_fixed_in_frame_mobjects(bnm0) - self.play(FadeIn(point0), MoveAlongPath(helix_dot, helix1, run_time=5)) + self.play(FadeIn(point0)) + self.play(ApplyMethod(point0.set_color, GRAY, opacity = 0.1), MoveAlongPath(helix_dot, helix1, run_time=5)) self.add_fixed_in_frame_mobjects(bnm1) - self.play(ApplyMethod(point0.set_color, GRAY), FadeIn(point1)) - self.play(MoveAlongPath(helix_dot, helix2, run_time = 5)) + self.play(FadeIn(point1)) + self.play(ApplyMethod(point1.set_color, GRAY, opacity = 0.1), ApplyMethod(bnm1.set_color, GRAY, opacity = 0.1), MoveAlongPath(helix_dot, helix2, run_time = 5)) self.add_fixed_in_frame_mobjects(bnm2) - self.play(ApplyMethod(point1.set_color, GRAY), ApplyMethod(bnm1.set_color, GRAY), FadeIn(point2)) - self.play(MoveAlongPath(helix_dot, helix3, run_time=5)) + self.play(FadeIn(point2)) + self.play(ApplyMethod(point2.set_color, GRAY, opacity = 0.1), MoveAlongPath(helix_dot, helix3, run_time=5)) dot3 = Dot(np.array([np.cos(-np.pi/3), np.sin(-np.pi/3), -0.4*np.pi/3]) + np.array([3.3,-0.25,0]), radius = 0.16, color=RED) tgt3 = Arrow((0,0,0), (0,2,0), color = YELLOW).shift(helix_dot.get_center() - np.array([-0.05,0.2,0])) @@ -111,15 +112,15 @@ class tnb(ThreeDScene): point5 = VGroup(*[tgt5, nm5, bnm5, plane5]) self.add_fixed_in_frame_mobjects(bnm3) - self.play(ApplyMethod(point2.set_color, GRAY), FadeIn(point3)) - self.play(MoveAlongPath(helix_dot, helix4, run_time=5)) + self.play(FadeIn(point3)) + self.play(ApplyMethod(point3.set_color, GRAY, opacity = 0.1), MoveAlongPath(helix_dot, helix4, run_time=5)) self.add_fixed_in_frame_mobjects(bnm4) - self.play(ApplyMethod(point3.set_color, GRAY), FadeIn(point4)) - self.play(MoveAlongPath(helix_dot, helix5, run_time=5)) + self.play(FadeIn(point4)) + self.play(ApplyMethod(point4.set_color, GRAY, opacity = 0.1), MoveAlongPath(helix_dot, helix5, run_time=5)) self.add_fixed_in_frame_mobjects(bnm5) - self.play(ApplyMethod(point4.set_color, GRAY), FadeIn(point5)) + self.play(FadeIn(point5)) self.wait(2) - self.play(FadeOut(VGroup(*[helix, bnm1, point0, point1, point2, point3, point4, point5, helix_dot]))) + self.play(FadeOut(VGroup(*[text, helix, bnm1, point0, point1, point2, point3, point4, point5, helix_dot]))) |