def homogeneous(T):
    """Returns the 4x4 homogeneous transform corresponding to T"""
    (R,t) = T
    return [[R[0],R[3],R[6],t[0]],
            [R[1],R[4],R[7],t[1]],
            [R[2],R[5],R[8],t[2]],
            [0.,0.,0.,1.]]