JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

Non-redundant vertices removed #333

Closed darnstrom closed 7 months ago

darnstrom commented 7 months ago

The code

using Plots
using Polyhedra
import GLPK
lib = DefaultLibrary{Float64}(GLPK.Optimizer)

vs = [-0.96     -0.4;
      -0.5      -0.4;
       0.0      -0.4;
       0.5      -0.4;
       1.0      -0.36065655;
      -0.995    -0.05;
       1.0      -0.05;
      -1.0       0.3;
       0.97      0.3;
      -1.0       0.65;
       0.930928  0.65;
      -1.0       1.0;
      -0.5       1.0;
       0.0       1.0;
       0.5       1.0;
       0.865979 1.0;]

S = polyhedron(vrep(vs))
plot(S)
scatter!(vs[:,1],vs[:,2])

gives the following result: missing-vert Why are some of the vertices in the top corner removed?

blegat commented 7 months ago

Thanks for reporting this, these vertices on an horizontal line at the end actually make up a nice tricky test case ;)