ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 23 Nov 2016 21:27:10 +0100plotting 3d polytope in R^4https://ask.sagemath.org/question/35704/plotting-3d-polytope-in-r4/ I'm trying to plot the following polytope on the cloud:
P=Polyhedron(vertices=[[0, 1, 0, 4] , [0, 1, 1, 3] , [3, 1, 1, 0] , [3, 1, 0, 1] , [0, 3, 0, 2] , [0, 3, 1, 1] , [1, 0, 0, 4] , [1, 0, 1, 3] , [3, 0, 1, 1] , [3, 0, 0, 2] , [1, 3, 1, 0] , [1, 3, 0, 1]])
P.plot()
This is a polytope living in R^4, but in fact the sum of the coordinates of each vertex is 5, so it is a 3D polytope. In some cases, sage gives me a nice 3D view of how the polytope looks like, but in this case it gives me something that doesn't even looks convex, so it is not the right projection. I would like to know what is going on and try to solve this issue, so I appreciate ideas on how to correct this, and where to look at on the code. EmersonLWed, 23 Nov 2016 21:27:10 +0100https://ask.sagemath.org/question/35704/plot Polyhedron from cloudhttps://ask.sagemath.org/question/24686/plot-polyhedron-from-cloud/ I'm trying to plot some 3d stuff from the cloud.
I tried:
icosahedron()
and worked perfectly, but then I tried
v=[(0,0,0),(0,1,0),(0,2,1),(1,0,0),(1,2,3),(2,1,1)]
Polyhedron(vertices=v).plot()
and I only get a single bullet, no error message, no image, no nothing... What is going on?EmersonLWed, 29 Oct 2014 17:57:17 +0100https://ask.sagemath.org/question/24686/Interact 3d plot(Polyhedron)https://ask.sagemath.org/question/8834/interact-3d-plotpolyhedron/Hi there, I got confused about the interact:
def par(t):
tmp = [[200-t,-1,0,0],[300-t,0,-1,0],[400-t,-1,-1,-1],[600-t,0,-1,-3],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
G = Polyhedron(ieqs = tmp)
show(G.render_solid(rgbcolor='blue',alpha=.2)+G.render_wireframe(rgbcolor='black'))
@interact
def _(x=(0,10)):
par(x)
It is quite weird since in the examples of http://wiki.sagemath.org/interact/graphics, it seems that the interactive parameters could only be something controlling a plot. However in my case, the interactive parameter(x) is not used for controlling plot but for obtaining an [[],[]]. so it fails to interact. Any idea of that?
ZhengThu, 29 Mar 2012 02:23:22 +0200https://ask.sagemath.org/question/8834/