[vtkusers] vtkTransform::GetOrientation()

George Kamucha kamucha at hfm.e-technik.uni-kassel.de
Thu Feb 22 04:27:10 EST 2001


Oh yes, you have made me realise the mistake that I was making, my sequence
was totally wrong! With the right sequence, the transform is very accurate.
Thanks a lot for the insight, I really appreciate.

Best regards


Michael Halle wrote:

> George,
> This isn't a vtk issue.  That's just the way 3D rotations work.  You
> decomposed your matrix into three rotation matrices, but order is
> important.  The reason is that in general, sequential rotation around
> any two orthogonal axes produces an effective rotation around the
> third axis.  I'm not going to do the math, but it would not surprise
> me to find that:
> R_y(10)R_x(20)R_z(30) = R_x(20.3)R_y(9.39)R_z(33.4)
>                                                         --Mike
> George Kamucha wrote a second time:
> > ...
> > vtkTransform *trans = vtkTransform::New();
> >             trans->Identity();
> >             trans->PostMultiply();
> >             trans->RotateY(10);
> >             trans->RotateX(20);
> >             trans->RotateZ(30);
> >             trans->GetOrientation();
> > I was expecting the output to be just three elements (so I have read
> > from the Manpages!), but I instead got a matrix which after decomposing
> > ( a lot of work!), gave seemingly the following: Y=9.39, X=20.3 and
> > Z=33.4. So I am wondering, how come I am not getting the three angles as
> > opposed to a matrix, and is the error usually this big?. Please assist.

More information about the vtkusers mailing list