Em 23 de novembro de 2010 16:21, Paulo César Pereira de Andrade
<paulo.cesar.pereira.de.andr...@gmail.com> escreveu:
> Hi,

  Doing the bad netiquette of replying to myself, but now I am sure this
is not specific to my sagemath package.

> Sorry if this was already asked/answered as I did not read all threads
> about sagemath
> and jmol. This is related to mandriva sagemath package, but,
> downloading the binary for
> mandriva 2009.0 I get the same results.
>
> I have this strange behavior, where in both notebook and tutorial
> sample, it appears
> to work correctly, e.g:
>
> http://img269.imageshack.us/img269/7279/notebookandtutorial.png

  I am almost 100% certain that the issue is:

-> sage-4.6/sage/plot/plot3d/base.pyx:819 <-
    def _prepare_for_jmol(self, frame, axes, frame_aspect_ratio,
aspect_ratio, zoom):
        from sage.plot.plot import EMBEDDED_MODE
        if EMBEDDED_MODE:
            s = 6
        else:
            s = 3
        box_min, box_max =
self._rescale_for_frame_aspect_ratio_and_zoom(s, frame_aspect_ratio,
zoom)

because by copying the files generated for the notebook and running
jmol on command line
it shows what looks like a sphere :-), also, playing with zoom and
aspect_ratio/frame_aspect_ratio
almost gets there, but not sure how to properly adjust the origin in
that case, or start with
"unzoomed" image.

  Also, the only difference from the files generated for the notebook
and for the "command
line" is that coordinates for the notebook ones are twice bigger than
for command line.

> but then, just ^C and run on command line:
>
> http://img843.imageshack.us/img843/2830/xtermwindow.png
>
> and the result is:
>
> http://img831.imageshack.us/img831/3907/jmolwindow.png
>
> Same results with openjdk and java-sun (in these screenshots using openjdk).
>
> I have packaged jmol 12.0.22, and noticed that I need to pass the "-s"
> or "--script" option
> to jmol or it will not understand it is a script :-) Maybe there is
> something in the notebook
> code, or javascript that corrects the issue. I believe it may be
> related to jmol having
> deprecated the "pmesh" command in favor of the "isosurface" command, but I 
> don't
> think I can figure out a simple patch for the sage3d code.
>
> [talking about sage3d, I did not yet add it to the sagemath mandriva
> package, so,
> only jmol and tachyon can be used to view 3d plots for now]

  I think I could "hack" the package to always act as if EMBEDDED_MODE
was set, but that would only hide the problem...

Thanks,
Paulo

-- 
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