When using CPython (2.7 here, but any version works) there are 4 intersections as expected
Python 2.7.13 (default, Jan 5 2017, 18:58:25)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from bezier._intersection_helpers import all_intersections
>>> from bezier._intersection_helpers import IntersectionStrategy
>>>
>>> candidates = [(curve1, curve13)]
>>>
>>> intersections = all_intersections(
... candidates, strategy=IntersectionStrategy.algebraic)
>>> for intersection in intersections:
... print((intersection.s, intersection.t))
...
(0.0, 0.0)
(0.3110177634953864, 0.3110177634953864)
(0.68898223650461365, 0.68898223650461365)
(1.0, 1.0)
However, using PyPy there are only 3
Python 2.7.12 (aff251e543859ce4508159dd9f1a82a2f553de00, Nov 12 2016, 08:50:18)
[PyPy 5.6.0 with GCC 6.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> # imports, set-up of curve1 and curve13, etc.
>>>> intersections = all_intersections(
.... candidates, strategy=IntersectionStrategy.algebraic)
>>>> for intersection in intersections:
.... print((intersection.s, intersection.t))
....
(0.0, 0.0)
(0.31101776349538629, 0.31101776349538635)
(1.0, 1.0)
We have the curves
Visual inspection shows 4 intersections:
When using CPython (2.7 here, but any version works) there are 4 intersections as expected
However, using PyPy there are only 3