From: William Stein <wstein@gm...> - 2007-12-27 03:00:40
On Dec 26, 2007 3:51 PM, mhampton <hamptonio@...> wrote:
> The command show(Torus(5, 3, color=(0.7,0.3,0))) worked for me,
> although I also had a seperate red square popup.
Try the following in sage-22.214.171.124 (see
for some screen shots).
1. Start the notebook in insecure mode (since we have some
signing issues still with jmol and and the Sage notebook in
$ sage -inotebook
2. Import the new 3d graphics code:
import sage.plot.plot3d.all as p
(followed by shift-enter).
3. Type p.[tab] to see the available functions.
*All* of these will likely work -- scenes you create
can be rendered using jmol, java3d, or tachyon3d.
4. Here is an example input:
S = p.Tetrahedron(color='yellow').scale(5)
S += p.Sphere(2, color='red').translate((6,0,0))
S += p.Torus(3,1).translate((0,2,5))
This will show a tetrahedron embedded in the
notebook with a nice white background. If
you right click, you'll get a jmol menu that allows
you to spin the image, display various stereoscopic
views, zoom in and out, and do other things.
You can also click and drag to rotate the view
around. If you have a scroll wheel, you can scroll
over the image to zoom in and out (sometimes this
doesn't work for mysterious reasons).
5. You can have multiple embedded 3d
figures in the same worksheet, and can
do complicated plot3d's, parametric plots
etc. I don't like the interface for any of this
yet, but it does work somewhat.
Associate Professor of Mathematics
University of Washington