CoCalc Public FilesSara / Polygon Bug.sagewsOpen with one click!
Authors: Molly Baird, Sara Billey
Views : 32
Compute Environment: Ubuntu 18.04 (Deprecated)
version()
'SageMath version 7.5, Release Date: 2017-01-11'
## Polyhedron is returning the empty polyhedron when too many floating point digits are given
P=Polyhedron(vertices =[(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.8435898415984129)]) P.show() P
The empty polyhedron in (Real Field with 57 bits of precision)^2
## removing last 2 digits of 4.84.. gives better answer
P=Polyhedron(vertices =[(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.84358984159841)]) P.show() P
A 1-dimensional polyhedron in RDF^2 defined as the convex hull of 2 vertices
# Exception when trying to make Polyhedron with smaller precision v = [(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.8435898415984129)] P=Polyhedron(vertices=v, base_ring=RealField(40))
P.show()
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 982, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 737, in show self.plot(**kwds).show() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 699, in plot projection = project(self) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 697, in project return polyhedron.projection() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 3575, in projection self.projection = Projection(self) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/plot.py", line 494, in __init__ self._init_from_2d(polyhedron) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/plot.py", line 750, in _init_from_2d self._init_lines_arrows(polyhedron) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/plot.py", line 816, in _init_lines_arrows if polyhedron.vertex_adjacency_matrix()[i,j] == 0: continue File "sage/misc/cachefunc.pyx", line 2401, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:13453) self.cache = f(self._instance) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 1906, in vertex_adjacency_matrix return self._vertex_adjacency_matrix() File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 316, in _vertex_adjacency_matrix face_lattice = self.face_lattice() File "sage/misc/cachefunc.pyx", line 2401, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:13453) self.cache = f(self._instance) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 3224, in face_lattice face_constructor=face_constructor, required_atoms=atoms_vertices) File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/sage/geometry/hasse_diagram.py", line 182, in Hasse_diagram_from_incidences for coatom, atoms in enumerate(coatom_to_atoms)] KeyError: (frozenset([]), frozenset([0]))
P
A 1-dimensional polyhedron in (Real Field with 40 bits of precision)^2 defined as the convex hull of 2 vertices