def anim():
    direction = 1
    while True:
        CS_1.rotate_axis_angle(np.array([0, 1, 0]), np.deg2rad(step))  # this is inplace transform
        CS_2.rotate_axis_angle(np.array([1, 0, 0]), np.deg2rad(step))  # this is inplace transform
        CS_3.rotate_axis_angle(np.array([0, 0, 1]), np.deg2rad(step))  # this is inplace transform
        CS_4.euler_angles += np.array([0, 0, np.deg2rad(step)])
        CS_5.euler_angles += direction * np.array([0, np.deg2rad(step), 0])
        CS_6.euler_angles += np.array([np.deg2rad(step), 0, 0])
        if direction == 1 and abs(np.pi - CS_5.euler_angles[1]) < np.deg2rad(step):
            direction *= -1
        elif direction == -1 and abs(CS_5.euler_angles[1]) < np.deg2rad(step):
            direction *= -1
        Visual.update_coordinate_system_box(CS_1, cs_box_1, arrows_1, labels_1)
        Visual.update_coordinate_system_box(CS_2, cs_box_2, arrows_2, labels_2)
        Visual.update_coordinate_system_box(CS_3, cs_box_3, arrows_3, labels_3)
        Visual.update_coordinate_system_box(CS_4, cs_box_4, arrows_4, labels_4)
        Visual.update_coordinate_system_box(CS_5, cs_box_5, arrows_5, labels_5)
        Visual.update_coordinate_system_box(CS_6, cs_box_6, arrows_6, labels_6)
        yield
def anim():
    while 1:
        delta_eulers = np.array([direction_prec * np.deg2rad(step_prec), 0, direction_rot * np.deg2rad(step_rot)])
        CS_1.euler_angles += delta_eulers
        Visual.update_coordinate_system_box(CS_1, cs_box_1, arrows_1, labels_1)
        yield