(rot_z=0, rot_y=0, rot_x=0)
return np.eye(3)
This method returns the rotation matrix for given rotations around z, y and
    x axes.  The output rotation matrix is equal to the composition of the
    individual rotations.  Rotations are counter-clockwise. The default value of
    the three rotations is zero.

    :param float rot_z: rotation angle (in radians) around z-axis.
    :param float rot_y: rotation angle (in radians) around y-axis.
    :param float rot_x: rotation angle (in radians) around x-axis.

    :return: rot_matrix: rotation matrix for the given angles. The matrix shape
        is always (3, 3).
    :rtype: numpy.ndarray

    :Example:

    >>> import pygem.affine as at
    >>> import numpy as np
    >>> from math import radians
    >>> # Example of a rotation around x, y, z axis
    >>> rotz = radians(10)
    >>> roty = radians(20)
    >>> rotx = radians(30)
    >>> rot_matrix = at.angles2matrix(rotz, roty, rotx)

    .. note::

        - The direction of rotation is given by the right-hand rule.
        - When applying the rotation to a vector, the vector should be column
            vector to the right of the rotation matrix.
This method returns the rotation matrix for given rotations around z, y and
    x axes.  The output rotation matrix is equal to the composition of the
    individual rotations.  Rotations are counter-clockwise. The default value of
    the three rotations is zero.
This method returns the rotation matrix for given rotations around z y and x axes . The output rotation matrix is equal to the composition of the individual rotations . Rotations are counter - clockwise . The default value of the three rotations is zero .
def angles2matrix(rot_z=0, rot_y=0, rot_x=0):
    """
    This method returns the rotation matrix for given rotations around z, y and
    x axes.  The output rotation matrix is equal to the composition of the
    individual rotations.  Rotations are counter-clockwise. The default value of
    the three rotations is zero.

    :param float rot_z: rotation angle (in radians) around z-axis.
    :param float rot_y: rotation angle (in radians) around y-axis.
    :param float rot_x: rotation angle (in radians) around x-axis.

    :return: rot_matrix: rotation matrix for the given angles. The matrix shape
        is always (3, 3).
    :rtype: numpy.ndarray

    :Example:

    >>> import pygem.affine as at
    >>> import numpy as np
    >>> from math import radians
    >>> # Example of a rotation around x, y, z axis
    >>> rotz = radians(10)
    >>> roty = radians(20)
    >>> rotx = radians(30)
    >>> rot_matrix = at.angles2matrix(rotz, roty, rotx)

    .. note::

        - The direction of rotation is given by the right-hand rule.
        - When applying the rotation to a vector, the vector should be column
            vector to the right of the rotation matrix.
    """
    rot_matrix = []
    if rot_z:
        cos = math.cos(rot_z)
        sin = math.sin(rot_z)
        rot_matrix.append(
            np.array([cos, -sin, 0, sin, cos, 0, 0, 0, 1]).reshape((3, 3)))
    if rot_y:
        cos = math.cos(rot_y)
        sin = math.sin(rot_y)
        rot_matrix.append(
            np.array([cos, 0, sin, 0, 1, 0, -sin, 0, cos]).reshape((3, 3)))
    if rot_x:
        cos = math.cos(rot_x)
        sin = math.sin(rot_x)
        rot_matrix.append(
            np.array([1, 0, 0, 0, cos, -sin, 0, sin, cos]).reshape((3, 3)))
    if rot_matrix:
        return reduce(np.dot, rot_matrix[::-1])
    return np.eye(3)
def angles2matrix ( rot_z = 0 , rot_y = 0 , rot_x = 0 ) : rot_matrix = [ ] if rot_z : cos = math . cos ( rot_z ) sin = math . sin ( rot_z ) rot_matrix . append ( np . array ( [ cos , - sin , 0 , sin , cos , 0 , 0 , 0 , 1 ] ) . reshape ( ( 3 , 3 ) ) ) if rot_y : cos = math . cos ( rot_y ) sin = math . sin ( rot_y ) rot_matrix . append ( np . array ( [ cos , 0 , sin , 0 , 1 , 0 , - sin , 0 , cos ] ) . reshape ( ( 3 , 3 ) ) ) if rot_x : cos = math . cos ( rot_x ) sin = math . sin ( rot_x ) rot_matrix . append ( np . array ( [ 1 , 0 , 0 , 0 , cos , - sin , 0 , sin , cos ] ) . reshape ( ( 3 , 3 ) ) ) if rot_matrix : return reduce ( np . dot , rot_matrix [ : : - 1 ] ) return np . eye ( 3 )