diff options
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.py | 13 |
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)) |