blob: 633e5000f9fb4a4f48ab131de7451667f1dca3ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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))
|