Added support for homogeneous coordinates.