3D Rotation of a rigid body in Fixed Axes (Not Axes Rotation)

Click For Summary
SUMMARY

The discussion centers on the challenge of rotating a 3D body around a fixed axis while maintaining the principal axes in their original orientation. The user, Mushi, seeks to understand how to achieve this using rotation matrices without altering the coordinate system. Key insights include the use of specific rotation matrices for each axis and the importance of the order of operations when applying these matrices. The conversation highlights the distinction between rotating the body versus rotating the axes, emphasizing that the correct application of rotation matrices is crucial for achieving the desired transformation.

PREREQUISITES
  • Understanding of 3D Cartesian coordinates
  • Familiarity with rotation matrices
  • Knowledge of Euler angles and their application
  • Basic trigonometry, particularly sine and cosine functions
NEXT STEPS
  • Study the derivation and application of rotation matrices for 3D transformations
  • Learn about the implications of rotation order in 3D space
  • Explore the concept of quaternion rotations as an alternative to Euler angles
  • Investigate practical applications of 3D rotations in computer graphics
USEFUL FOR

This discussion is beneficial for computer graphics developers, robotics engineers, and anyone involved in 3D modeling or simulations who needs to understand the complexities of 3D rotations and transformations.

mushi
Messages
23
Reaction score
0
Dear All,

I have come across with a seemingly very simple problem but could not solve it by searching on internet and books. May be I am confused.

I want to rotate a 3D body around an arbitrary axis with fixed principal axes. The solutions I found is with Euler angles (Euler rotational matrices). But in Euler case, we are not rotating the body but rotating the principal axes, which I don't want.

In short:
In Euler case we map axes XYZ to X'Y'Z' with rotation matrices using any angle theta.
I my case I want my body position xyz to be mapped to new position x'y'z' after rotation about an arbitrary axis of angle theta. (XYZ = XYZ before and after applying rotation).

I hope I am clear to explain my question here.
Desperately waiting for help.

Thanks in advance.

Mushi
 
Physics news on Phys.org
Hi Filip,

I am sorry that is what I don't want to do. I tried to explain in my post (may be not explained in a good way) that this method is used when you want to rotate the principal axes. I want my principal axes remind fixed.

I rather want to rotate my body (defined by Cartesian coordinates) to be rotated in a fixed, orthogonal, 3D coordinate system i.e. XYZ.

I think I am more clear now :S
 
It's actually the same thing.

Anyway - you've seen wikipedias general rotation matrixes?
http://en.wikipedia.org/wiki/Rotation_matrix

You should be able to demonstrate the equivalence yourself by considering simple rotations of a single point (position vector) and constructing the rotation matrix for it.
 
What you are saying is that given a point P1 (x1, y1, z1, ) after rotation by given angles (α,β,γ) about the axes you want a formula for the point P2 (x2, y2, z2, ) that P moves to ?

And what you have found is given P1 (x1, y1, z1, ) and P2 (x2, y2, z2, ) find angles (α,β,γ).
 
Dear Simon,

You are referring to the same Wikipedia article.

If it is the same then please explain because I am not getting what I intend to.
 
Dear Studiot,

I have points (in Cartesian coordinates) and I know the desired angle (α,β,γ) on which I want my points to be rotated. I want to get the rotated points i.e. P2 in your example.

For example,
P1(1,2,3) has to be rotated around principal axes XYZ at angles (α=10,β=20,γ=30).
What would be P2?

With traditional Euler matrices, we do not rotate P1 onto P2. We rather rotate XYZ to X'Y'Z' which is not I desire.
 
The transformations you require are


\begin{array}{l}<br /> \left[ {\begin{array}{*{20}{c}}<br /> 1 &amp; 0 &amp; 0 \\<br /> 0 &amp; {\cos \theta } &amp; { - \sin \theta } \\<br /> 0 &amp; {\sin \theta } &amp; {\cos \theta } \\<br /> \end{array}} \right] \\ <br /> \left[ {\begin{array}{*{20}{c}}<br /> {\cos } &amp; 0 &amp; {\sin \theta } \\<br /> 0 &amp; 1 &amp; 0 \\<br /> { - \sin \theta } &amp; 0 &amp; {\cos \theta } \\<br /> \end{array}} \right] \\ <br /> \left[ {\begin{array}{*{20}{c}}<br /> {\cos } &amp; { - \sin \theta } &amp; 0 \\<br /> {\sin \theta } &amp; {co{\mathop{\rm s}\nolimits} \theta } &amp; 0 \\<br /> 0 &amp; 0 &amp; 1 \\<br /> \end{array}} \right] \\ <br /> \end{array}

