3 ms·
> rock solid, lightning fast, and 100% accurate in all cases This is like the CAP theorem[1], but for computational geometry libraries. You cannot have all 3 i
by morganherlocker 10y ago
> rock solid, lightning fast, and 100% accurate in all cases
This is like the CAP theorem[1], but for computational geometry libraries. You cannot have all 3 if your truly are aiming for accuracy, speed, or robustness. There is always another edge case (which turns out to be a common case for you), there is always another computational shortcut (cutting out seat belts for cases you know you won't encounter), and there is always a missing function (that you really need). CGAL is a terrific reference implementation for a remarkably diverse set of algorithms, and its commitment to precision in particular is astounding[2].
All that said, never trust the output of a geometry library function that has not been thoroughly fuzz tested. I guarantee that every one of these libraries will fail in surprising ways when subjected to a brutal fuzz tester. I say this as the author of one of the libraries, and as someone who is familiar with the quirks of all of them. In my experience, the best geometry libraries do one tiny task very fast (backed up by benchmarks) and very reliably (verified through unit and fuzz tests).
[1] https://en.wikipedia.org/wiki/CAP_theorem https://en.wikipedia.org/wiki/CAP_theorem
[2] http://www.cgal.org/exact.html http://www.cgal.org/exact.html
- adrianN 10y agoWriting a useful fuzz-tester for a library like CGAL would be an interesting research problem. CGAL makes it a lot easier for many algorithms because it implements certifying algorithms [1] wherever possible. [1] https://en.wikipedia.org/wiki/Certifying_algorithm https://en.wikipedia.org/wiki/Certifying_algorithm