summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature')
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md3
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gifbin686712 -> 675451 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py12
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gifbin0 -> 700862 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.py42
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gifbin271189 -> 0 bytes
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py30
7 files changed, 77 insertions, 10 deletions
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** <br>
![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** <br>
+![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** <br>
![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)
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
--- 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 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/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..22a450a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_interpretation.gif
Binary files 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..d8dd0a4
--- /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{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])))
+ 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
--- a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif
+++ /dev/null
Binary files 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 d71adda..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)
@@ -47,10 +49,30 @@ 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)
+
+ 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)
+
+ 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)
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()