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/file1_simple_visualization.py51
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py27
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gifbin0 -> 271189 bytes
3 files changed, 78 insertions, 0 deletions
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
new file mode 100644
index 0000000..0ae283a
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
@@ -0,0 +1,51 @@
+from manimlib.imports import *
+
+class randomcurve(GraphScene):
+ CONFIG = {
+ "x_min": -4,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 10,
+ "graph_origin": ORIGIN
+ }
+ def construct(self):
+ intro = TextMobject('Consider the following curve.')
+ mid = TextMobject(r'Notice how the direction of the unit tangent vectors\\changes with respect to the arc length.')
+ outro = TextMobject(r'This is called curvature.\\Mathematically, curvature $ = k = \left|{\frac{dT}{ds}}\right|$')
+
+ XTD = self.x_axis_width/(self.x_max- self.x_min)
+ YTD = self.y_axis_height/(self.y_max- self.y_min)
+
+ self.setup_axes(hideaxes=True)
+ graphobj = self.get_graph(self.curve)
+ self.play(FadeIn(intro))
+ self.wait(2)
+ self.play(FadeOut(intro))
+ self.setup_axes(hideaxes=False)
+ self.play(ShowCreation(graphobj))
+ self.wait(1)
+ self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid))
+ self.wait(2)
+ self.play(FadeOut(mid))
+ self.play(FadeIn(self.axes), FadeIn(graphobj))
+
+ tgt1 = Arrow((-2.2*XTD,-0.5*YTD,0),(-1*XTD,1,0))
+ tgt2 = Arrow((-1.2*XTD, 1.93*YTD,0),(0*XTD,1.6,0)).scale(1.2)
+ tgt3 = Arrow((-0.3*XTD,3*YTD, 0), (1.5*XTD, 3*YTD,0))
+ tgt4 = Arrow((1.4*XTD, 2*YTD,0),(2.4*XTD, 1*YTD,0)).scale(2.8)
+
+ tangents = [tgt1, tgt2, tgt3, tgt4]
+ for tangent in tangents:
+ self.play(ShowCreation(tangent))
+ self.wait(1)
+ tangents = VGroup(*tangents)
+ self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents))
+ self.wait(1)
+ self.play(FadeIn(outro))
+ self.wait(2)
+ self.play(FadeOut(outro))
+ self.wait(1)
+
+
+ def curve(self, x):
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504 \ No newline at end of file
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
new file mode 100644
index 0000000..232ac41
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
@@ -0,0 +1,27 @@
+from manimlib.imports import *
+
+class circleC(GraphScene):
+ CONFIG = {
+ "x_min": -6,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 6,
+ "graph_origin": ORIGIN,
+ "x_axis_width": 12,
+ "y_axis_height": 12
+ }
+ def construct(self):
+ epiphany = TextMobject(r'Driving a vehicle on which of \\ the two paths would be easier?').scale(0.6).shift(3.5*LEFT + 3*UP)
+ outro = TextMobject(r'The larger path, due to its \\ smaller curvature, since $k = \frac{1}{R}$.').scale(0.6).shift(3.7*LEFT + 3*UP)
+ XTD = self.x_axis_width/(self.x_max- self.x_min)
+ YTD = self.y_axis_height/(self.y_max- self.y_min)
+
+ circle = Circle(radius = 2, color = BLUE)
+ circle2 = Circle(radius = 3, color = GREEN_E)
+
+ self.setup_axes(hideaxes=True)
+ self.play(FadeIn(self.axes), Write(circle, run_time = 2), FadeIn(epiphany))
+ self.play(Write(circle2, run_time = 3))
+ self.play(ReplacementTransform(epiphany, outro))
+ self.wait(2)
+ self.play(FadeOut(VGroup(*[self.axes, circle, circle2, epiphany, outro])))
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
new file mode 100644
index 0000000..0d6fdcf
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif
Binary files differ