Deltares / numba_celltree

Celltree data structure for searching for points, lines, boxes, and cells (convex polygons) in a two dimensional unstructured mesh.
https://deltares.github.io/numba_celltree/
MIT License
11 stars 3 forks source link

Robust predicates for orientation #5

Open Huite opened 1 year ago

Huite commented 1 year ago

Some of the algorithms use a determinant to get point-vector orientations. With points near vectors, roundoff creates errors. Shewchuk's robust predicates should solve this. Ideally, we can include them as (numba-accelerated) Python code.

Python bindings to the original C code (C code included): https://pypi.org/project/geompreds/

Reimplementations: C++ (templated): https://github.com/dengwirda/robust-predicate Javascript: https://github.com/mourner/robust-predicates Julia: https://github.com/JuliaGeometry/AdaptivePredicates.jl

I don't believe the Python implementation is vectorized, so it would require a little Cython to get decent performance benchmarks. But it would be immediately useful for testing.