Hi all, I'm new here and am trying to obtain a 3D rotation matrix.
Currently, I have a set of n points: (x1,y1,z1), (x2,y2,z2)...(xn,yn,zn)
from which I have designated one particular point as the origin, and obtained an x'- and y'- vector, based on some features. It is unimportant, for this question, how I chose my origin and got the x'- and y' vector. From the x'- and y' vector, I can also obtain the z'-vector by taking cross product of x' and y'.
Now, I would like to rotate all these points about the origin I have defined, such that the x'-, y'- and z'- vectors are in line with the x-, y- and z- axes respectively.
Hence, I am looking for a 3x3 rotation matrix, R, that can be applied to all points such that:
Transformed (x,y,z) = R * Original (x,y,z)
An example of the vectors to be mapped would be say:
x': [-0.2831, -0.9246, 0.2548]' to be mapped to x: [1 0 0]
y': [0.9242, -0.1919, 0.3303]' to be mapped to y: [0 1 0]
z' will be mapped automatically if the above 2 are satisfied.
Thank you for your help!
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/349969-3d-rotation-matrix#comment_471378
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/349969-3d-rotation-matrix#comment_471378
Sign in to comment.