The first matrix gives rotation about the x axis, the second about the y-axis and the third about the z axis.
 
I should point out that the actual end position will depend upon the order in which you perform the rotations.

There is another matrix for the rotation about a general vector from the origin to the point (a,b,c)



\left[ {\begin{array}{*{20}{c}}<br /> {{a^2}(1 - \cos \theta ) + \cos \theta } &amp; {ab(1 - \cos \theta ) - csin\theta } &amp; {ac(1 - \cos \theta ) + bsin\theta } \\<br /> {ab(1 - \cos \theta ) + csin\theta } &amp; {{b^2}(1 - \cos \theta ) + \cos \theta } &amp; {bc(1 - \cos \theta ) - asin\theta } \\<br /> {ac(1 - \cos \theta ) - bsin\theta } &amp; {bc(1 - \cos \theta ) + asin\theta } &amp; {{c^2}(1 - \cos \theta ) + \cos \theta } \\<br /> \end{array}} \right]
 
Last edited:
  • #10
A rotation about successively rotated axes can be rewritten as a rotation about fixed frame axes, with the individual rotations performed in reverse.
 
  • #11
Dear Studiot,

Thanks for the reply. This is actually a further explanation of what has already been said and understood. Thanks for this anyways.

The difficulty I am facing is as follows:
I rotated my coordinates first around Z-axis, 90° CW. This mapped +ve y-coordinate onto +ve x-coordinate. Then when I tried to rotate further around Y-axis, I got some very strange values. But when I rotated my coordinates around X-axis rather than Y-axis (as a second rotation after Z), I got the right results. It happened because Y-axis had actually mapped to X-axis after first rotation.

In summary:
1st Rotation around Z-axis : Using third matrix, 90°, CW
2nd Rotation desired in Y-axis : Using second matrix (wrong results); Using first matrix (correct results)

Please explain. I am confused.
 
  • #12
Dear Muphrid,

Thanks for the reply but your reply is too complicated for me. Can you please explain.
 
  • #13
Although you have posted in the classical physics section this is really a mathematics question and in mathematics we count angles anticlockwise. So for CW angles we must add a negative sign.

Take the first matrix, rotation about the x axis.

This corresponds to the 3 equations

x2 = x1 → x1

y2 = y1 → y1cosθ - z1sinθ

z2 = z1 → y1sinθ + z1cosθ
 
  • #14
Dear Studiot,

My question was not emphasized on CW or ACW. I know that if I invert the sign of 'sin' in the matrices you mentioned, the direction will be changed.

I actually want to ask why I need to rotate in X-axis for second rotation rather than Y-axis when actually the rotation around Y-axis was desired? .Kindly read the my previous post for clarity.

I really appreciate your help for this thread.
 
  • #15
I am trying to help you understand, not do your calculations for you, so bear with me.

Firstly it is the angle θ which is negative for clockwise rotation not the trig function.

Since sin (-θ) = -sin(θ) and cos (-θ) = +cos(θ), this amounts to changing the sign of the sin entries only. But this is not always the case so beware and put the minus sign in the correct place.


Read again my entry from post #9

I should point out that the actual end position will depend upon the order in which you perform the rotations.

To see this take a book, place it in front of you on the desk. Rotate it about about each of two then three axis by 90° or 180°. do this several times with the axes of rotation in different orders.

You will see that the front cover of the book ends up differently depending upon the order you do your rotations.

Murphrid's post was to tell you what order to apply my matrices to the vector (x,y,z) compared to the desired order of rotations - that is to apply the matrix for the last rotation first.
 
Last edited:
  • #16
Dear Studiot,

Thanks for your help. Now I have almost solved my problem.

Kind Regards,
 
  • #17
That's what I like to hear.

:approve:

edit: incidentally the direction of rotation is taken standing at the origin and looking towards +∞ for a right handed set of axes.
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 5 ·
Replies
5
Views
971