LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to rotate 3D object in opnegl with euler angle xyz

Hello,
 
Labview 8.5.1 : I use OpenGl to display a scene and I would like to rotate my object with euler angle. I had this specific angle order (from motion capture) : X, Y and Z.
 
I found euler VI but with ZXZ angle... Any suggestion ? Do I need to use matrix or quaternion ?
 
Thanks in advance.
0 Kudos
Message 1 of 4
(5,128 Views)

BB,

Can you post your code with a data example embedded?  It may be easier to see what you are refering to.  Regards, -SS



0 Kudos
Message 2 of 4
(5,086 Views)

Hello,

Thank's for your question...

Unfortunately, I can send you the code, because it is a LVOOP project with more than 1000 VIs...

My need is very "simple" : just to get an algorithm to "view" orientation in an opengl scene. I construct wrl object. I have a file in input with X;Y;Z;rX,rY;rZ;t.

The TSA toolkit have VIs to transform oritentation to Euler but with the Z-X-Z order... and I need X-Y-Z order.

Any suggestion ?

0 Kudos
Message 3 of 4
(5,067 Views)

The XYZ transform is just a series of matrix multiplication that can be multiplied out. Then the function can be written in the express function block. I know there's a matrix multiply block, but am not familiar myself for how you set up the matrices in LabVIEW.

 

The X transform is x_global = [1, 0, 0; 0, cos(x_angle), -sin(x_angle); 0, sin(x_angle), cos(x_angle)] x_body.

The Y transform is x_global = [cos(y_angle), 0, sin(y_angle); 0, 1, 0; -sin(y_angle), 0, cos(y_angle)] x_body.

The Z transform is x_global = [cos(z_angle), -sin(z_angle), 0; sin(z_angle), cos(z_angle), 0; 0, 0, 1] x_body.

 

Before relying on the system, I would check that you have the matrices in the right order and sign.

 

Hope this helps, Alan

0 Kudos
Message 4 of 4
(4,900 Views)