To rotate a vector
around an arbitrary vector
the coordinate system has to be rotated such that the z-axis
is parallel to the vector
,
then we rotate vector
around the z-axis and
then rotate the coordinate system
to its original direction. The equations describing this transformation
are the following [5]:
vector
:

the rotation matrix for rotating z-axis to be parallel to
:

the rotation matrix for rotating
by angle
around z-axis:

rotating vector
by angle
around
:

when rotating vector
around z-axis the
equation is simple:
