Changes between Version 3 and Version 23 of Ticket #12402

09/30/16 00:05:49 (6 years ago)

Here's some basic Three.js support for Graphics3d objects. It is modeled on the corresponding function in SageMathCell: simply use threejs() to wrap any combination of points, lines and surfaces. This will save an HTML file with the JavaScript needed to render the scene and open it in a browser.

There are a great many features that can be added in the future, but I first would like to see how much interest there is in this. There have been problems surfacing with Jmol (#20978 for example) and I certainly think it would be preferable to have a native viewer that can be updated more quickly. The HTML format is also more portable than Jmol files, since it only requires a modern browser to run.

This version relies on an external CDN to retrieve the Three.js library, since it does not currently download to the hard drive during the build process. I'll need help on figuring out how to change that at some point, since I'm sure people will want to be able to view saved files offline.

Last 10 new commits:

3d1cd2aHandle nested lists
efb3d0aHandle nested lists
f70ac3dAdd line plots
55f12e6Add point plots
b4c8414Adjust centering and camera
374809aRebase to move point bounds off points
9a42352Add auto z-aspect
d560683Minor rebase
aa322adAdd axis labels
7cedf75Check for equal bounds


  • Ticket #12402

    • Property Status changed from new to needs_review
    • Property Cc mbejger gagern egourgoulhon paulmasson added
    • Property Branch changed from to u/paulmasson/12402
    • Property Milestone changed from sage-5.11 to sage-7.4
    • Property Commit changed from to 7cedf75db69671cfb0a201435e5148d1041f0f05
  • Ticket #12402 – Description

    v3 v23  
     1Usage: `threejs( plot3d )`