summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
diff options
context:
space:
mode:
authorPurusharth Saxena2020-06-23 17:10:19 +0530
committerGitHub2020-06-23 17:10:19 +0530
commit959329ed76fb5350f5f68aeb8937a37b62138890 (patch)
treee6fd874de58f65329b0601792cab0a7ddeb0a1b9 /FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
parentc6da725924409e6a92cff4f51d6ce17ce256b078 (diff)
parent5a80fc01354cb1ed46a42a3e67126a6f966cf4cc (diff)
downloadFSF-mathematics-python-code-archive-959329ed76fb5350f5f68aeb8937a37b62138890.tar.gz
FSF-mathematics-python-code-archive-959329ed76fb5350f5f68aeb8937a37b62138890.tar.bz2
FSF-mathematics-python-code-archive-959329ed76fb5350f5f68aeb8937a37b62138890.zip
Merge pull request #36 from saarthdeshpande/master
post-review updates
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
new file mode 100644
index 0000000..633e500
--- /dev/null
+++ b/FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
@@ -0,0 +1,13 @@
+from manimlib.imports import *
+
+class brachistochrone(Scene):
+ def construct(self):
+ curve = ParametricFunction(
+ lambda t: np.array([
+ 0.5*(t - np.sin(t)),
+ 0.5*(1 - np.cos(t)),
+ 0
+ ]), t_max = np.pi
+ ).scale(5).rotate(540*DEGREES)
+ dot = Dot(color = RED, radius = 0.2)
+ self.play(FadeIn(curve), MoveAlongPath(dot, curve, run_time = 2))