davideberly / GeometricTools

A collection of source code for computing in the fields of mathematics, geometry, graphics, image analysis and physics.
Boost Software License 1.0
1.08k stars 202 forks source link

IntrArc2Arc2 wrong case #70

Closed radevgit closed 11 months ago

radevgit commented 11 months ago

Hi I think I found a test case, where the IntrArc2Arc2 does not produce the correct answer:

arc0 = (0.0, 1.0), (-1.0, 0.0) center= (0,0) r = 1.0 arc1 = (-1.0, 0.0), (0.0, 1.0) center= (0,0) r = 1.0 I can't provide C++ example since I use it from another language. Essentially, these are two cocircular arcs. I expect that the result should be one point (0.0, 1.0) and one arc: (-1, 0) (0, -1).

I followed the logic in the algorithm, and it seems something is missing near the L121. Instead of returning Configuration::COCIRCULAR_ONE_POINT_ONE_ARC it is returning Configuration::COCIRCULAR_TWO_POINTS at L135

radevgit commented 11 months ago

I checked again, I was switching the x,y. No issue actually.