Euler rotation of objects with velocity vectors

Click For Summary

Discussion Overview

The discussion revolves around the problem of rotating points in 3D space using Euler angles while maintaining the integrity of associated velocity vectors. Participants explore the implications of using rotation and transformation matrices to achieve this, particularly in the context of computational efficiency when dealing with multiple objects.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • One participant describes the need to rotate points within a cylinder and maintain their velocity vectors in the original direction after rotation, raising a question about how to achieve this.
  • Another participant expresses a strong opinion against using Euler angles, suggesting the use of rotation and transformation matrices instead to handle the rotation of vectors.
  • A clarification is made regarding the distinction between rotation matrices (which describe physical rotation) and transformation matrices (which change the reference frame of a vector).
  • One participant seeks further clarification on how to visualize the change in velocity vectors as the points are rotated, indicating a potential confusion about the relationship between the original and new reference frames.
  • Another participant suggests optimizing the computation of the rotation by pre-computing sine and cosine values, and emphasizes the efficiency of using the transpose of the rotation matrix for transforming velocity vectors.
  • A later reply confirms that the proposed method of using the transpose of the rotation matrix is indeed correct, indicating a resolution to the computational concern raised earlier.

Areas of Agreement / Disagreement

While there is a general agreement on the method of using rotation and transformation matrices, the initial skepticism about Euler angles suggests some disagreement on the best approach. The discussion appears to resolve around the computational method proposed, but the initial concerns about Euler angles remain unaddressed.

Contextual Notes

Participants discuss the computational efficiency of their methods, indicating that the approach may depend on the specific implementation of the rotation and transformation matrices. There is also an acknowledgment of the potential confusion regarding the visualization of vector changes in different reference frames.

jimbo_durham
Messages
13
Reaction score
0
I have a number of objects (points) in a 3D space. I need to rotate this space using euler angles (or equivilent) and place it in another coordinate system. (ie i start with objects placed within the confines of a cylinder aligned with the z axis, and after rotation have a cylinder of objects at some chosen angle and orientation compared to the z' axis in a larger cartesian space.)

Each one of these points in given an initial velocity, which must be kept during the rotations. ie if a point initialy has a velocity towards the center of the cylinder (the z axis before rotation), the velocity after rotation must be of the same magnitude and towards the center of the cylinder (ie NOT the new z' axis).

I can easily rotate the points, howoever i cannot work out how to rotate the velocity vectors about the origin with the points in order to keep the velocities true. can anyone suggest how i could do this please?

in case this is not clear, i shall give an example of one point

say i have a point which is on the point on the x-axis with a vector representing its velocity pointing towards the z axis. a rotation in the xz plane of 90degrees would put the point on the z axis with the velocity pointing towards the xy plane.

hope this didnt make this more complicated. the important thing is not the velocity, it is simply a euler rotation of a point (x1,y1,z1) which has attached a vector (vx1, vy1, vz1) which starts at (x1,y1,z1).

what i need in the end is the point in the new coordinate system and the velocity vector associated with it.

can this be done and how?

thanks for reading all this
jimbo
 
Last edited:
Mathematics news on Phys.org
First, let me get one thing off my chest: Euler angles are evil. I am going to assume you've done something sane with the evil Euler angles such as converting them to a rotation or transformation matrix.

I take care to distinguish between rotation and transformation matrices. Here is what I mean by the two terms:
  • A rotation matrix describes the physical rotation of some object (i.e., your cylinder) in space. For example, the act of rotating a vector about some axis is a new vector. Assuming you are using column vectors, the coordinates of the new vector as expressed in some reference frame is the product of a rotation matrix and the coordinates of the old vector as expressed in the same reference frame.
  • A transformation matrix describes how to transform some quantity (the same quantity) from one reference frame to another. For example, suppose you have the coordinates of a vector as expressed in some reference frame and want to express the vector in some other reference frame. There is only one vector, just two different representations of it. The transformed coordinates of the vector are the product of a transformation matrix and the original coordinates of the vector.

What you want to to is to rotate the object and transform the velocities. In this case, the transformation matrix is simply the transpose of the rotation matrix (and vice-versa).
 
thanks for the quick reply.

for my application this is a computational problem involving lots of objects, and i have a line of code changing my (x,y,z) into (x',y',z') using three euler angles (equivilent to a rotation matrix).

this is easy to visualize, however i cannot easily visualize a change in the vector, because the vector is not just a change in coordinates, it remains in the direction defined by the orrigonal coordinate system which is then placed at a rotated position within the new system, so the vector has a new direction in the new referance frame. also the start point of the vector changes as it is attached to my point which itself is moved

...i might be confusing myself. if you can expand on your explanation so i can get my head round this that would be great.
 
Is your "line of code" that changes your (x,y,z) to (x',y',z') a function call that takes a vector, three Euler angles as input and produces a rotated vector as output? If so, that function is computing the sine and cosine of each of the three angles, which is very wasteful when you do this for "lots of objects". You can save a lot of CPU time by pre-computing those values, or even better, by computing the rotation matrix. A simple function call (or even faster, a macro) will quickly compute the rotated vector.

The transformation matrix in question is just the transpose of the rotation matrix. Simply transform the velocity vectors. You don't even have to compute the transformation matrix. Just write a function or macro that computes RT*x as opposed to R*x.
 
Thankyou. yes it is a function call to a routine which computes the sin/cos of the the three angles once before using that simple numerical values to calculate the rotations.

I understand what you have said about the transpose of the rotation matrix being a transform martic which simply changes the coordinate system of the old velocity vector into the new coordinate system. it always makes more sense in the morning

Again thank you for your help, will post back here if everything works for the benifit of anyone following this thread for their own work
 
perfect, this method is indeed correct. Thankyou D H
 
You're welcome, and good luck.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 12 ·
Replies
12
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
67
Views
5K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
968