You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
523 B
19 lines
523 B
from manim import *
|
|
|
|
|
|
class PointMovingOnShapes(Scene):
|
|
def construct(self):
|
|
circle = Circle(radius=1, color=BLUE)
|
|
dot = Dot()
|
|
dot2 = dot.copy().shift(RIGHT)
|
|
self.add(dot)
|
|
|
|
line = Line([3, 0, 0], [5, 0, 0])
|
|
self.add(line)
|
|
|
|
self.play(GrowFromCenter(circle))
|
|
self.play(Transform(dot, dot2))
|
|
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
|
|
self.play(Rotating(dot, about_point=[2, 0, 0]), run_time=1.5)
|
|
self.wait()
|