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:
authorG Sri Harsha2020-07-01 01:39:39 +0530
committerGitHub2020-07-01 01:39:39 +0530
commitb319aaf00e62572270d1fc48675d65d3d8e58944 (patch)
tree200eb34921deaae1ba440420d852ad3e82c0b839 /FSF-2020/calculus-of-several-variables/geometry-of-planes-and-curves/general-parametric-curves/file3_brachistochrone.py
parent70087cc17df3609a1ed256571bdfd3757ce75e24 (diff)
parent95b35efe6166fe145e44314e11e0a7d3ac638874 (diff)
downloadFSF-mathematics-python-code-archive-b319aaf00e62572270d1fc48675d65d3d8e58944.tar.gz
FSF-mathematics-python-code-archive-b319aaf00e62572270d1fc48675d65d3d8e58944.tar.bz2
FSF-mathematics-python-code-archive-b319aaf00e62572270d1fc48675d65d3d8e58944.zip
Merge pull request #4 from FOSSEE/master
others work
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))