#include <CGAL/convex_hull_2.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/Barycentric_coordinates_2/Wachspress_2.h>
#include <CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h>
typedef std::vector<Scalar> Scalar_vector;
typedef std::vector<Point> Point_vector;
using std::cout; using std::endl; using std::string;
int main()
{
const int number_of_points = 1000;
Point_vector points, vertices;
const size_t number_of_vertices = vertices.size();
Wachspress_coordinates wachspress_coordinates(vertices.begin(), vertices.end());
wachspress_coordinates.print_information();
cout << endl << "Computed Wachspress coordinates: " << endl << endl;
for(int i = 0; i < number_of_points; ++i) {
Scalar_vector coordinates;
coordinates.reserve(number_of_vertices);
wachspress_coordinates(points[i], std::back_inserter(coordinates));
cout << "Point " << i + 1 << ": " << endl;
for(int j = 0; j < int(number_of_vertices); ++j) cout << "Coordinate " << j + 1 << " = " << coordinates[j] << "; " << endl;
cout << endl;
}
return EXIT_SUCCESS;
}