Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] straight skeleton anomaly ?
- Date: Tue, 19 Mar 2013 10:12:53 +0100
- Organization: GeometryFactory
It is indeed a problem bug due to a numerical issue.
This comes from the fact that you have two points that are
closed together while the coordinates of your points are very large.
If you translate the polygon, by doing:
FT dx = CGAL::Gmpq(650950);
FT dy = CGAL::Gmpq(6861560);
Point_2 p(x-dx, y-dy);
you'll see that the result looks better.
I will investigate to see if there is an easy fix and post on the list
when I have an update.
In the meantime, you can either simplify the input polygon (say if an
edge is below a chosen threshold you ignore it) or translate your
polygon close to the origin using a translation with integer
coordinates.
Thanks for the report,
Sebastien.
On 03/17/2013 09:59 PM, Myirci wrote:
Dear all CGAL users,
I've a weird output from CGAL Straight Skeleton. I attached my output
and the simple code to regenerate the output. My OS is Ubuntu 12.10
32-bit and I'm using CGAL 4.1. Could you please check the output? Is
this a bug or am I doing something wrong?
In my analysis, I checked the approximation of the exact numbers to
double by printing the intervals using CGAL::to_interval() for the
skeleton vertices and there seems to be an anomaly for the point S3 (see
the figures). The interval is given as: [(650950.772473049,
650961.1943390622) (6861561.907245005, 6861566.64668196)] for that
point. I think this is the source of the error. Is there a method for
narrowing down the interval?
Thank you for your time and considerations.
Best wishes
--
Murat Yirci
- [cgal-discuss] straight skeleton anomaly ?, Myirci, 03/17/2013
- Re: [cgal-discuss] straight skeleton anomaly ?, Sebastien Loriot (GeometryFactory), 03/19/2013
- Re: [cgal-discuss] straight skeleton anomaly ?, Sebastien Loriot (GeometryFactory), 03/19/2013
- Re: [cgal-discuss] straight skeleton anomaly ?, Myirci, 03/19/2013
- Re: [cgal-discuss] straight skeleton anomaly ?, Sebastien Loriot (GeometryFactory), 03/19/2013
- Re: [cgal-discuss] straight skeleton anomaly ?, Sebastien Loriot (GeometryFactory), 03/19/2013
Archive powered by MHonArc 2.6.18.