def lookat(eye, target, up):
    eye = np.array(eye)
    target = np.array(target)
    up = np.array(up)
    F = (target[:3] - eye[:3])
    f = normalize(F)
    U = normalize(up[:3])
    s = np.cross(f, U)
    u = np.cross(s, f)
    M = np.eye(4)
    M[:3, :3] = np.vstack([s, (- u), f]).T
    T = translate(eye)
    return T.dot(M)
def lookat(eye, target, up):
    eye = np.array(eye)
    target = np.array(target)
    up = np.array(up)
    F = (target[:3] - eye[:3])
    f = normalize(F)
    U = normalize(up[:3])
    s = np.cross(f, U)
    u = np.cross(s, f)
    M = np.eye(4)
    M[:3, :3] = np.vstack([s, (- u), f]).T
    T = translate(eye)
    return T.dot(M)