Subject: CGAL users discussion list
List archive
- From: "Fernando Cacciola" <>
- To: <>
- Subject: Re: [cgal-discuss] point lying over a line problem
- Date: Wed, 23 Jul 2008 13:05:41 -0300
- Organization: Geometry Factory
Hi Alejandro,
the point is supposed to lie over the line within let'sThis is an arbitrary interpretation of what lying over a line means.
say tol = 10e-14.
If this interpretation works in you particular case, you can implement it easily via the squared_distance() function, but have in mind that your sample point miught not actually lie on the line in spite of the number type used.
That is, you will get the wrong answer for using plain double, but you could also be just expecting the opposite answer because you asummed closed enough is the same as exactly on the line. CGAL predicates are strictly exact: they return the answer they would if you used an exact number type.
Why would I use an exact number type?
You wouldn't.
Please read the FAQ much more carefully, in particular de paragraph starting with:
"If your program does not involve the construction of new objects from the input data..."
CGAL uses a technique knows as "Floating-point filtering" which exploits the precision of 'double' as much as possible yet it guarrantees correct results even when that precision is detected as not being enough for a particular operation.
HTH
Fernando Cacciola
www.geometryfactory.com
- Re: [cgal-discuss] point lying over a line problem, (continued)
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Fernando Cacciola, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Andreas Fabri, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Olivier Devillers, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Olivier Devillers, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Fernando Cacciola, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Andreas Fabri, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
Archive powered by MHonArc 2.6.16.