On Fri, Jan 27, 2012 at 1:10 AM, mmarco <mma...@unizar.es> wrote:
> I have just tested on chromium and firefor under linux. It does work
> on both (but i have the impression that performance is better in
> chromium). Strangely, it does work on the version of firefox that i
> have compiled in my computer, but it doesn't in the binary version
> from the firefox site. I guess that there is some compile option that
> is disabled in the binary package.

Hi,

I just looked at WebGL and other options for a while, and though WebGL
is neat and "the future", etc., it is almost the farthest thing
possible from "just working".   It's the exact opposite of what I
think the Sage notebook desperately needs (and which JMOL does *not*
provide despite its promise), which is rock solid 3d graphics that
just work everywhere (except Internet Explorer, where Sage barely
works anyways).     Of course, having WebGL support will be amazing
for high-performance applications, e.g, as an alternative to VTK.
But it doesn't work on my cell phone.

I had hoped that Bill Cauchois's canvas3d rendered (that is in Sage)
would fill this void, but it is still a very basic wireframe renderer,
and isn't very useful in practice.  At least it works on everything
that supports HTML5 canvas 2d.

I found another newer 3d library called Pre3d [1].  This is a 3d
javascript library that uses HTML5 canvas 2d, which is the same thing
that Rado's graph editor uses (and Cauchois's library), and works on
iphones, android tablets, firefox, chrome, safari, etc.    It does
hidden surface removal and transparency.     Having looked through the
code, I think a library based on Pre3d could be the best *default* for
3d graphics for Sage.  It obviously doesn't look as good as jmol, but
it is very lightweight, uses little memory, loads quickly, doesn't
crash, works on my phone, etc.     It will have to be extended to do
what we want, e.g., it does not currently support text, but that
should be easy given that canvas2d has excellent text support.

[1] http://deanm.github.com/pre3d/

Any thoughts?

We would also have to write javascript code that could parse a 3d
scene described using some JSON representation, draw the scene, etc.
It would also be critical to add some sort of selector support to
pre3d (which has none).  At least manipulating the scene is
straightforward javascript, so it should be easier to integrate more
tightly with Sage than JMOL is.

 -- William


> On 27 ene, 00:41, Volker Braun <vbraun.n...@gmail.com> wrote:
>> On Thursday, January 26, 2012 2:14:36 PM UTC-8, William wrote:
>>
>> > [1] If you're using Chrome, check out
>> >http://www.chromeexperiments.com/webgl
>>
>> Unless you use Linux, where chrome doesn't support webgl despite what the
>> documentation says. Works in Firefox, though.
>>
>>
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

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

Reply via email to