def lookAt(origin, center, up=None):
    'Build a (left-handed) look-at matrix\n\n    See glm::glc::matrix_transform::lookAt for reference\n\n             + Z (up)\n            /\n           /\n    (origin) o------ + X (center)\n                       + Y\n\n    Arguments:\n        origin (Vector): Starting position\n        center (Vector): Point towards this\n        up (Vector, optional): Up facing this way, defaults to Y-up\n\n    Example:\n        >>> mat = lookAt(\n        ...   (0, 0, 0),  # Relative the origin..\n        ...   (1, 0, 0),  # X-axis points towards global X\n        ...   (0, 1, 0)   # Z-axis points towards global Y\n        ... )\n        >>> tm = Tm(mat)\n        >>> int(degrees(tm.rotation().x))\n        -90\n\n    '
    if isinstance(origin, (tuple, list)):
        origin = Vector(origin)
    if isinstance(center, (tuple, list)):
        center = Vector(center)
    if ((up is not None) and isinstance(up, (tuple, list))):
        up = Vector(up)
    up = (up or Vector(0, 1, 0))
    x = (center - origin).normalize()
    y = ((center - origin) ^ (center - up)).normalize()
    z = (x ^ y)
    return MatrixType((x[0], x[1], x[2], 0, y[0], y[1], y[2], 0, z[0], z[1], z[2], 0, 0, 0, 0, 0))
Build a (left-handed) look-at matrix

See glm::glc::matrix_transform::lookAt for reference

         + Z (up)
        /
       /
(origin) o------ + X (center)
                   + Y

Arguments:
    origin (Vector): Starting position
    center (Vector): Point towards this
    up (Vector, optional): Up facing this way, defaults to Y-up

Example:
    >>> mat = lookAt(
    ...   (0, 0, 0),  # Relative the origin..
    ...   (1, 0, 0),  # X-axis points towards global X
    ...   (0, 1, 0)   # Z-axis points towards global Y
    ... )
    >>> tm = Tm(mat)
    >>> int(degrees(tm.rotation().x))
    -90
def lookAt(origin, center, up=None):
    'Build a (left-handed) look-at matrix\n\n    See glm::glc::matrix_transform::lookAt for reference\n\n             + Z (up)\n            /\n           /\n    (origin) o------ + X (center)\n                       + Y\n\n    Arguments:\n        origin (Vector): Starting position\n        center (Vector): Point towards this\n        up (Vector, optional): Up facing this way, defaults to Y-up\n\n    Example:\n        >>> mat = lookAt(\n        ...   (0, 0, 0),  # Relative the origin..\n        ...   (1, 0, 0),  # X-axis points towards global X\n        ...   (0, 1, 0)   # Z-axis points towards global Y\n        ... )\n        >>> tm = Tm(mat)\n        >>> int(degrees(tm.rotation().x))\n        -90\n\n    '
    if isinstance(origin, (tuple, list)):
        origin = Vector(origin)
    if isinstance(center, (tuple, list)):
        center = Vector(center)
    if ((up is not None) and isinstance(up, (tuple, list))):
        up = Vector(up)
    up = (up or Vector(0, 1, 0))
    x = (center - origin).normalize()
    y = ((center - origin) ^ (center - up)).normalize()
    z = (x ^ y)
    return MatrixType((x[0], x[1], x[2], 0, y[0], y[1], y[2], 0, z[0], z[1], z[2], 0, 0, 0, 0, 0))