Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You just need to use the show command to force Sage to show the plot. The code below works for me.

@interact 
def _(center =6 -x^2, spin = x): 
    var('u') 
    var('t') 
    r(x) = abs(spin(x) - center(x)) 
    p=parametric_plot3d((t, r(t)*sin(u)+center(t), r(t)*cos(u)), (u, 0, 2*pi), (t, 0, 2), mesh=True)
    show(p)