2
votes

Is there a way to use quaternions for only 2d rotations?

I have an iPhone app which should get every rotation avoiding Gimbal Lock, and I understood that the solution could be using quaternions or rotation matrix.

However, I find difficult to understand how can I use quaternions for 2d rotation instead of using 3d rotation.

Can you give me a suggestion?

Thank you in advantage!

1

1 Answers

2
votes

From algorithmic point of view you can start from understanding quaternions. However, you can see how to convert 3D rotation to 2D rotation. Finally, you can see how to include quaternions in ios graphics using GLKQuaternion Reference.