#ifndef RANDOM_SIMPLE_POLYGON_2_H #define RANDOM_SIMPLE_POLYGON_2_H #include #include #include #include namespace CGAL { template void random_simple_polygon_2( Integer num_verts, Real radius, Polygon_2& P) { typedef typename Polygon_2::Traits Traits; typedef typename Polygon_2::Point_2 Point_2; typedef Creator_uniform_2< double, Point_2> Creator; Random_points_in_square_2< Point_2, Creator> pg(radius); random_polygon_2( num_verts, std::back_inserter(P), pg); make_simple_polygon( P.vertices_begin(), P.vertices_end(), Traits()); CGAL_assertion( P.is_simple()); CGAL_assertion( P.orientation() == COUNTERCLOCKWISE); } } #endif // RANDOM_SIMPLE_POLYGON_2_H