[vtkusers] Left-Handed vs. Rigth-Handed

Andres Barrera andresba at hotmail.com
Thu Aug 17 13:09:37 EDT 2006


Hello, I have a question regarding to LH -  RH transformation (Rotations).

   I understand that VTK uses RH system, but on pages 52-53 of "The 
Visualization Toolkit-2nd edition", the rotation matrices presented are for 
a LH. Is there any reason to use LH in VTK?

   On the other hand, have some results that are unclear to me:
     1.  I apply some transformation to an actor (origin of actor @ 0, 0, 0 
) in VTK using quaternions.

     2. Retrieve the UserTranf matrix
   (e.g.
          Elements:
        0.0226843   0.0076929  0.999712     24.9333
        0.709023     0.704857  -0.0215119  -50.5692
        -0.70482      0.709307   0.0105338   36.2352
        0                  0                 0                   1
    )

     3. Retrieve the position and orientation of such actor using
          float         auxPos[3] = {0.0, 0.0, 0.0};
          float         auxRot[3] = {0.0, 0.0, 0.0};
          …
          auxTransform->GetPosition     ( auxPos );
          auxTransform->GetOrientation( auxRot );

     (e.g.
	auxPos =  24.9333	-50.5692	36.2352
	auxRot =  45.1786	89.1437	-0.625325
      )
    4.  I’ve implemented ‘by hand’ R(rh) = Rz*Rx*Ry , and R(lh) = Rz*Rx*Ry 
(‘rh’ for rigthH and ‘lh’ for leftH).

        I was expecting R(rh) to be equal to ‘UserTranf matrix’, but is not, 
and actually R(lh)is

Left Handed
---------------
Rz * Rx * Ry = 0.022684158   0.007693103     0.999713081    0
                     0.709022949   0.704857204    -0.021446423    0
                    -0.704820464    0.709307506    0.010534505    0
                              0	              0	                   0         
            1

Right Handed
--------------------
Rz * Rx * Ry =   0.007203458    -0.007693103    -0.999944462	0
                       0.709349155     0.704857204    -0.000378667	0
                       0.704820464    -0.709307506    0.010534505	0
                                0	          0	          0                    
1


      Any ideas on what might be going wrong? Thanks.

            Andres





More information about the vtkusers mailing list