Eric quite eloquently made the case for threejs. I tend to agree with him on most of the points. However, a couple points should be complemented:
- The "minor transparency issues" he mentions may deprive the resulting plot of part of its mathematical meaning (for example, the plot of a sphere and a cone can curently clobber the display of the part of the cone inside the sphere...). - Recent progress on the jmol front (Trac#25026 <https://trac.sagemath.org/ticket/25026>, positively reviewed) may render this switch a bit less urgent. - The extra abilities of jmol/jsmol may ake it a bit more useful for some tasks (e. g. determining the "right" view parameters for a planned static view, e. g. for publication). That said, I support the idea of the switch of defaults (if only because of spite against Java ;-). ==> +1 Le lundi 23 septembre 2019 13:51:23 UTC+2, Eric Gourgoulhon a écrit : > > Dear Sage-dev, > > This is a poll to make three.js (https://threejs.org/) the default 3d > viewer > in Sage, in replacement of Jmol (https://sourceforge.net/projects/jmol/). > > Indeed, thanks to the work of Paul Masson, the three.js 3d viewer is doing > a > very good job in displaying Sage 3d plots, as you can see in these examples > taken from Sage reference's manual: > > https://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/sage_reference_threejs.ipynb > > You can rotate/zoom the 3d view with the mouse and, by clicking on the > small black > arrow at the bottom right of the view, you can download a png screenshot. > > Other examples of three.js rendering can be found in this notebook devoted > to > anti de Sitter space: > > https://nbviewer.jupyter.org/github/sagemanifolds/SageManifolds/blob/master/Notebooks/SM_anti_de_Sitter.ipynb > > For more information about the three.js renderer in Sage, see > https://doc.sagemath.org/html/en/reference/plot3d/threejs.html > > The discussion about having three.js as the default viewer is taking place > in > the ticket > https://trac.sagemath.org/ticket/22408 > This ticket also contains the git branch to perform the change if decided. > > Here is a discussion summary: in favor of three.js, we have > > - three.js, which is based on the WebGL API, displays 3d plots faster than > Jmol, and with a better quality > > - 3d plots rendered with three.js can be publicly shared via > nbviewer.jupyter.org, contrary to those rendered with Jmol, which > appear as > blank spaces, cf. this test notebook: > > https://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/test_3d_view.ipynb > > - three.js enables to label the plot axes (via the option 'axes_labels', > the default > of which is ['x', 'y', 'z']); on the opposite, there are no labels on > Jmol > plots and the option 'axes_labels' is ineffective, which looks like a > serious > drawback for a mathematical software... > > - Jmol causes many troubles to Sage packagers (see #22408 > <https://trac.sagemath.org/ticket/22408> for details); > for instance in Sage 8.8 console, Jmol display is broken on recent > Debian-based distros (e.g. Debian Buster and Ubuntu 18.04), due to a JRE > issue; fortunately this is fixed by > https://trac.sagemath.org/ticket/25026 > > On the con side, there are > > - the current lack of non-interactive conversion of three.js views to > static > png figures (in interactive mode, the black arrow mentioned above does > the > job). As a result, the png figures in the reference manual will still be > generated with Jmol, as proposed in #22408 > <https://trac.sagemath.org/ticket/22408> > > - some minor opacity issues (see #22408 > <https://trac.sagemath.org/ticket/22408> for details) > > > Given the above elements, please vote! > > Eric. > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/011dcb03-003c-4109-b8ef-b78526b71bda%40googlegroups.com.