Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tachyon in SageMathCloud

I'm new to Sage and only beginner experience in python, so there may be something obvious I'm missing.

I'm trying to create, initially, some plots using Tachyon in SMC. I cut and pasted Niles Johnson's code at this question, namely

sage: f = lambda t: (t,t^2,t^3)
sage: t = Tachyon(camera_center=(5,0,4))
sage: t.texture('t')
sage: t.light((-20,-20,40), 0.2, (1,1,1))
sage: t.parametric_plot(f,-5,5,'t',min_depth=6)
sage: t.show(verbose=True)

and I get the following error

tachyon /projects/6e9b9fc6-5d3c-4c2a-a57f-b5fe78a365fd/.sage/temp/compute2dc1/22136/tmp_Iy4Cih.dat  -format PNG  -o /projects/6e9b9fc6-5d3c-4c2a-a57f-b5fe78a365fd/.sage/temp/compute2dc1/22136/tmp_weeBQD.png   ; rm -f "/projects/6e9b9fc6-5d3c-4c2a-a57f-b5fe78a365fd/.sage/temp/compute2dc1/22136/tmp_Iy4Cih.dat"
Error in lines 6-6
Traceback (most recent call last):
  File "/projects/6e9b9fc6-5d3c-4c2a-a57f-b5fe78a365fd/.sagemathcloud/sage_server.py", line 864, in execute
    exec compile(block+'\n', '', 'single') in namespace, locals
  File "", line 1, in <module>
  File "/usr/local/sage/sage-6.3.beta6/local/lib/python2.7/site-packages/sage/plot/plot3d/tachyon.py", line 339, in show
    os.system('%s %s 2>/dev/null 1>/dev/null &'%(sage.misc.viewer.png_viewer(), filename))
NameError: global name 'sage' is not defined

What should I do? It doesn't seem related to anything in the code used.