From c8177571dd518e95dfbaab70ab06f2584a42b9ce Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Fri, 19 Jun 2020 15:33:32 +0530
Subject: post-review updates
---
.../file1_simple_visualization.py | 51 +++++++++++++++++++++
.../file2_circle_curvature.py | 27 +++++++++++
.../file3_curvature_intuition.gif | Bin 0 -> 271189 bytes
3 files changed, 78 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.py
create 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/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
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file3_curvature_intuition.gif differ
--
cgit
From 4d8f2f09a9049e7a86d4def20f4cd1e2e13d682e Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Fri, 19 Jun 2020 16:49:10 +0530
Subject: video update
---
.../file1_simple_visualization.py | 46 +++++++++++++++-------
1 file changed, 32 insertions(+), 14 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.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.py
index 0ae283a..7ab8908 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
@@ -11,41 +11,59 @@ class randomcurve(GraphScene):
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|$')
+ outro = TextMobject(r'The rate of change of unit tangents with \\ respect to the arc length $ds$ 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)
-
+
+ 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)
+ tgt5 = Arrow((2.4*XTD, 0, 0), (3.8*XTD,-2*YTD, 0)).scale(1.2).shift(0.26*RIGHT)
+ tgt6 = Arrow((3.8*XTD,-1*YTD, 0), (4.8*XTD, -1*YTD, 0)).scale(2.8).shift(0.26*RIGHT)
+ tgt7 = Arrow((5.3*XTD, 0, 0),(6.3*XTD,1,0)).shift(0.35*LEFT+0.1*DOWN).scale(1.3)
+
+ dot1 = Dot(tgt1.get_start(), color = RED)
+ dot2 = Dot(tgt2.get_start(), color = RED)
+ dot3 = Dot(tgt3.get_start(), color = RED)
+ dot4 = Dot(tgt4.get_start(), color = RED)
+ dot5 = Dot(tgt5.get_start(), color = RED)
+ dot6 = Dot(tgt6.get_start(), color = RED)
+ dot7 = Dot(tgt7.get_start(), color = RED)
+
+ dots = VGroup(*[dot1, dot2, dot3, dot4, dot5, dot6, dot7])
+
+ ds = CurvedArrow((-4, 2, 0), (tgt1.get_start() + tgt2.get_start()) / 2, color = YELLOW)
+ ds_text = TextMobject(r'$ds$').next_to(ds, UP, buff = 0.1).shift(1.3*LEFT)
+
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.play(ShowCreation(graphobj), FadeIn(dots), FadeIn(ds), FadeIn(ds_text))
self.wait(1)
- self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid))
+ self.play(FadeOut(self.axes), FadeOut(graphobj),FadeIn(mid), FadeOut(dots), FadeOut(ds), FadeOut(ds_text))
self.wait(2)
self.play(FadeOut(mid))
- self.play(FadeIn(self.axes), FadeIn(graphobj))
+ self.play(FadeIn(self.axes), FadeIn(graphobj), FadeIn(dots))
+
- 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]
+ tangents = [tgt1, tgt2, tgt3, tgt4, tgt5, tgt6, tgt7]
for tangent in tangents:
- self.play(ShowCreation(tangent))
+ self.play(ShowCreation(tangent), run_time = 0.2)
self.wait(1)
tangents = VGroup(*tangents)
- self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents))
+ self.play(FadeOut(self.axes), FadeOut(graphobj), FadeOut(tangents), FadeOut(dots))
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
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
--
cgit
From 5a80fc01354cb1ed46a42a3e67126a6f966cf4cc Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Sun, 21 Jun 2020 10:25:22 +0530
Subject: last video for curvature
---
.../file4_different_curvature_single_curve.py | 56 ++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py
(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/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
new file mode 100644
index 0000000..d71adda
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.py
@@ -0,0 +1,56 @@
+from manimlib.imports import *
+
+class GR(GraphScene):
+ CONFIG = {
+ "x_axis_label": "",
+ "y_axis_label": "",
+ "x_min": -4,
+ "x_max": 6,
+ "y_min": -6,
+ "y_max": 10,
+ "graph_origin": ORIGIN
+ }
+
+ def construct(self):
+
+ self.setup_axes()
+ def curve(x):
+ return 3 - (3653*x**2)/5292 + (2477*x**3)/31752 + (13*x**4)/784 - (17*x**5)/5292 + (17*x**6)/63504
+
+ graph = FunctionGraph(curve, x_min=-3, x_max=6, stroke_width = 2, color = BLUE)
+
+ 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)
+
+ dot1 = Dot((0,3,0), color = YELLOW)
+ dot1label = TextMobject(r'$P_{1}$').next_to(dot1, UP+RIGHT, buff = 0.1)
+ dot2 = Dot((4,-1, 0), color = YELLOW)
+ dot2label = TextMobject(r'$P_{2}$').next_to(dot2, DOWN, buff = 0.1)
+ dots = VGroup(*[dot1, dot2, dot1label, dot2label])
+
+ def get_tangent_line():
+ line = Line(
+ ORIGIN, 2 * RIGHT,
+ color=RED,
+ stroke_width=4,
+ )
+ dx = 0.0001
+
+ x = tracker.get_value()
+ p0 = np.array([x-dx,curve(x-dx),0])
+ p1 = np.array([x, curve(x), 0])
+ p2 = np.array([x + dx, curve(x + dx), 0])
+
+ angle = angle_of_vector(p2 - p1)
+ line.rotate(angle)
+ line.move_to(p0)
+ return line
+
+ 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.wait()
--
cgit
From f31fd0cb6fe4f356a43a1597b0396f6792e5b4c6 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:04:29 +0530
Subject: Add files via upload
---
.../file1_simple_visualization.gif | Bin 0 -> 686712 bytes
.../file2_circle_curvature.gif | Bin 0 -> 346667 bytes
.../file4_different_curvature_single_curve.gif | Bin 0 -> 243868 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.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/file1_simple_visualization.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file1_simple_visualization.gif
new file mode 100644
index 0000000..858a8de
Binary files /dev/null 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/file2_circle_curvature.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif
new file mode 100644
index 0000000..989a3b7
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file2_circle_curvature.gif differ
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif
new file mode 100644
index 0000000..3b78b5f
Binary files /dev/null and b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/file4_different_curvature_single_curve.gif differ
--
cgit
From 1a61648b355db2e3bc4fb1c0776f5243ac2aa0f3 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:07:21 +0530
Subject: Create README.md
---
.../arc-length-and-curvature/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
(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
new file mode 100644
index 0000000..e61fd00
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
@@ -0,0 +1,11 @@
+**file1_simple_visualization.py**
+![file1_simple_visualization.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/file1_simple_visualization.gif)
+
+**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_intuition.gif**
+![file3_curvature_intuition.gif](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/file3_curvature_intuition.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 5ef30fc9cfe4faef33b65f23b5b3d95f579e2c88 Mon Sep 17 00:00:00 2001
From: Saarth Deshpande
Date: Wed, 24 Jun 2020 00:07:41 +0530
Subject: Update README.md
---
.../geometry-of-planes-and-curves/arc-length-and-curvature/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 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/README.md b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/arc-length-and-curvature/README.md
index e61fd00..f5313c9 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
@@ -1,10 +1,10 @@
**file1_simple_visualization.py**
![file1_simple_visualization.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/file1_simple_visualization.gif)
-**file2_circle_curvature.py**
+**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_intuition.gif**
+**file3_curvature_intuition.gif**
![file3_curvature_intuition.gif](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/file3_curvature_intuition.gif)
**file4_different_curvature_single_curve.py**
--
cgit