#include <CGAL/Cartesian.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Arr_walk_along_line_point_location.h>
#include "arr_print.h"
typedef Traits_2::Point_2 Point_2;
typedef Traits_2::X_monotone_curve_2 Segment_2;
int main()
{
Arrangement_2 arr;
Walk_pl pl(arr);
Segment_2 s1(Point_2(1, 0), Point_2(2, 4));
Segment_2 s2(Point_2(5, 0), Point_2(5, 5));
Segment_2 s3(Point_2(1, 0), Point_2(5, 3));
Segment_2 s4(Point_2(0, 2), Point_2(6, 0));
Segment_2 s5(Point_2(3, 0), Point_2(5, 5));
std::cout << "The arrangement size:" << std::endl
<< " V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
Point_2 q(4, 1);
Walk_pl::result_type obj = pl.locate(q);
Arrangement_2::Face_const_handle f;
CGAL_assertion_code(bool success =) CGAL::assign(f, obj);
CGAL_assertion(success);
std::cout << "The query point (" << q << ") is located in: ";
print_face<Arrangement_2>(f);
return 0;
}