From 461584098bd252301452eb3e6e0bfcd2d3c6f0c8 Mon Sep 17 00:00:00 2001 From: Saarth Deshpande Date: Tue, 30 Jun 2020 15:05:16 +0530 Subject: last-1 review --- .../file1_simple_visualization.gif | Bin 686712 -> 675451 bytes .../file1_simple_visualization.py | 12 ++++++------ .../file4_different_curvature_single_curve.py | 18 ++++++++++++++++-- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature') 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 index 858a8de..3f7ecd1 100644 Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif differ 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() -- cgit From 25569ab09dc79cb9d4e1b424ec7dd1a0a7c90edc Mon Sep 17 00:00:00 2001 From: Saarth Deshpande Date: Wed, 1 Jul 2020 13:00:25 +0530 Subject: last day --- .../file3_curvature_interpretation.gif | Bin 0 -> 702280 bytes .../file3_curvature_interpretation.py | 42 +++++++++++++++++++++ .../file3_curvature_intuition.gif | Bin 271189 -> 0 bytes .../file4_different_curvature_single_curve.py | 16 ++++++-- 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py delete mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature') diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif new file mode 100644 index 0000000..39489b7 Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif differ diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py new file mode 100644 index 0000000..cf6b032 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py @@ -0,0 +1,42 @@ +from manimlib.imports import * + +class interpretation(Scene): + def construct(self): + tgt = Vector((1, 2, 0), color = YELLOW) + tgtText = TextMobject(r'$r\prime (t)$').next_to(tgt, UP, buff = 0).scale(0.7) + tgt2 = DashedLine((0,0,0),(1, 2, 0), color = GRAY).shift(DOWN + 2*RIGHT) + + nm = Vector((2, -1, 0), color = BLUE) + nmText = TextMobject(r'$r\prime\prime (t)$').next_to(nm, DOWN+RIGHT, buff = 0).scale(0.7) + nm2 = DashedLine((0,0,0),(2, -1, 0), color = GRAY).shift(2*UP + RIGHT) + square = Square(fill_color = WHITE, fill_opacity = 0.2).rotate(63*DEGREES).shift(0.5*UP +1.5*RIGHT).scale(1.1) + square.set_stroke(width = 0.1) + arrow = CurvedArrow(square.get_center() + np.array([2,1,0]), square.get_center() + np.array([0.5,0,0])) + arrowText = TextMobject(r'$r\prime (t)\times r\prime\prime (t)$').next_to(arrow.get_start(), DOWN+1*RIGHT, buff = 0).scale(0.7) + + text1 = TextMobject(r'$\left|\frac{dT}{ds}\right| = \frac{\left|\frac{dT}{dt}\right|}{\left|\frac{ds}{dt}\right|}$').shift(UP+3*LEFT) + text2 = TextMobject(r'$\left|\frac{dT}{ds}\right| = \frac{\frac{r\prime\prime (t)}{\left| r\prime (t)\right|}\times\frac{r\prime (t)}{\left| r\prime (t)\right|}}{\left|r\prime (t)\right|}$').next_to(text1, DOWN, buff = 0.1) + unit = VGroup(*[tgt, tgt2, nm, nm2]) + + # self.play(FadeIn(VGroup(*[tgt, tgt2, nm, nm2, nmText, tgtText, square, arrow, arrowText]))) + tgt2text = TextMobject(r'$\frac{r\prime (t)}{\left| r\prime (t)\right|}$').shift(1.1*UP).scale(0.7).rotate(63*DEGREES ) + nm2text = TextMobject(r'$\frac{dT}{dt} = \frac{r\prime\prime (t)}{\left| r\prime (t)\right|}$').scale(0.6).shift(0.5*RIGHT+0.6*DOWN).rotate(-25*DEGREES) + unit2 = unit.copy().scale(0.5).shift(0.75*LEFT+0.25*DOWN) + + self.play(FadeIn(VGroup(*[tgt, tgtText]))) + self.wait(1) + self.play(FadeIn(VGroup(*[nm, nmText]))) + self.wait(1) + self.play(FadeIn(VGroup(*[tgt2, nm2]))) + self.wait(1) + self.play(FadeIn(VGroup(*[square, arrow, arrowText]))) + self.wait(1) + self.play(FadeIn(unit2)) + self.wait(1) + self.play(FadeIn(VGroup(*[tgt2text, nm2text]))) + self.wait(1) + self.play(FadeIn(text1)) + self.wait(1) + self.play(FadeIn(text2)) + self.wait(2) + self.play(FadeOut(VGroup(*[tgt2text, nm2text, text1, text2, tgt, tgtText,nm, nmText,tgt2, nm2,square, arrow, arrowText,unit2]))) diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif deleted file mode 100644 index 0d6fdcf..0000000 Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif and /dev/null differ 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 3ecd57c..56b7fbb 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 @@ -8,7 +8,9 @@ class GR(GraphScene): "x_max": 6, "y_min": -6, "y_max": 10, - "graph_origin": ORIGIN + "graph_origin": ORIGIN, + 'x_tick_frequency': 20, + 'y_tick_frequency': 20 } def construct(self): @@ -21,7 +23,7 @@ class GR(GraphScene): tracker = ValueTracker(-3) - text = TextMobject(r'The curvature at point $P_{1}$ is \\ lesser than that at point $P_{2}$: \\ as $\kappa = \frac{1}{R}$').shift(3.2*RIGHT+3*UP).scale(0.6) + text = TextMobject(r'$\because R_{1} > R_{2}$, the curvature at \\ point $P_{1}$ is less than that \\ at point $P_{2}$ as $\kappa = \frac{1}{R}$').shift(3.2*RIGHT+3*UP).scale(0.6) dot1 = Dot((0,3,0), color = YELLOW) dot1label = TextMobject(r'$P_{1}$').next_to(dot1, UP+RIGHT, buff = 0.1) @@ -50,12 +52,18 @@ class GR(GraphScene): 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]) + r1 = Line(circle1.get_center(), circle1.get_center() + np.array([0,0.8,0]), color=GREEN_SCREEN) + r1label = TextMobject(r'$R_{1}$',color=WHITE).next_to(r1, RIGHT, buff = 0.1).scale(0.6) + + curvature1 = VGroup(*[circle1, tgt1, r1, r1label]) 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]) + r2 = Line(circle2.get_center(), circle2.get_center() + np.array([0,-0.6,0]), color=GREEN_SCREEN) + r2label = TextMobject(r'$R_{2}$', color=WHITE).next_to(r2, 0.9*RIGHT, buff = 0).scale(0.6) + + curvature2 = VGroup(*[circle2, tgt2, r2, r2label]) line = always_redraw(get_tangent_line) -- cgit From 0fe85fe7b505f92718d7401e065a50077a8de252 Mon Sep 17 00:00:00 2001 From: Saarth Deshpande Date: Wed, 1 Jul 2020 13:01:29 +0530 Subject: Update README.md --- .../geometry-of-planes-and-curves/arc-length-and-curvature/README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature') diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md index a2f71d7..10786d6 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md @@ -4,5 +4,8 @@ **file2_circle_curvature.py**
![file2_circle_curvature.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif) +**file3_curvature_interpretation.py**
+![file3_curvature_interpretation.py](https://github.com/saarthdeshpande/FSF-mathematics-python-code-archive/blob/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif) + **file4_different_curvature_single_curve.py**
![file4_different_curvature_single_curve.py](https://raw.githubusercontent.com/saarthdeshpande/FSF-mathematics-python-code-archive/master/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif) -- cgit From 2fee7bc2a219755e6018d3c1a5fb995d8eccf287 Mon Sep 17 00:00:00 2001 From: Saarth Deshpande Date: Wed, 1 Jul 2020 13:11:25 +0530 Subject: math error fix --- .../file3_curvature_interpretation.gif | Bin 702280 -> 700862 bytes .../file3_curvature_interpretation.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature') diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif index 39489b7..22a450a 100644 Binary files a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif differ diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py index cf6b032..d8dd0a4 100644 --- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py +++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py @@ -20,7 +20,7 @@ class interpretation(Scene): # self.play(FadeIn(VGroup(*[tgt, tgt2, nm, nm2, nmText, tgtText, square, arrow, arrowText]))) tgt2text = TextMobject(r'$\frac{r\prime (t)}{\left| r\prime (t)\right|}$').shift(1.1*UP).scale(0.7).rotate(63*DEGREES ) - nm2text = TextMobject(r'$\frac{dT}{dt} = \frac{r\prime\prime (t)}{\left| r\prime (t)\right|}$').scale(0.6).shift(0.5*RIGHT+0.6*DOWN).rotate(-25*DEGREES) + nm2text = TextMobject(r'$\frac{r\prime\prime (t)}{\left| r\prime (t)\right|}$').scale(0.7).shift(0.7*RIGHT+0.8*DOWN).rotate(-25*DEGREES) unit2 = unit.copy().scale(0.5).shift(0.75*LEFT+0.25*DOWN) self.play(FadeIn(VGroup(*[tgt, tgtText]))) -- cgit