01-28-2010 11:55 PM
I have a 3D cylinder and 3D cone to be displayed in the 3D scene display. I build the cylinder and then the cone. The cone is to be translated by a shift from the origin of the 3D display. The cone should be rotated about its own z - axis whose origin should now co-incide with the shifted position. I tried using the 3D Cartesian co-ordinate shift function to translate the co-ordinate system. How do I then rotate the cone about its z-axis and not the global axis?
Thanks.
HamsterHuey.
01-30-2010 02:20 PM
Hi
I am not sure I understand correctly what you want, but take a look at the rotation matrices, check wikipedia at Rotation matrix given an axis and an angle.
regards
01-31-2010 10:57 PM
@ Nitad.....
Difficult to explain without a pic but I'll try.
1. In a 3D scene display window, add a 3D cylinder. It alligns the cylinder axis with the global z-axis and central plane at x-y plane.
2. Now add a 3D cone. Again, the cone axis is the global z-axis and base plane is the x-y plane
3. Now translate the cone in x and y directions (using set translation or translation vi)
4. If in this new position, I want to rotate the cone about an axis parallel to the global y-axis but with an origin at its apex point (in the new location), how do I do it?
If I use rotation.vi with [0 1 0] axis and angle, it rotates it about the global y-axis which I do not want. Any solutions to this problem? This is sort of like rotation about its own axis and revolution about the global axis.
Thanks and regards,
HamsterHuey.