summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py
diff options
context:
space:
mode:
authorVaishnavi2020-07-28 00:54:56 +0530
committerGitHub2020-07-28 00:54:56 +0530
commit5b07b9ea49918b80f6f17796071de86ba30ec46c (patch)
treecd21ca0431f4c170387110f1e957d42ecd197ae2 /FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py
parent1cddd7b803966ec1adb7043d65bf4964994543c7 (diff)
parent15fc46198f69a6563b0348491efdf88a2dca3ef7 (diff)
downloadFSF-mathematics-python-code-archive-5b07b9ea49918b80f6f17796071de86ba30ec46c.tar.gz
FSF-mathematics-python-code-archive-5b07b9ea49918b80f6f17796071de86ba30ec46c.tar.bz2
FSF-mathematics-python-code-archive-5b07b9ea49918b80f6f17796071de86ba30ec46c.zip
Merge pull request #7 from FOSSEE/master
Update fork repo. DONE
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/velocity-and-differentiability/file2_non_differentiable.py36
1 files changed, 36 insertions, 0 deletions
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))