def action(): global pos def processor(rad): return sin(6 * rad) * big_rad x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step
def action(): nonlocal pos def processor(rad): return (1 - sin(rad)) * (big_rad / 2) x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step
def action(): global pos def processor(rad): return rad * 5 + sin(rad * wave_freq) * wave_amp / 5 * (-rad / 5) x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step
def action(): to_center(small_ball) global pos def processor(rad): return 4 * sin(2 * rad) * big_rad / 4 x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step
def action(): nonlocal pos def processor(rad): return (2 - 2 * sin(rad) + sin(rad) * ((abs(cos(rad)))**(1 / 2) / (sin(rad) + 1.4))) * big_rad / 2 x, y = from_polar(pos, processor) move_to(small_ball, x, y + big_rad * (4 / 5), True) pos += _step
def action(): global pos, _step if 0 <= ((pos - (90 / 3)) % (90 * 2 / 3)) <= (90 * 2 / 3): def processor(rad): return big_rad * cos(3 * rad) else: def processor(rad): return 0 pos -= (90 * 2 / 3) _step = -_step x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step
def action(): global pos, _step if 45 <= ((pos - 90) % 180) <= 135: def processor(rad): return 4 * cos(2 * rad) * big_rad / 4 else: def processor(rad): return 0 pos -= 180 _step = -_step x, y = from_polar(pos, processor) move_to(small_ball, x, y, True) pos += _step