How can I convert global rotation to local rotation for objects?

Click For Summary
SUMMARY

The discussion centers on converting global rotation to local rotation for 3D objects using Euler angles. The global rotations provided are for three objects: a red object at (0.00, 45.00, 0.00), a blue object at (45.00, 0.00, 90.00), and a green object at (30.00, 35.26, 35.26). The local rotation for the green object is identified as (0.00, 45.00, 45.00). The user seeks clarification on applying rotation matrices, specifically Rx, Ry, and Rz, to achieve the desired local rotations.

PREREQUISITES
  • Understanding of Euler angles in 3D space
  • Familiarity with rotation matrices (Rx, Ry, Rz)
  • Basic knowledge of trigonometric functions (sine and cosine)
  • Experience with 3D graphics programming concepts
NEXT STEPS
  • Research how to apply rotation matrices to convert global to local rotations
  • Learn about quaternion rotations as an alternative to Euler angles
  • Explore 3D graphics libraries that handle object transformations, such as Unity or Three.js
  • Investigate the implications of gimbal lock in Euler angle rotations
USEFUL FOR

3D graphics developers, game developers, and anyone involved in object manipulation and transformations in a 3D environment.

Fly7
Messages
2
Reaction score
0
Hi all, I don't know if this is the right section, but I really need to solve this problem. I've been searching for the correct formula for two days. OK, here's the picture:

ac2z6g.jpg

The global rotation of all objects (rot_x, rot_y, rot_z): red object (0.00, 45.00, 0.00), blue object (45.00, 0.00, 90.00) and green object (30.00, 35.26, 35.26).

I need to calculate the local rotation of the objects, so the local rotation of the green object should be (0.00, 45.00, 45.00). I want to be able to rotate objects locally, not globally. Here is one formula, but I don't understand how to use it:
Code:
[   1      0       0   ]
[   0    cos(a)  sin(a)] = Rx(a)
[   0   -sin(a)  cos(a)] 

[ cos(a)   0    -sin(a)]
[   0      1       0   ] = Ry(a)
[ sin(a)   0     cos(a)]

[ cos(a) sin(a)   0    ]
[-sin(a) cos(a)   0    ] = Rz(a)
[   0      0      1    ]

[URL="http://stackoverflow.com/questions/6252223/adding-local-rotation-to-global-rotation"]source[/URL]
I hope someone can help me solve this because I'm newbie in math. :frown:
 
Physics news on Phys.org
OK, I've figured out that the global rotation is in euler angles (Z is parent, then X, then Y). Now, maybe someone can help me to convert object's local angles to euler angles. I hope that makes sense to someone. :smile:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K