Affine spatial transformation