An algorithm for reconstructing a convex polygon from its covariogram