I checked manim's method. I tried using add_updater.
from manimlib.imports import *
class test(Scene):
def construct(self):
self.t_offset = 0
dot = Dot()
rate = 0.25
orbit = Circle()
def around_circle(mob, dt):
self.t_offset += (dt * rate)
mob.move_to(orbit.point_from_proportion(self.t_offset % 1))
dot.add_updater(around_circle)
self.add(dot)
self.wait(5)
https://www.youtube.com/watch?v=c5djg93rWjg
that's all.
Recommended Posts