From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate an object around multiple axes

Hi guys, I'm a little bit confused about the machanism of how to rotate an object in 3D picutre. 

My goal is to let a cone pointing at the origin at any given position, but it seems it's hard to rotate the cone with the 'set rotation. vi' around more than 1 axis.

Is there any intuitive way to rotate an object?

 

It is at (2,2,2), initially it points up in z axis

ini-dir.png  

This is what I want, (I set (1, -0.2, -0.3) and 135° in set rotation. vi, it works but I don't know why Smiley Frustrated)

id-dir.png

 

Thanks a lot !!!

yhs

0 Kudos
Message 1 of 3
(2,801 Views)

the axes of rotation will be the cross product of (the vector from origin to cone) and (orientation of the cone).  The angle of rotation can be calculated from these two vectors as well.

 

The vectors would be [2,2,2] and [0,0,1] as you have the VI set up currently.

0 Kudos
Message 2 of 3
(2,765 Views)

Thank you very much, it works 

0 Kudos
Message 3 of 3
(2,728 Views)