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

L-infinity Delaunay seems broken #274

Closed videlec closed 6 months ago

videlec commented 6 months ago
from flatsurf import similarity_surfaces, Polygon
angles = (1, 1, 1, 7)
lengths = (3, 2)
p = Polygon(angles=angles, lengths=lengths)
S = similarity_surfaces.billiard(p).minimal_cover('translation').erase_marked_points().l_infinity_delaunay_triangulation()
for t in S.polygons():
    if all(x * y  > 0 for x, y in t.edges()) or all(x * y < 0 for x, y in t.edges()):
        print(t)

gives three wrong triangles

Polygon(vertices=[(0, 0), (4*c^2 - 25/2, 7/2*c^3 - 13*c), (11/2*c^2 - 20, -3/2*c^3 + 11/2*c)])
Polygon(vertices=[(0, 0), (7/2*c^2 - 25/2, -4*c^3 + 29/2*c), (-c^2 + 5, -5*c^3 + 19*c)])
Polygon(vertices=[(0, 0), (-c^2 + 5, 5*c^3 - 19*c), (7/2*c^2 - 25/2, 4*c^3 - 29/2*c)])
videlec commented 6 months ago

Sorry. Tested on the wrong sage-flatsurf version.