Program to demonstrate rotation according to quaternion values [duplicate]

On the Wolfram|Alpha website, I type quaternion(1,1,1,1) into the search field. Wolfram|Alpha shows a 3D transformation of the quaternion values representing the orientation of an object.

I have 9 more quaternion values other than quaternion(1,1,1,1).

I would like to ask how can I visualize the 3D transformation of the remaining 9 quaternion values, but without using the Wolfram|Alpha website and opening 9 more tabs and keying in the additional values into search fields.

I hope, rather, to write a Mathematica program to demonstrate rotation according to my 10 quaternion values. Every rotation will take 1 second, so in total the demonstration will take 10 seconds for all 10 rotations.

Can anyone help me how I can write the code for my proposed demonstration?

• Do you want to do this with Wolfram|Alpha, the website, or with Mathematica, the desktop software? – Szabolcs Aug 2 '15 at 11:20
• if can, using mathematica. – Jimmy Lee Jing-yi Aug 2 '15 at 11:29
• You can convert the quaternion to a rotation matrix, then use GeometricTransformation and AffineTransform. – Szabolcs Aug 2 '15 at 11:41
• Maybe you can help me. I have quartenion code here. demonstrations.wolfram.com/… – Jimmy Lee Jing-yi Aug 2 '15 at 12:14
• This may be helpful: mathematica.stackexchange.com/a/51487/1997 – ubpdqn Aug 2 '15 at 23:26

Kind of a part answer: It is quite easy to convert a quaternion to a Mathematica RotationMatrix. First normalize the quaternion. The first element will then be the cosine of half the rotation angle. The last 3 elements together describes the axis of rotation.
q = Normalize@{1, 1, 1, 1}