diff --git a/Packages/Generator/doc_tex/Generator/generators_prog1.C b/Packages/Generator/doc_tex/Generator/generators_prog1.C index a91a8d0c8ab..e50a584e386 100644 --- a/Packages/Generator/doc_tex/Generator/generators_prog1.C +++ b/Packages/Generator/doc_tex/Generator/generators_prog1.C @@ -11,10 +11,11 @@ #include #include #include -#include /* only for visualization used */ +#include /* only used for visualization */ -typedef CGAL_Cartesian R; -typedef CGAL_Point_2 Point; +typedef CGAL_Cartesian R; +typedef CGAL_Point_2 Point; +typedef CGAL_Creator_uniform_2 Creator; int main() { @@ -23,11 +24,11 @@ int main() points.reserve(1000); /* Create 600 points within a disc of radius 150. */ - CGAL_Random_points_in_disc_2 g( 150.0); + CGAL_Random_points_in_disc_2 g( 150.0); CGAL_copy_n( g, 600, back_inserter( points)); /* Create 200 points from a 15 x 15 grid. */ - CGAL_points_on_square_grid_2( 500.0, 200, back_inserter(points),(Point*)0); + CGAL_points_on_square_grid_2( 250.0, 200, back_inserter(points),Creator()); /* Select 100 points randomly and append them at the end of */ /* the current vector of points. */ diff --git a/Packages/Generator/doc_tex/Generator/generators_prog2.C b/Packages/Generator/doc_tex/Generator/generators_prog2.C index 120f6f3dd76..a89c6747a5b 100644 --- a/Packages/Generator/doc_tex/Generator/generators_prog2.C +++ b/Packages/Generator/doc_tex/Generator/generators_prog2.C @@ -8,21 +8,13 @@ #include #include #include - -typedef CGAL_Cartesian R; -typedef CGAL_Point_2 Point; - -/* Provide your own CGAL_build_point function. */ -inline -Point& CGAL_build_point( double x, double y, Point& p) { - p = Point( int(x), int(y)); - return p; -} - #include #include #include /* only for visualization used */ +typedef CGAL_Cartesian R; +typedef CGAL_Point_2 Point; +typedef CGAL_Creator_uniform_2 Creator; int main() { @@ -33,7 +25,7 @@ int main() /* Create 250 points from a 16 x 16 grid. Note that the double */ /* arithmetic _is_ sufficient to produce exact integer grid points. */ /* The distance between neighbors is 34 pixel = 510 / 15. */ - CGAL_points_on_square_grid_2( 510.0, 250, back_inserter(points),(Point*)0); + CGAL_points_on_square_grid_2( 255.0, 250, back_inserter(points),Creator()); /* Lower, left corner. */ assert( points[0].x() == -255); @@ -44,7 +36,7 @@ int main() assert( points[249].y() == 255); /* Create 250 points within a disc of radius 150. */ - CGAL_Random_points_in_disc_2 g( 150.0); + CGAL_Random_points_in_disc_2 g( 150.0); CGAL_copy_n( g, 250, back_inserter( points)); /* Check that we have really created 500 points. */ diff --git a/Packages/Generator/doc_tex/support/Generator/generators_prog1.C b/Packages/Generator/doc_tex/support/Generator/generators_prog1.C index a91a8d0c8ab..e50a584e386 100644 --- a/Packages/Generator/doc_tex/support/Generator/generators_prog1.C +++ b/Packages/Generator/doc_tex/support/Generator/generators_prog1.C @@ -11,10 +11,11 @@ #include #include #include -#include /* only for visualization used */ +#include /* only used for visualization */ -typedef CGAL_Cartesian R; -typedef CGAL_Point_2 Point; +typedef CGAL_Cartesian R; +typedef CGAL_Point_2 Point; +typedef CGAL_Creator_uniform_2 Creator; int main() { @@ -23,11 +24,11 @@ int main() points.reserve(1000); /* Create 600 points within a disc of radius 150. */ - CGAL_Random_points_in_disc_2 g( 150.0); + CGAL_Random_points_in_disc_2 g( 150.0); CGAL_copy_n( g, 600, back_inserter( points)); /* Create 200 points from a 15 x 15 grid. */ - CGAL_points_on_square_grid_2( 500.0, 200, back_inserter(points),(Point*)0); + CGAL_points_on_square_grid_2( 250.0, 200, back_inserter(points),Creator()); /* Select 100 points randomly and append them at the end of */ /* the current vector of points. */ diff --git a/Packages/Generator/doc_tex/support/Generator/generators_prog2.C b/Packages/Generator/doc_tex/support/Generator/generators_prog2.C index 120f6f3dd76..a89c6747a5b 100644 --- a/Packages/Generator/doc_tex/support/Generator/generators_prog2.C +++ b/Packages/Generator/doc_tex/support/Generator/generators_prog2.C @@ -8,21 +8,13 @@ #include #include #include - -typedef CGAL_Cartesian R; -typedef CGAL_Point_2 Point; - -/* Provide your own CGAL_build_point function. */ -inline -Point& CGAL_build_point( double x, double y, Point& p) { - p = Point( int(x), int(y)); - return p; -} - #include #include #include /* only for visualization used */ +typedef CGAL_Cartesian R; +typedef CGAL_Point_2 Point; +typedef CGAL_Creator_uniform_2 Creator; int main() { @@ -33,7 +25,7 @@ int main() /* Create 250 points from a 16 x 16 grid. Note that the double */ /* arithmetic _is_ sufficient to produce exact integer grid points. */ /* The distance between neighbors is 34 pixel = 510 / 15. */ - CGAL_points_on_square_grid_2( 510.0, 250, back_inserter(points),(Point*)0); + CGAL_points_on_square_grid_2( 255.0, 250, back_inserter(points),Creator()); /* Lower, left corner. */ assert( points[0].x() == -255); @@ -44,7 +36,7 @@ int main() assert( points[249].y() == 255); /* Create 250 points within a disc of radius 150. */ - CGAL_Random_points_in_disc_2 g( 150.0); + CGAL_Random_points_in_disc_2 g( 150.0); CGAL_copy_n( g, 250, back_inserter( points)); /* Check that we have really created 500 points. */