Graphics not coming in Sagecloud but showing in Sageonline

asked 2013-09-20 00:55:35 -0600

Vijay gravatar image

updated 2015-01-14 07:08:47 -0600

FrédéricC gravatar image

Hello,

I am running a code by Jason Grout in Sagecloud but I don't see the graphics whereas I see the graphics when I run it in Sageonline. Could you please help?

The code is as follows:

load('https://raw.github.com/jasongrout/hopf_fibrations/master/hopf.pyx') load('https://raw.github.com/jasongrout/hopf_fibrations/master/hopf_animate.sage')

def base_circle(po, numpts=24): return BaseLatitude(numpts/30,0,2*pi,po=po,input_type='sph')

@interact def hopf_fibers(tilt=slider(0,pi,default=.587pi,label="Tilt from vertical axis"), angle=slider(0,2pi,default=1.41pi, label="Rotation around vertical axis"), quality=checkbox(default=False,label="High quality (much slower)"), img_size=input_box(default=500,label="Imgage Size (pixels)")): axis_az = angle axis_po = pi/2 rot_alpha = tilt circles = [base_circle(po,num) for po,num in [(.5pi/2,20), (1.5*pi/2,20)]] points = [] for c in circles: c.set_rotation((1,axis_az,axis_po), rot_alpha) points += c.points()

draw_frame(points, n=0, high_quality=quality, resolution=img_size, only_show=True)

edit retag flag offensive close merge delete