Expressing a quaternion with zero rotation

This is a discussion on Expressing a quaternion with zero rotation within the C++ Programming forums, part of the General Programming Boards category; Hi!
How do you do this? Up to now all formulas I've seen will cause the x y and z ...

Expressing a quaternion with zero rotation

Hi!

How do you do this? Up to now all formulas I've seen will cause the x y and z parts to collapse by sin(theta/2) if theta is 0. So how do you express say an orientation straight down the x-axis with no rotation about that axis? Thanks

I think the question is, how can you produce a quaternion which points down the x-axis but expresses a rotation of 0? The answer is there's no such thing -- a rotation of 0 about the x-axis is a rotation of 0 about any axis. It's like asking which way the zero vector is pointing. It doesn't point anywhere at all.

Some code from my quaternion camera. Most of it taken from various tutorials on the internet and then plugged in to my existing system. Don't ask me how quaternions work b/c the math behind them is complex. I just know properties of them and various operations that can be performed on them. So this is one of those things in my book that 'just works'.