flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

Saddle connection in cathedral has wrong start and end data #259

Open saraedum opened 9 months ago

saraedum commented 9 months ago

In the cathedral(1, 2), I get the following saddle connection:

Saddle connection in direction (0, -1) with start data (1, 8) and end data (1, 3)

At first this seems to be related to #258 but it's probably a different bug since the corresponding flow seems to work fine after fixing #258:

sage: from flatsurf import Polygon
sage: P = Polygon(vertices=[(1, 0), (1, -2), (3/2, -5/2), (2, -2), (2, 0), (2, 1), (2, 3), (3/2, 7/2), (1, 3), (1, 1)])
sage: P.flow_to_exit(vector((1, 3)), vector((0, -1)))
((1, -2), point positioned on vertex 1 of polygon)
saraedum commented 9 months ago

More precisely, I get

sage: from flatsurf.geometry.saddle_connection import SaddleConnection
sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.cathedral(1, 2)
sage: SaddleConnection(S, (1, 8), (0, -1))
Saddle connection in direction (0, -1) with start data (1, 8) and end data (1, 3)
# should be: Saddle connection in direction (0, -1) with start data (1, 8) and end data (1, 5)

So the flow (correctly) skips over marked vertices of the polygon. From the polygon perspective "flow to exit" this is correct. However, the flow must stop at singularities here.