I am working on a motion planning problem and I'm facing problems with numeric precision.
My goal is to divide the two-dimensional vector space of real numbers with segments and circular arcs. The 2D Arrangement of the CGAL library is well indicated for this purpose. Here are the types I have defined:
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian<Rational> Rat_kernel;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits> Conic_traits_2;
typedef CGAL::Arrangement_2<Conic_traits_2> Arrangement_2;
During the computation I need to displaced a segment whose endpoints have rational coordinates, (due to the length of the segment, i.e. square root,) the image of this segment then have algebraic coordinates. I also need to add two circular arcs to the endpoints of this image.
All I have found in the manual is a way to add circular arcs with rational coordinates for the center, how to treat those with algebraic coordinates (without precision error) ?
Thanks.