def _rodrigues_to_dcm(axis, angle):
ux, uy, uz = axis / np.linalg.norm(axis)<EOL>uxx = ux * ux<EOL>uyy = uy * uy<EOL>uzz = uz * uz<EOL>uxy = ux * uy<EOL>uxz = ux * uz<EOL>uyz = uy * uz<EOL>sn = _sin(angle)<EOL>cs = _sin(np.pi / <NUM_LIT> - angle)<EOL>cs1 = <NUM_LIT:1.> - cs<EOL>R = np.zeros([<NUM_LIT:3>, <NUM_LIT:3>])<EOL>R[<NUM_LIT:0>, <NUM_LIT:0>] = cs + uxx * cs1<EOL>R[<NUM_LIT:0>, <NUM_LIT:1>] = uxy * cs1 - uz * sn<EOL>R[<NUM_LIT:0>, <NUM_LIT:2>] = uxz * cs1 + uy * sn<EOL>R[<NUM_LIT:1>, <NUM_LIT:0>] = uxy * cs1 + uz * sn<EOL>R[<NUM_LIT:1>, <NUM_LIT:1>] = cs + uyy * cs1<EOL>R[<NUM_LIT:1>, <NUM_LIT:2>] = uyz * cs1 - ux * sn<EOL>R[<NUM_LIT:2>, <NUM_LIT:0>] = uxz * cs1 - uy * sn<EOL>R[<NUM_LIT:2>, <NUM_LIT:1>] = uyz * cs1 + ux * sn<EOL>R[<NUM_LIT:2>, <NUM_LIT:2>] = cs + uzz * cs1<EOL>return R<EOL>
Generates transformation matrix from unit vector
and rotation angle. The rotation is applied in the direction
of the axis which is a unit vector following the right hand rule.

Inputs :

    axis : unit vector of the direction of the rotation
    angle : angle of rotation in rads

Returns : 3x3 Rotation matrix