How do axis rotation vectors work, and how do they compare with rotation matrices?

I am having trouble understanding how axis rotation vectors are used when a vector rotates in three-dimensional space. Why are they used and how do they relate to rotation matrices?

I also found a function called vrrotvec2matthat seems to do what I want, but I cannot understand the documentation. In particular, can someone give a clearer explanation (with some example) of the input arguments rand options?

MathWorks explanations are very limited:

Transform rotation from axis view to matrix

m = vrrotvec2mat(r)returns a matrix representation of rotation defined by the rotation vector axis r.

m = vrrotvec2mat(r,options) returns the matrix representation of rotation defined by the rotation vector along the r axis, while the algorithm parameters are replaced by default with the values ​​defined in the parameters.

The options structure contains the epsilon parameter, which represents the value below which the number will be treated as zero (the default value 1e-12).

The rotation vector,, ris a row vector of four elements, where the first three elements determine the axis of rotation, and the last element determines the angle.

To rotate a column vector of three elements, multiply it by the rotation matrix. > To rotate a row vector of three elements, multiply it by the transposed rotation matrix.

+4
1

vrrotvec2mat, , , . , , . .

, , 2D 3D, , (.. y = A*x, x - , ), . . vector v, , 2D 3D .

- axis-angle, . k, , v right- .

, :

:

k , v 45 -. 180 , k, , , vrot - . v|| v_|_ - v k. , , . , .

, , , , , , x, y z.

, , , . , :

:

, vrrotvec2mat, , . / . , vrrotvec2mat vrrotmat2vec .

, , 4- , x, y z k, , theta, . vrrotvec2mat 4- , . , , theta .


, . k z, (0,0,1). 180 , pi... :

>> M = vrrotvec2mat([0 0 1 pi])

M =

   -1.0000   -0.0000         0
    0.0000   -1.0000         0
         0         0    1.0000

180 z, z. , :

enter image description here

theta = pi , , M, vrrot2vec2mat. , , ... options. , Rotrigues Rotation , . options epsilon, - , , . 1e-12 IMHO.

epsilon, , epsilon, ... - :

>> options.epsilon = 1e-15;
>> M = vrrotvec2mat([0 0 1 pi], options);

, , , , v - - , (x,y,z) = (1,0,1). , xz , (x,y,z) = (-1,0,1):

>> M*[1;0;1]

ans =

   -1.0000
    0.0000
    1.0000

, Rotrigues Rotation:

>> v = [1;0;1];
>> k = [0;0;1];
>> theta = pi;
>> vrot = v*cos(theta) + cross(k,v)*sin(theta) + k*(k.'*v)*(1-cos(theta))

vrot =

   -1.0000
    0.0000
    1.0000

, , x, y z.

+10

Source: https://habr.com/ru/post/1606633/


All Articles