Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

3D Rotation Matrix

12 vues (au cours des 30 derniers jours)
N/A
N/A le 24 Juil 2017
Clôturé : Walter Roberson le 24 Juil 2017
Hi all, I'm new here and am trying to obtain a 3D rotation matrix.
Currently, I have a set of points (x,y,z) from which I have designated one particular point as the origin, and obtained an x'- and y'- vector, based on some features. This also means I can obtain the z'-vector by taking cross product of x' and y'.
I would like to rotate all these points, such that the x'-, y'- and z'- are in line with the x-, y- and z- axes respectively.
An example of the vectors to be mapped would be say:
x': [-0.2831 -0.9246 0.2548]'
y': [0.9242 -0.1919 0.3303]'
How do I obtain a rotation matrix to be applied to all my points? Thank you for your help!
  1 commentaire
Walter Roberson
Walter Roberson le 24 Juil 2017
Duplicated by later https://www.mathworks.com/matlabcentral/answers/349969-3d-rotation-matrix which appears to have been updated.

Réponses (1)

KSSV
KSSV le 24 Juil 2017
If t is the angle by which you want to rotate your coordinates, the following are the rotation matrices.
Along X:
Rx = [1 0 0; 0 cos(t) -sin(t) ; 0 sin(t) cos(t)] ;
Along Y:
Ry = [cos(t) 0 sin(t) ; 0 1 0 ; -sin(t) 0 cos(t)] ;
Along Z axes:
Rz = [cos(t) -sin(t) 0 ; sin(t) cos(t) 0 ; 0 0 1] ;

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by