SLERP algorithm for orientation