Ask Your Question

Revision history [back]

Interact 3d plot(Polyhedron)

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?

Interact 3d plot(Polyhedron)

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'))

show(G.render_solid(rgbcolor='blue',alpha=.2)+G.render_wireframe(rgbcolor='black'))

@interact def _(x=(0,10)): par(x)

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?

click to hide/show revision 3
retagged

Interact 3d plot(Polyhedron)

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?