Re: [sage-support] Animating 3D object with frame_list

2015-06-22 Thread Vincent Delecroix
1) Remove var('t'): this is to declare a *symbolic (mathematical)* 
variable and is completely useless here


2) replace "frame_list = frame_list + Pall" with "frame_list.append(Pall)"

On 23/06/15 00:36, 'rfermat' via sage-support wrote:

Someone knowledgeable about sage said I could animate a union of 6 lines in
3D with this code:

var('t')
frame_list = [ ]
for t in range(0,120):
 tb = (t - 60.0)/120.0
 tg = (24.0*tb + sqrt(-1620*tb^4 + 216.0*tb^2 + 300.0))/(54*tb^2 + 30)
 Pall = line([ (0,0,0),(1,0,0),  (4 / 3, ( -2*r2*tg^2 + 2*r2  ) / (3*tg^2
+ 3  ), ( 4*r2*tg  ) / ( 3*tg^2 + 3  )),  (( -5*tb*tg + 5  ) /
( 3*tb*tg + 5  ) , ( -5*r2*tb*tg + 5*r2  ) / ( 3*tb*tg + 5  ) , (5*r2*tg +
5*r2*tb  ) / ( 3*tb*tg + 5  )),  ( ( -12*tb^2 + 4  ) / (
9*tb^2 + 9  ),  ( 6*r2*tb^2 + 10*r2  ) / ( 9*tb^2 + 9  ), ( 4*r2*tb  )/ (
3*tb^2 + 3  ) ),  ( -1 / 3,  ( 2*r2  ) / 3,   0), (0,0,0) ],
thickness=5, rgbcolor='red')
 frame_list = frame_list + Pall

followed then by:

my_animation = animate(frame_list)
my.animation.show()

The definition of the six points in Pall = line()  looks complicated
but it is correct (given numerical values for tb and tg).  r2 was defined
before to be sqrt(2.0) = 1.4142135...

Sage responds with an error:

AttributeError: 'list' object has no attribute 'plot3d'




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Animating 3D object with frame_list

2015-06-22 Thread 'rfermat' via sage-support
Someone knowledgeable about sage said I could animate a union of 6 lines in 
3D with this code:

var('t')
frame_list = [ ]
for t in range(0,120):
tb = (t - 60.0)/120.0
tg = (24.0*tb + sqrt(-1620*tb^4 + 216.0*tb^2 + 300.0))/(54*tb^2 + 30)
Pall = line([ (0,0,0),(1,0,0),  (4 / 3, ( -2*r2*tg^2 + 2*r2  ) / (3*tg^2 
+ 3  ), ( 4*r2*tg  ) / ( 3*tg^2 + 3  )),  (( -5*tb*tg + 5  ) /
( 3*tb*tg + 5  ) , ( -5*r2*tb*tg + 5*r2  ) / ( 3*tb*tg + 5  ) , (5*r2*tg + 
5*r2*tb  ) / ( 3*tb*tg + 5  )),  ( ( -12*tb^2 + 4  ) / (
9*tb^2 + 9  ),  ( 6*r2*tb^2 + 10*r2  ) / ( 9*tb^2 + 9  ), ( 4*r2*tb  )/ ( 
3*tb^2 + 3  ) ),  ( -1 / 3,  ( 2*r2  ) / 3,   0), (0,0,0) ],
thickness=5, rgbcolor='red')
frame_list = frame_list + Pall

followed then by:

my_animation = animate(frame_list)
my.animation.show()

The definition of the six points in Pall = line()  looks complicated 
but it is correct (given numerical values for tb and tg).  r2 was defined 
before to be sqrt(2.0) = 1.4142135...

Sage responds with an error:

AttributeError: 'list' object has no attribute 'plot3d'


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: notebook () - Shell

2015-06-22 Thread Volker Braun
You get back to the web interface with Right-Ctrl Fn, where n is some 
number between 1 and 7. Probably F7. I don't understand what you mean by 
"but no code will be in web interface", you just get back to where you were.



On Sunday, June 21, 2015 at 3:58:34 PM UTC+2, Jakub Koreček wrote:
>
> Hello,
>
> I am very new to SageMath and Virtual machine.
>
> I am using Windows 7 64bit and Oracle Virtual machine. I run Sage 6.7 as 
> is describe at http://wiki.sagemath.org/SageAppliance. My problem is, 
> when I use Host (RCtrl) + F1 i will get to shell. I run sage from shell so 
> far so good.
>
> What i should do to get back to web interface?
> RCtrl + F2 do not work (however F7) but no code will be in web interface.
>
> If I run notebook() I have following message
>
>
> The notebook files are store in:sage_notebook.sagenb
> Another server Sage Notebook is running, PID 1497
> sage:/usr/bin/xdg-open: line 402: htmlview: command not found
> /usr/bin/xdg-open: line 402: firefox: command not found
> /usr/bin/xdg-open: line 402: mozilla: command not found
> /usr/bin/xdg-open: line 402: netscape: command not found
> /usr/bin/xdg-open: line 402: links: command not found
> /usr/bin/xdg-open: line 402: lynx: command not found
> xdg-open: no method available for opening 'http://localhost:8000/'
>
> Why is does happenig? Because Sage server was shut down?
>
> Thank you very much in advance Jakub
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: notebook () - Shell

2015-06-22 Thread kcrisman

>
> I am using Windows 7 64bit and Oracle Virtual machine. I run Sage 6.7 as 
> is describe at http://wiki.sagemath.org/SageAppliance. My problem is, 
> when I use Host (RCtrl) + F1 i will get to shell. I run sage from shell so 
> far so good.
>
> What i should do to get back to web interface?
> RCtrl + F2 do not work (however F7) but no code will be in web interface.
>
>
I don't know how to get back to the web interface, but this part of your 
error shows why you can't open `notebook()`:

> Another server Sage Notebook is running, PID 1497
>

So you hadn't shut down the previous notebook, you just navigated away from 
it.   Hopefully someone who uses the VM solution can try this out and get 
you back to the browser.  Can't you just click on the web browser?  (This 
is a naive question, since I know little about the VM.) 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Not able to run the sage math on redhat-6

2015-06-22 Thread Volker Braun
Did you download a binary build? Try compiling from source.



On Monday, June 22, 2015 at 8:21:42 AM UTC+2, Madan Saini wrote:
>
> I am unable to start the sage math. I am getting the following error. I am 
> using Redhat-6
>
> ┌┐
> │ SageMath Version 6.7, Release Date: 2015-05-17 │
> │ Type "notebook()" for the browser-based notebook interface.│
> │ Type "help()" for help.│
> └┘
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "/media/Work2/SageMath/sage-6.7-i686-Linux/src/bin/sage-location", 
> line 5, in 
> import os, sys, re
>   File "/media/Work2/SageMath/sage-6.7-i686-Linux/local/lib/python/os.py", 
> line 400, in 
> import UserDict
>   File 
> "/media/Work2/SageMath/sage-6.7-i686-Linux/local/lib/python/UserDict.py", 
> line 83, in 
> import _abcoll
>   File 
> "/media/Work2/SageMath/sage-6.7-i686-Linux/local/lib/python/_abcoll.py", 
> line 11, in 
> from abc import ABCMeta, abstractmethod
>   File 
> "/media/Work2/SageMath/sage-6.7-i686-Linux/local/lib/python/abc.py", line 
> 8, in 
> from _weakrefset import WeakSet
>   File 
> "/media/Work2/SageMath/sage-6.7-i686-Linux/local/lib/python/_weakrefset.py", 
> line 5, in 
> from _weakref import ref
> ImportError: No module named _weakref
>
> Please advice
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.