dengwirda / robust-predicate

Robust geometric predicates without the agonising pain.
Other
16 stars 2 forks source link

is this the expected output of example.cpp? #3

Open pythonmobile opened 2 years ago

pythonmobile commented 2 years ago

orient2d: +0.5 bisect2d: +0 bisect2w: +0.1 inball2d: +0.5 inball2w: +0.4 orient3d: -0.5 bisect3d: +0 bisect3w: +0.1 inball3d: -0.75 inball3w: -0.6

dengwirda commented 2 years ago

@pythonmobile, yes, the predicates all return floating-point values; the sign of which (or zero) can be used to determine in/out type status, and the magnitude to compute associated geometric quantities (areas, volumes, etc).

pythonmobile commented 2 years ago

@dengwirda Thanks! By any chance, do you know of a segment intersection code that uses these predicates? I am looking to intersect two 2d segments robustly and compute the output of the intersection if they intersect.

dengwirda commented 2 years ago

I use these predicates in my meshing package jigsaw: https://github.com/dengwirda/jigsaw/blob/c1ae47455f6f906a2dc28ea26b78909e2a5dc0e4/src/libcpp/geom_base/intersect_k.hpp#L1647