Subject: CGAL users discussion list
List archive
- From: "T.vanLankveld" <>
- To:
- Subject: [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes
- Date: Mon, 21 Jun 2010 06:04:19 -0700 (PDT)
As an additional note, I did some tests on my data and found something I
thought was weird, but this may seem like a beginners mistake to the more
veteran CGAL-programmers:
I did the following tests on each triangle in the Delaunay triangulation
before using the points to construct the alpha-shape:
- triangle.is_degenerate()
- CGAL::collinear(p0, p1, p2)
- Rational rdx1 = Rational(p1.x())-Rational(p0.x()), rdy1 =
Rational(p1.y())-Rational(p0.y());
Rational rdx2 = Rational(p2.x())-Rational(p0.x()), rdy2 =
Rational(p2.y())-Rational(p0.y());
rdx2*rdy1 == rdx1*rdy2
- NumberType dx1 = p1.x()-p0.x(), dy1 = p1.y()-p0.y();
NumberType dx2 = p2.x()-p0.x(), dy2 = p2.y()-p0.y();
CGAL::compare(dx2*dy1, dx1*dy2) == CGAL::EQUAL
- dx2*dy1 == dx1*dy2
Only the last two checks returned true when using a
Filtered_kernel<Cartesian<double>>.
Rational here is Quotient<MP_Float> and NumberType is double.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-NTS-is-zero-den-with-Delaunay-Alpha-shapes-tp952983p2262589.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, T.vanLankveld, 06/21/2010
- Re: [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, Sebastien Loriot (GeometryFactory), 06/21/2010
- [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, T.vanLankveld, 06/22/2010
- Re: [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, Sebastien Loriot (GeometryFactory), 06/22/2010
- [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, T.vanLankveld, 06/22/2010
- Re: [cgal-discuss] Re: CGAL_NTS is_zero(den) with Delaunay Alpha-shapes, Sebastien Loriot (GeometryFactory), 06/21/2010
Archive powered by MHonArc 2.6.16.