#18225: Missing polytopes in the library
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.10
      Component:  geometry           |   Resolution:
       Keywords:  beginner,          |    Merged in:
  polytope                           |    Reviewers:
        Authors:  Nico Van           |  Work issues:
  Cleemput, Frédéric Chapoton        |       Commit:
Report Upstream:  N/A                |  15c520eee20ffec1776f9c8a8d64aa7c73f68bf9
         Branch:                     |     Stopgaps:
  public/ticket/18225                |
   Dependencies:  #18213             |
-------------------------------------+-------------------------------------

Comment (by nvcleemp):

 Ok, this is a first version, but exact is not working. I guess this might
 be the same problem as Frédéric had with the snub cube, but I don't know.
 Constructing the object gives now problem, but calling `f_vector()` gives
 the wrong result. Also calling `show()` gives the following error message:

 {{{
 sage: sd.show()
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-4-4566439ff143> in <module>()
 ----> 1 sd.show()

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/geometry/polyhedron/base.pyc in show(self, **kwds)
     706             sage: square.show(point='red')
     707         """
 --> 708         self.plot(**kwds).show()
     709
     710     def _repr_(self):

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/geometry/polyhedron/base.pyc in plot(self, point, line,
 polygon, wireframe, fill, projection_direction, **kwds)
     678                 raise NotImplementedError('plotting of
 {0}-dimensional polyhedra not implemented'
     679
 .format(self.ambient_dim()))
 --> 680         return plot_method(*opts)
     681
     682     def show(self, **kwds):

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/geometry/polyhedron/plot.pyc in render_3d(self, point_opts,
 line_opts, polygon_opts)
    1246         if isinstance(point_opts, dict):
    1247             point_opts.setdefault('width', 3)
 -> 1248             plt += self.render_vertices_3d(**point_opts)
    1249         if isinstance(line_opts, dict):
    1250             line_opts.setdefault('width', 3)

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/geometry/polyhedron/plot.pyc in render_vertices_3d(self,
 **kwds)
    1080             ((-1.0, -1.0, -1.0), (1.0, 1.0, 1.0))
    1081         """
 -> 1082         return point3d(self.coordinates_of(self.points), **kwds)
    1083
    1084

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/plot/plot3d/shapes2.pyc in point3d(v, size, **kwds)
    1105             pass
    1106
 -> 1107     A = sum([Point(z, size, **kwds) for z in v])
    1108     A._set_extra_kwds(kwds)
    1109     return A

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/plot/plot3d/shapes2.pyc in __init__(self, center, size,
 **kwds)
     717         """
     718         PrimitiveObject.__init__(self, **kwds)
 --> 719         self.loc = (float(center[0]), float(center[1]),
 float(center[2]))
     720         self.size = size
     721         self._set_extra_kwds(kwds)

 /home/nvcleemp/Sage/sage/src/sage/rings/number_field/number_field_element.pyx
 in
 sage.rings.number_field.number_field_element.NumberFieldElement.__float__
 
(/home/nvcleemp/Sage/sage/src/build/cythonized/sage/rings/number_field/number_field_element.cpp:15292)()
    1409         """
    1410         if self.parent().coerce_embedding() is None:
 -> 1411             return float(self.base_ring()(self))
    1412         else:
    1413             c = complex(self)

 /home/nvcleemp/Sage/sage/src/sage/structure/parent.pyx in
 sage.structure.parent.Parent.__call__
 (/home/nvcleemp/Sage/sage/src/build/cythonized/sage/structure/parent.c:9547)()
    1095         if mor is not None:
    1096             if no_extra_args:
 -> 1097                 return mor._call_(x)
    1098             else:
    1099                 return mor._call_with_args(x, args, kwds)

 /home/nvcleemp/Sage/sage/src/sage/structure/coerce_maps.pyx in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 
(/home/nvcleemp/Sage/sage/src/build/cythonized/sage/structure/coerce_maps.c:4425)()
     107                 print type(C), C
     108                 print type(C._element_constructor),
 C._element_constructor
 --> 109             raise
     110
     111     cpdef Element _call_with_args(self, x, args=(), kwds={}):

 /home/nvcleemp/Sage/sage/src/sage/structure/coerce_maps.pyx in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 
(/home/nvcleemp/Sage/sage/src/build/cythonized/sage/structure/coerce_maps.c:4332)()
     102         cdef Parent C = self._codomain
     103         try:
 --> 104             return C._element_constructor(x)
     105         except Exception:
     106             if print_warnings:

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/rings/number_field/number_field.pyc in
 _element_constructor_(self, x)
    1401                     return self._element_class(self, x)
    1402                 x = L(x)
 -> 1403             return self._coerce_from_other_number_field(x)
    1404         elif sage.interfaces.gap.is_GapElement(x):
    1405             s = repr(x)

 /home/nvcleemp/Sage/sage/local/lib/python2.7/site-
 packages/sage/rings/number_field/number_field.pyc in
 _coerce_from_other_number_field(self, x)
    6317             Kgen = F(Kgen)
    6318         else:
 -> 6319             raise TypeError("No compatible natural embeddings
 found for %s and %s"%(KF,LF))
    6320
    6321         # List of candidates for K(x)

 TypeError: No compatible natural embeddings found for Real Lazy Field and
 Number Field in xi with defining polynomial x^3 - 2*x - 1/2*sqrt5 - 1/2
 over its base field
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18225#comment:38>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to