Reputation: 21
I am working with Opengl es to create a stickman and this might seem like a stupid question but when using quaternions to represent rotation what should I do if want the rotation to be around another point than the origin and should I use a unit quaternion or not. my guess is I can rotate and then translate too change the centre of rotation and I'm not going to use unit quaternions. Is this the right path?
Upvotes: 1
Views: 568
Reputation: 45948
Like said in the comments, a non-unit quaternion does not magically rotate around an arbitrary point. So there is no need to use non-unit quaternions. What you need to do is, translate your rotation center to the origin, rotate about the origin with the quaternion as usual and then translate back to the rotation center.
If you want to really represent this whole transformation in a single mathematically clean construct, you can use dual quaternions, but I'm sure this will be overkill.
Upvotes: 1