How to rotate about an axis parallel to x axis?
Show older comments
I'm trying to rotate a vector around one axis parallel to x axis.
To my understanding, the rotation around x axis in 3d space is by applying:
a = 1;
xcord = [0 a]; ycord = [0 0]; zcord = [0 0];
pos = [xcord; ycord; zcord];
theta = 30;
Rot = [1, 0, 0; 0, cosd(theta), -sind(theta); 0, sind(theta), cosd(theta)];
pos_new = Rot*pos;
This follows the axis-angle representation of rotating about x axis. But what if I want to rotate about an axis parallel to x axis?
Thanks in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Geometric Transformation and Image Registration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!