It is just a parameterisation that is this way for historical reasons. They
are a mixture of clockwise and counter clockwise, which is not really ideal
(but should not impact any of the automated routines). It would be better to
have used one of the conventions shown at
http://en.wikipedia.org/wiki/Euler_angle .
Best regards,
-John
On Tuesday 19 February 2008 05:15, SPM NIH wrote:
> Dear SPMers,
>
> I did the rotation estimation for my data, but found that the rotation in y
> (roll) seems to be wrong.
> In spm_matrix.m,
> R1 = [1 0 0 0;
> 0 cos(P(4)) sin(P(4)) 0;
> 0 -sin(P(4)) cos(P(4)) 0;
> 0 0 0 1];
>
> R2 = [cos(P(5)) 0 sin(P(5)) 0;
> 0 1 0 0;
> -sin(P(5)) 0 cos(P(5)) 0;
> 0 0 0 1];
> R3 = [cos(P(6)) sin(P(6)) 0 0;
> -sin(P(6)) cos(P(6)) 0 0;
> 0 0 1 0;
> 0 0 0 1];
>
> But if the rotation is defined as counter-clock wise, then the rotation
> should be
>
> R1' = [1 0 0 0;
> 0 cos(P(4)) -sin(P(4)) 0;
> 0 sin(P(4)) cos(P(4)) 0;
> 0 0 0 1];
>
> R2' = [cos(P(5)) 0 sin(P(5)) 0;
> 0 1 0 0;
> -sin(P(5)) 0 cos(P(5)) 0;
> 0 0 0 1];
> R3' = [cos(P(6)) -sin(P(6)) 0 0;
> sin(P(6)) cos(P(6)) 0 0;
> 0 0 1 0;
> 0 0 0 1];
> Note the sign difference between R1&R1', R3&R3', but R2=R2'. Also, the
> difference between R1' and R2'. (Check
> http://www.euclideanspace.com/maths/algebra/matrix/orthogonal/rotation/inde
>x.htm for
> better description). So, the rotation matrix R1, R2 and R3 are
> inconsistent.
>
> Am I wrong? And are the angles defined as clock-wise or counter-clock-wise?
|