How to Rotate "vec"

rotate

rotate.png
To calculate the components of the rotated vector of v around vector u by phi[rad] in right-handed screw rule, use the following code.
v_after =rotate(v_before, vt2q(u, phi));

\[ \overrightarrow{v}_\mathrm{after} =\mathbf{R}(\overrightarrow{u}, \phi) \overrightarrow{v}_\mathrm{before} \overline{\mathbf{R}(\overrightarrow{u}, \phi)} \]

where $\mathbf{R}$ is

\[ \mathbf{R}(\overrightarrow{u}, \phi) = \left[ \frac{{u_x}}{|\vec{u}|}\sin \left( \frac{\phi}{2} \right), \frac{{u_y}}{|\vec{u}|}\sin \left( \frac{\phi}{2} \right), \frac{{u_z}}{|\vec{u}|}\sin \left( \frac{\phi}{2} \right); \cos \left( \frac{\phi}{2} \right) \right] \]


Generated on Tue Mar 15 16:02:38 2005 for QVM by  doxygen 1.4.1