While trying to work out the general formula for quaternion rotations, I found myself having difficulty getting the result to be the same as the Rodriguez formula as is suggested by multiple works:
$qpq^{-1} = p + 2w*(v\times p) + 2 v\times(v\times p)$
where $q = [w,v]$ (v being the vector component) and quaternion $p = [0,p]$
When doing the math on $qpq^{-1}$, I get the following result:
$qpq^{-1} = pw^2 + 2w*(v\times p) + v\times(v\times p) + v(p\cdot v)$
I have not been able to find any resource showing the actual derivation of the seemingly accepted result, so I find this most confusing.
How is the result of $qpq^{-1}$ actually calculated to get the vector form above?
Thanks,
I've solved this problem myself. The result I was getting is only one half of the solution, I just needed to take it a step further.
Basically, the answer lies in the fact that vector $v = \hat{u}*sin\frac{\theta}{2}$, and $w = cos\frac{\theta}{2}$
Looking at the terms $p w^2 + v(p\cdot v)$, we can expand to get the following:
$p(1-sin^2\frac{\theta}{2}) + v(v\cdot p) \\ = p + v(v\cdot p) - p* sin^2\frac{\theta}{2}$
NOTE: $v\cdot v = (sin\frac{\theta}{2})(sin\frac{\theta}{2})(|1|)$ since the unit vector dotted with itself is 1.
There is a cross product identity for $a\times (a\times b) = a(a\cdot b) - b(a\cdot a)$ so we can see that the following is true:
$p + v(v\cdot p) - p(v\cdot v) = p + v\times (v\times p)$
Substituting into the original equation, we get the Rodriguez formula as expected:
$qpq^{-1} = p + 2w*(v\times p) + 2v\times (v\times p)$