Subject: Re: [boost] GGL Review
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2009-11-16 12:34:43
Jonathan Franklin wrote:
> On Mon, Nov 16, 2009 at 7:06 AM, Brandon Kohn <blkohn_at_[hidden]> wrote:
>> One of the more useful
>> features of the library (GGL) would of course be the boolean operations. The
>> problem however is clearly going to be robustness.
> For some.
>> I have never encountered
>> a robust floating point boolean operation library in my 9 years of working
>> in the geometry domain. While this may not mean it's impossible, I think it
>> does mean it's unlikely.
> I believe that this is because for many use-cases, it isn't worth the
> run-time performance and development-time trade-off.
The acceptability may depend on the failure mode; it is "looks OK but
subtly imperfect", "wrong but valid output", "invalid output", "runs
forever", "segfaults", or "reformats disk"?
A while ago, Fernando Cacciola posted some links to a set of
presentations and papers about FP line intersection robustness that I
found very enlightening:
or directly to the PDF: http://www.mpi-inf.mpg.de/~kettner/pub/nonrobust_cgta_06.pdf
I strongly encourage anyone who wants to express an opinion on this
subject in the context of the current review to look at this material;
it is very accessible and on page 2 there's a compelling example of
what can go wrong.
Personally, I find it better to use fixed point (e.g. for
latitude/longitude) and relax knowing that I don't have to worry.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk