On Sun, Mar 8, 2009 at 11:03 AM, Prabhu Ramachandran
<pra...@aero.iitb.ac.in> wrote:
>
> Hi Carl,
>
> On 03/08/09 22:31, Carl Witty wrote:
>> If you want to add such support, the place to look is
>> sage/server/notebook/cell.py, in the function files_html.  This
>> function takes a list of all the files that were produced by
>> evaluating the cell, and produces HTML with display or download links
>> for those files.  For example, the case of *.svg files is handled like
>> this:
>>
>>             elif F.endswith('.svg'):
>>                 images.append('<embed src="%s" type="image/svg+xml"
>> name="emap">'%url)
>>
>> So if you know what to put into HTML to display an x3d model, it would
>> be trivial to add another case in files_html.
>
> Aha! Thanks. I haven't touched cell.py yet but as a proof of concept
> look here again:
>
> http://nb.hpfem.org/home/pub/16/
>
> At the bottom you should (if all goes well and you have an x3d reader
> setup for use on your browser) see a blue triangle like the one here:
>
> http://nb.hpfem.org/home/pub/12/
>
> except that on this one you can actually interact over the web.  This is
> really cool although the x3d files can get pretty big.  We'd probably
> want to throw in some compression in as well but I'm not sure that would
> work with all plugins (or would the browser take care of that?). Anyway,
> in the above I simply edited the worksheet and added something like:
>
> <embed width='400' height='300' src="./cell/14/a.x3d">
>
> and it seems to work with my setup.  I am using freewrl
> http://freewrl.sourceforge.net/ on Ubuntu 8.04.

I just tried that too and it works for me as well:

http://nb.hpfem.org/home/pub/15/

and clearly I could now create some nice 3d results of our code and it
would work. Nice job!

jmol doesn't work for me in Debian/Ubuntu if I am using the opensource
java. If I used the proprietary version, then it works, but I really
prefer to use opensource tools. With freewrl, all I did was to add:

deb http://kheb.homelinux.org/debian unstable main

to may sources.list and "apt-get install freewrl" and it just works in firefox.

Ondrej

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

Reply via email to