At the request of Jason Grout, I've posted another Sage+tvtk 3D
graphics demo at 
http://sage.math.washington.edu/home/cwitty/demo-tangent-tvtk.py
.

This is essentially a copy of 
http://demonstrations.wolfram.com/TangentToASurface/
: it draws a 3D plot of a surface, lets you spin the surface with the
right mouse button, and lets you click on the surface with the left
mouse button; when you click, it draws a rectangle showing the tangent
to the surface at that point.

As before, you need to install mayavi (perhaps "sage -i
mayavi_2.0.20080117" will work, at least under Linux); then run "sage -
wthread", and type:
  sage: load demo-tangent-tvtk.py
(If you're using sage 2.10.3.rc1 or later (not yet released), you can
use "attach demo-tangent-tvtk.py" instead.)

It's not as impressive as I had hoped; probably it would be better if
the coloring were changed, but I'm not planning to work on it any
further.

This is much simpler than my previous demo, and has (I think) no
unused code.  Only 112 lines of code!  (Which is still too much...)

The surface can be changed by changing the "formula = " line in the
source code.  (There's another example on the next line you can
uncomment and try.)

Carl
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to