Triangulation of Lattice Polytope

asked 2016-08-29 14:04:09 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello! SAGE seems to depend on order when dealing with triangulations and shifts it in some way.

For example, for the identical configurations: (just with the origin (0,0) in a different place)

pt1 = PointConfiguration([(1, 0), (0, 1), (0, -1), (-1, 0), (1, 1), (0, 0)]);
pt2 = PointConfiguration([(0, 0), (1, 0), (0, 1), (0, -1), (-1, 0), (1, 1)]);


triang = pt1.triangulate();
triang.plot(axes=True)

triang = pt2.triangulate();
triang.plot(axes=True)

the second is clearly correct but the first configuration is left-shifted by (-1,0) for some reason.

Any ideas?

many thanks!!

edit retag flag offensive close merge delete

Comments

looks like a bug, indeed

FrédéricC gravatar imageFrédéricC ( 2016-09-02 21:58:58 +0100 )edit

Problem located here:

sage: [p.reduced_affine() for p in triang1.point_configuration()]
[(0, 0), (-1, 1), (-1, -1), (-2, 0), (0, 1), (-1, 0)]
sage: [p.reduced_affine() for p in triang2.point_configuration()]
[(0, 0), (1, 0), (0, 1), (0, -1), (-1, 0), (1, 1)]
FrédéricC gravatar imageFrédéricC ( 2016-09-02 22:04:04 +0100 )edit

Maybe this is not a bug after all. We use some new coordinates (method reduced_affine instead of method affine) to plot the point configuration. This is potentially useful for 2d configs in 3d.

FrédéricC gravatar imageFrédéricC ( 2016-09-02 22:06:44 +0100 )edit