Computational geometry with affine transformations