Вращение вокруг 2-й точки center
с заданным радиусом и скоростью.
Параметр t
- это время в секундах.
def circular_orbit(center, radius, speed, t):
theta = math.fmod(t * speed, math.PI * 2)
c = math.cos(theta)
s = math.sin(theta)
return center[0] + radius * c, center[1] + radius * s