mirror of https://github.com/CGAL/cgal
Tunning the functor example on CK2
This commit is contained in:
parent
3ac5443b35
commit
87f63a2d4b
|
|
@ -10,15 +10,18 @@ int main()
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
Circular_arc_2 c = Circular_arc_2(Point_2(10,0), Point_2(5,5), Point_2(0, 0));
|
Circular_arc_2 c = Circular_arc_2(Point_2(10,0), Point_2(5,5), Point_2(0, 0));
|
||||||
for(int i = 1; i <= 5; i++) {
|
for(int i = 0; i <= 10; i++) {
|
||||||
for(int j = 1; j <= 10; j++) {
|
for(int j = 0; j <= 10; j++) {
|
||||||
Point_2 p = Point_2(i, j);
|
Point_2 p = Point_2(i, j);
|
||||||
if(Circular_k().has_on_2_object()(c,p)) n++;
|
if(Circular_k().has_on_2_object()(c,p)) {
|
||||||
|
n++;
|
||||||
|
std::cout << "(" << i << "," << j << ")" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "There are " << n << " points in the 10x5 grid on the circular"
|
std::cout << "There are " << n << " points in the [0,..,10]x[0,..,10] " <<
|
||||||
<< std::endl
|
"grid on the circular" << std::endl
|
||||||
<< " arc with endpoints (0,0), (10,0) defined on the superior half plane"
|
<< " arc defined counterclockwisely by the points (0,0), (5,5), (10,0)"
|
||||||
<< std::endl;
|
<< std::endl << "See the points above." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue