Quaternion Rotation

Hi, I’m pretty new to quaternions and I’ve been reading Game Programming Gems. One of the sections is an introduction to quaternions, and it’s established that if quaternion q represents a rotation of angle a around vector A, q = (cos(a/2), sin(a/2) * A). It also says that the result of vector p’s rotation in such a manner is equal to qpq*, where q is normalized and q* is q’s conjugate.

The book skips the explanation of why this works, but says “consider rotating the vector P by an angle a; about an axis A. Using geometry, you can work through the math, expanding everything out until eventually some terms in cos^2(a) and sin^2(a) turn up. These can be turned into cos(2a) and sin(2a) terms, and very soon you end up with a formula that looks a lot like the quaternion multiplication worked through previously.”

Can anyone please explain how this property of quaternions can be proved? Because I’ve tried looking at the problem in various ways and I’ve never come up with anything involving cos^2(a) or sin^2(a), or any other reasoning, for that matter. Thank you for your help, in advance.

EDIT: I changed all the theta symbols to a, because the forum wasn’t displaying it correctly.

Read this:
http://www.itu.dk/people/erikdam/DOWNLOAD/98-5.pdf
Page 24, preposition 21.

If it’s not clear ask again, I’ll try to explain it.

David Eberly’s game physics book has two or three derivations of the rotation property.

Honestly, I worked through one of them, and believe it. However, what it boils down to for me is just ‘algebraically quaternion conjugation and rotation matrices have the same action’! No stunning intuition, no insights into the nature of the universe (for me).

He has another derivation that develops i,j,k of the quaternions as simple rotation generators which, I believe, might offer a better insight and intuition. I haven’t worked through it, but you might ???

Another resource is wikipedia:
wiki quaternion
where the corresponence is proved.

Thanks for your answers – I looked at the pdf that Rosario Leonardi linked to, and I’ve found the proof very helpful. I just have a couple of questions, though: on page 25, the author says that “(Rr)| = r_|_ * cos(theta) + v * sin(theta)” (sorry if my attempt at a perpendicular symbol looks weird :D). Why is that? Also, in page 26, the proof uses the identity “v_1 x (v_2 x v_3) = (v_1 * v_3)v_2 - (v_1 * v_2)v_3”. If you could explain the answers to either of these questions, or give a link to where an answer might be found, that would be great.

The first part show how we can find the rotation in the standard way (without quaternion).
To show this let’s decompose R in the parallel and perpendicular part as regard n.
If I rotate around n the parallel part don’t change. The perpendicular part will rotate into a plane formed by R_|_ and V.

P = Px cos(theta) + Py sin(theta) is the standard way to rotate a point on a plane.

A X (B X C) = (A*C)B-(AB)*C
is the triple product (or Lagrange formula)
http://en.wikipedia.org/wiki/Triple_product#Vector_triple_product

Ok, I think I understand it now. Thanks for all your help, and for the links.