Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29125:
is_inscribed
depends on order of vertices
Currently the inscription test for polyhedra depends on the order of vertices: {{{ sage: Polyhedron(vertices=[[-2,-1], [-2,1], [0,-1], [0,1]]).is_inscribed() True sage: P = Polyhedron(vertices=[[-2,-1], [-2,1], [0,-1], [0,1]], backend='field') sage: P.is_inscribed() False sage: V = P.Vrepresentation() sage: H = P.Hrepresentation() sage: parent = P.parent() sage: dic = {True: 0, False: 0} sage: for V1 in Permutations(V): ....: P1 = parent._element_constructor_( ....: [V1, [], []], [H, []], Vrep_minimal=True, Hrep_minimal=True) ....: dic[P1.is_inscribed()] += 1 ....: sage: dic {True: 18, False: 6} }}} The algorithm constructs a sphere around `dim + 1` vertices in general position. The circumcenter is computed up to sign. Then, one vertex is taken to determine, which sign to choose. However, up to `dim` vertices might lie on the intersection of both spheres. We fix this by checking distance from the circumcenter for all vertices of that simplex. URL: https://trac.sagemath.org/29125 Reported by: gh-kliem Ticket author(s): Jonathan Kliem Reviewer(s): Jean-Philippe Labbé
- Loading branch information