Matlab rotate matrix

broken image
broken image
broken image

The blue dot starts at (0,1) and the orange dot starts at (1,0). The columns of the rotation matrix are the coordinates of the rotating dots. Here is another look at the same data, cosd(theta) and -sind(theta) for theta = 0:10:360. Here are graphs of $\cos\theta$ and $-\sin\theta$, evaluated with the angle $\theta$ going from 0 to 360 degrees in 10-degree steps. Our MATLAB programs use the degree-based trig functions cosd and sind. Rotation angles are specified in degrees. Rotations about the x -axis are produced by $R_x$, which rotates y and z, while leaving x unchanged. Rotations about the coordinate axes are described by three matrices.

broken image

These matrices operate on vectors with the position of an object, x, y and z, in the first three components. The homogeneous coordinates system used in today's computer graphics software and hardware makes it possible to describe rotations, translations and many other operations with 3-by-3 and 4-by-4 matrices.

broken image