3 dimensional torque from angular velocity

Click For Summary

Discussion Overview

The discussion revolves around converting angular velocity into a 3D torque for a video game physics problem. Participants explore the relationship between rotation matrices, eigenvalues, and the application of torque to align one rod with another in three-dimensional space.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks to determine the torque direction from angular velocity using Euler angles and rotation matrices.
  • Another suggests finding the rotation axis using the eigenvector of the rotation matrix corresponding to the eigenvalue of 1.0.
  • A participant describes the need to apply torque to an unfixed rod to make it parallel to a fixed rod, raising questions about subtracting rotation matrices.
  • There is a mention of the Euler–Rodrigues formula for constructing a rotation matrix to facilitate the alignment of the rods.
  • One participant discusses using the rotation matrix to draw arrows representing magnetic fields in a 3D space, indicating a similar problem context.
  • Another participant expresses uncertainty about the term "Euler vector" and seeks clarification on the meaning of the Euler angles.
  • It is noted that the rotation matrix can be constructed from the three angles, and the rotation axis can be derived from this matrix.
  • One participant acknowledges the need for iterative methods or libraries to find eigenvectors of a 3x3 matrix.

Areas of Agreement / Disagreement

Participants express various approaches to the problem, with some suggesting methods for calculating the rotation matrix and others discussing the application of torque. There is no clear consensus on the best method to achieve the desired outcome, and several competing views remain.

Contextual Notes

Participants mention limitations in their understanding of rotation matrices and eigenvalues, indicating a reliance on external resources for clarification. The discussion also reflects varying levels of familiarity with the mathematical concepts involved.

drfrev
Messages
7
Reaction score
0
Hello,

I am currently making a video game and have run into a bit of a physics problem. I have taken two semesters of physics in college (wasn't too great at it) so I know how to do simple things. I am currently trying to turn an angular velocity into a 3D torque. The angle is a Euler vector ex. (X,Y,Z) using a XYZ order, and I need the equivalent torque in 3 space. I only need the torque direction as the magnitude isn't that important. I have been trying to figure it out but with no luck.

Thanks for any help
 
Physics news on Phys.org
It seems you want to find the rotation axis, but then do you have the rotation matrix? if yes, one of its eigenvectors corresponding the eigenvalue of 1.0 is the rotation axis.
 
I will be a bit more descriptive to flush out my questions better. I have two "rods" in three space. One rod is fixed, while the other is not. I need to apply a torque to the unfixed rod to make it become parallel to the fixed rod.

Okay, I am able to get the rotation matrix from each of the "rods", is there any way to "subtract" them to get the matrix rotation that separates them, because then I could use what you said. Also how would I go about calculating the eigenvalue of a rotation matrix. (I am not used to rotation matrices which is why I was using angular velocity above. After making this reply I will be looking up eigenvalue on google in case you don't want to go into that)
 
Each bar is represented by a vector. If you have the rotation matrix to multiply it by the vector of unfixed bar to become parallel the fix one, isn't your problem solve then? If so, I will explain how to construct the matrix from the two vectors.
 
I don't quite know what you mean but each bar is represented by a vector as the center and a rotation matrix representing orientation.
 
I hope you are familiar with the following programming language. The calculation is based on Euler–Rodrigues formula.
The matrix rotMat rotates every point of the object in 3D space by alpha radian around rotAx ( rotation axis). It can make the bars parallel.

public static Mat rotMat(Vect rotAx,double alpha)
{
double e1,e2,e3,e4;

e1=rotAx.el[0]*sin(alpha/2);
e2=rotAx.el[1]*sin(alpha/2);
e3=rotAx.el[2]*sin(alpha/2);
e4=cos(alpha/2);

Mat M=new Mat(3,3);
M.el[0][0]=pow(e1,2)-pow(e2,2)-pow(e3,2)+pow(e4,2);
M.el[0][1]=2*(e1*e2-e3*e4);
M.el[0][2]=2*(e1*e3+e2*e4);
M.el[1][0]=2*(e1*e2+e3*e4);
M.el[1][1]=-pow(e1,2)+pow(e2,2)-pow(e3,2)+pow(e4,2);
M.el[1][2]=2*(e2*e3-e1*e4);
M.el[2][0]=2*(e1*e3-e2*e4);
M.el[2][1]=2*(e2*e3+e1*e4);
M.el[2][2]=-pow(e1,2)-pow(e2,2)+pow(e3,2)+pow(e4,2);
return M;
}
 
I use it for the following problem:

I need to draw arrows showing the magnetic field in the space. Using Java3D, I can draw a 3D arrow in z direction and the arrow center is the origin but I need to draw the arrow at point P and in direction given by the field at point P. Using the matrix, the object is first rotated to become parallel with the field direction, then by a translation, moves to the point. I think it is kind of similar to your problem.
 
I need to use a torque on the object so that the physics engine can handle collisions. The engine will handle the actual vertex rotation. I have a function which can apply the torque to the object for the next physics tick. It can apply a local or global torque. (Though I do understand that language)
 
Sorry what i suggested was not physics by linear algebra. Out of curiosity, could you explain about the Euler angle you said. What are X,Y and Z ? I have heard of Euler angles but not Euler vector.
 
  • #10
It's the same thing, (x,y,z) being the rotation acording to that axis. XYZ order means that it rotates on the x-axis first, then the y axis, then the z axis.
 
  • #11
So you have the three angles and can construct the rotation matrix. From this matrix, you can obtain the rotation axis to apply torque to. This axis is the eigenvector of the matrix. see http://en.wikipedia.org/wiki/Rotation_matrix

Eigenvectors of a 3x3 matrix is, to my knowledge, found by iterative methods. However you can use a library for that purpose.
 
  • #12
Thanks, I will try it out tomorrow. Thank you for all the help, I really do appreciate it.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 39 ·
2
Replies
39
Views
4K
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 60 ·
3
Replies
60
Views
7K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K