Subject: CGAL users discussion list
List archive
- From: Paul Neugebauer <>
- To:
- Subject: [cgal-discuss] CORE - Algebraic to Rational
- Date: Tue, 17 Jun 2008 19:52:36 +0200
Hi List,
I want to compute the exact offset of a Polygon like this:
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_conic_traits_2.h>
#include <CGAL/offset_polygon_2.h>
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian Rat_kernel;
typedef CGAL::Cartesian Alg_kernel;
typedef CGAL::Arr_conic_traits_2<Rat_kernel,
Alg_kernel,
Nt_traits> Conic_traits_2;
...
offset = offset_polygon_2 (P, radius, traits);
My Problem is, that P must be a Polygon with Rational points but my
input file has Algebraic points, like:
...
p -4.5 -4.75
p 4.5 -4.75
...
So my question is, how can I convert Algebraic to Rational points ?
Thank you very much in advance,
Paul
- [cgal-discuss] CORE - Algebraic to Rational, Paul Neugebauer, 06/17/2008
Archive powered by MHonArc 2.6.16.