Euler rotation of objects with velocity vectors

Remember, pre-computing the rotation matrix will save you a lot of time. And if you have even more time, pre-computing the transformation matrix will save you even more time, though not as much.In summary, the conversation discusses the issue of rotating a space using Euler angles and maintaining the initial velocities of objects within that space. The solution is to use a rotation matrix and a transformation matrix, with the latter being the transpose of the former. Pre-computing these matrices can save time and efficiency in the process.
  • #1
jimbo_durham
13
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
  • #2
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).
 
  • #3
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.
 
  • #4
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.
 
  • #5
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
 
  • #6
perfect, this method is indeed correct. Thankyou D H
 
  • #7
You're welcome, and good luck.
 

1. What is the Euler rotation of objects with velocity vectors?

The Euler rotation of objects with velocity vectors is a mathematical concept used to describe the rotation of a moving object in three-dimensional space. It takes into account both the rotational and translational motion of the object.

2. How is Euler rotation different from other rotation methods?

Euler rotation is different from other rotation methods because it considers the rotation of an object in three dimensions, whereas other methods may only consider rotation in two dimensions. Additionally, Euler rotation takes into account the object's velocity vectors, making it more accurate for describing real-world movements.

3. What is the significance of Euler angles in Euler rotation?

Euler angles are three angles that represent the orientation of an object in three-dimensional space. In Euler rotation, these angles are used to describe the rotation of the object around its three axes. They are essential in understanding the orientation and movement of an object.

4. How is Euler rotation used in real-world applications?

Euler rotation is used in various fields such as computer graphics, robotics, and aerospace engineering to model and control the movement of objects. It is also used in physics and mechanics to understand the motion of rigid bodies in three-dimensional space.

5. What are the limitations of Euler rotation?

One limitation of Euler rotation is the possibility of gimbal lock, where the rotation of an object becomes unstable or undefined due to the alignment of two or more of its axes. Another limitation is that it cannot account for non-rigid bodies or deformations in an object's shape. In these cases, more complex rotation methods may be necessary.

Similar threads

Replies
2
Views
1K
Replies
2
Views
289
Replies
1
Views
807
Replies
4
Views
2K
Replies
1
Views
2K
Replies
12
Views
624
  • Precalculus Mathematics Homework Help
Replies
17
Views
986
Replies
7
Views
1K
Replies
11
Views
1K
Back
Top