diff options
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability')
-rw-r--r-- | FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md | 4 | ||||
-rw-r--r-- | FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py | 36 | ||||
-rw-r--r-- | FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py | 22 | ||||
-rw-r--r-- | FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.gif (renamed from FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif) | bin | 1317248 -> 1317248 bytes | |||
-rw-r--r-- | FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.py | 33 |
5 files changed, 71 insertions, 24 deletions
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md index bc571c6..02678fd 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/README.md @@ -1,2 +1,2 @@ -**file2_tangent_space_curve.py** <br> -![file2_tangent_space_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif) +**file3_tangent_space_curve.py** <br> +![file3_tangent_space_curve.py](https://github.com/saarthdeshpande/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.gif) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py new file mode 100644 index 0000000..a91da6b --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py @@ -0,0 +1,36 @@ +from manimlib.imports import * + +class nd(Scene): + def construct(self): + ld1 = Line().rotate(20*DEGREES) + pd1 = Dot(ld1.get_end(), fill_opacity = 0) + pd1.set_stroke(width = 0.5) + ld2 = Line().rotate(40*DEGREES).shift(1.4*UP + 1.7*RIGHT) + pd2 = Dot(ld2.get_start(), fill_opacity = 1, color = PURPLE) + t1 = TextMobject('A discontinuous function.').scale(0.7).shift(UP + 2*RIGHT) + + obj1 = VGroup(*[ld1, pd1, ld2, pd2]).shift(4*LEFT) + self.play(FadeIn(obj1), FadeIn(t1)) + self.wait(2) + + ld3 = ld2.copy().rotate(-60*DEGREES).shift(1.4*DOWN + 0.2*RIGHT) + pd3 = Dot(ld1.get_end(), fill_opacity = 1, color = PURPLE) + t2 = TextMobject('Graph containing a sharp corner.').scale(0.7).shift( 2*RIGHT) + + obj2 = VGroup(*[ld3, pd3]) + + self.play(Transform(VGroup(*[ld2, pd2]), obj2), ReplacementTransform(t1, t2)) + + self.wait(2) + + ld4 = Line().rotate(90*DEGREES) + pd4 = Dot(ld4.get_center(), color = PURPLE) + a1 = Arc(start_angle = -180*DEGREES, angle = 90*DEGREES).move_to(ld4.get_end()).rotate(-90*DEGREES).shift(0.5*(UP+RIGHT)) + a2 = Arc(start_angle = -180*DEGREES, angle = 90*DEGREES).move_to(ld4.get_start()).rotate(90*DEGREES).shift(0.5*(DOWN+LEFT)) + t3 = TextMobject('Graph with a vertical line.').scale(0.7).shift(2*RIGHT) + + obj3 = VGroup(*[ld4, pd4, a1, a2]).shift(3*LEFT) + + self.play(FadeOut(obj1), Transform(obj2, obj3), ReplacementTransform(t2, t3)) + self.wait(2) + self.play(FadeOut(obj2), FadeOut(t3)) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py deleted file mode 100644 index 67c675e..0000000 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.py +++ /dev/null @@ -1,22 +0,0 @@ -from manimlib.imports import * - -class tangent(ThreeDScene): - def construct(self): - axes = ThreeDAxes() - self.set_camera_orientation(phi = 125*DEGREES, theta = 135*DEGREES) - h = ParametricFunction( - lambda t: np.array([ - 4*(t**3) + 5, - t**2 + 2*(t**4), - -2*np.log(2*t) - ]), t_min = -3, t_max = 1.18 - ).shift(5*LEFT) - tgtR = Line((4,3,-2*np.log(2)), (19.5, 16, -4.772588), color=YELLOW) - tgtL =Line((4,3,-2*np.log(2)), (-11.5, -10, 2), color=YELLOW) - dot = Dot((4,3,-2*np.log(2)), color=RED, radius=0.08) - self.play(FadeIn(axes),FadeIn(h), FadeIn(dot)) - self.begin_ambient_camera_rotation(rate=0.4) - self.wait(2) - self.play(FadeIn(tgtL), FadeIn(tgtR)) - self.wait(5) - self.play(FadeOut(axes), FadeOut(h), FadeOut(dot), FadeOut(tgtL), FadeOut(tgtR)) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.gif Binary files differindex 06ed70f..06ed70f 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_tangent_space_curve.gif +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.gif diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.py new file mode 100644 index 0000000..c3aecc6 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file3_tangent_space_curve.py @@ -0,0 +1,33 @@ +from manimlib.imports import * + +class tangent(ThreeDScene): + def construct(self): + axes = ThreeDAxes() + text = TextMobject(r'Tangent', r' to the ', 'space curve', r' \\ at point ', r'$P_{1}$', ' is given by:').scale(0.7).shift(3*UP + 3.5*LEFT) + text.set_color_by_tex_to_color_map({ + "Tangent": YELLOW, + '$P_{1}$': RED, + 'space curve': BLUE + }) + text.bg=BackgroundRectangle(text,fill_opacity=1, color = BLACK) + text_gr =VGroup(text.bg,text) + self.set_camera_orientation(phi = 125*DEGREES, theta = 135*DEGREES) + h = ParametricFunction( + lambda t: np.array([ + 4*(t**3) + 5, + t**2 + 2*(t**4), + -2*np.log(2*t) + ]), t_min = -3, t_max = 1.18, color = BLUE + ).shift(5*LEFT) + tgtR = Line((4,3,-2*np.log(2)), (19.5, 16, -4.772588), color=YELLOW) + tgtL =Line((4,3,-2*np.log(2)), (-11.5, -10, 2), color=YELLOW) + dot = Dot((4,3,-2*np.log(2)), color=RED, radius=0.08) + dotl = TextMobject(r'$P_{1}$', color = RED).scale(0.7).shift(2*DOWN + 5*LEFT) + self.add_fixed_in_frame_mobjects(text_gr, dotl) + self.play(FadeIn(axes),FadeIn(h), FadeIn(dot), FadeIn(dotl)) + self.wait(2) + self.play(FadeIn(tgtL), FadeIn(tgtR)) + self.begin_ambient_camera_rotation(rate=0.2) + self.play(FadeOut(dotl)) + self.wait(5) + self.play(FadeOut(axes), FadeOut(h), FadeOut(text_gr), FadeOut(dot), FadeOut(tgtL), FadeOut(tgtR)) |