Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 790
Bellots Avatar asked Jan 19 '26 07:01

Bellots


1 Answers

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.

like image 146
Mihai8 Avatar answered Jan 21 '26 07:01

Mihai8