def elementaryRotationMatrix(axis, rotationAngle):
if (axis=="<STR_LIT:x>" or axis=="<STR_LIT:X>"):<EOL><INDENT>return array([[<NUM_LIT:1.0>, <NUM_LIT:0.0>, <NUM_LIT:0.0>], [<NUM_LIT:0.0>, cos(rotationAngle), sin(rotationAngle)], [<NUM_LIT:0.0>,<EOL>-sin(rotationAngle), cos(rotationAngle)]])<EOL><DEDENT>elif (axis=="<STR_LIT:y>" or axis=="<STR_LIT:Y>"):<EOL><INDENT>return array([[cos(rotationAngle), <NUM_LIT:0.0>, -sin(rotationAngle)], [<NUM_LIT:0.0>, <NUM_LIT:1.0>, <NUM_LIT:0.0>], [sin(rotationAngle),<EOL><NUM_LIT:0.0>, cos(rotationAngle)]])<EOL><DEDENT>elif (axis=="<STR_LIT:z>" or axis=="<STR_LIT>"):<EOL><INDENT>return array([[cos(rotationAngle), sin(rotationAngle), <NUM_LIT:0.0>], [-sin(rotationAngle),<EOL>cos(rotationAngle), <NUM_LIT:0.0>], [<NUM_LIT:0.0>, <NUM_LIT:0.0>, <NUM_LIT:1.0>]])<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>"+axis+"<STR_LIT:!>")<EOL><DEDENT>
Construct an elementary rotation matrix describing a rotation around the x, y, or z-axis.

Parameters
----------

axis          - Axis around which to rotate ("x", "y", or "z")
rotationAngle - the rotation angle in radians

Returns
-------

The rotation matrix

Example usage
-------------

rotmat = elementaryRotationMatrix("y", pi/6.0)