Ask Your Question

jcamp0x2a's profile - activity

2020-07-28 20:53:01 +0100 received badge  Enthusiast
2020-07-26 19:29:47 +0100 received badge  Good Answer (source)
2020-07-26 19:28:13 +0100 received badge  Necromancer (source)
2020-07-26 18:50:35 +0100 commented answer Animate 3d surface and add some curves ?

Interactive animation (second link in @slelievre's answer) looks like it's coming soon -- maybe with sage 9.2. It was worked under ticker #29194.

2020-06-18 17:51:22 +0100 commented answer How can I access the course code that Sagemath uses for its Threejs back-end

Absolutely! I try to check this site every couple days, but the trac ticket you mentioned or email would probably be a better forum. My email's not hard to guess from my username: just

If you have any example code or animated plots built up, perhaps we can compare and see if there's any functionality/ideas/use-cases we can incorporate from each other's work. Another pair of eyes on the code for review or any additional testing is always welcome, too.

2020-06-17 15:29:38 +0100 received badge  Nice Answer (source)
2020-06-17 01:53:24 +0100 received badge  Teacher (source)
2020-06-16 00:47:03 +0100 answered a question How can I access the course code that Sagemath uses for its Threejs back-end

dan_fulea's answer above is great advice for searching the source code of Sage as well as other places with the other functions he mentioned. I've worked on a few bug fixes / features for the three.js viewer, so I can perhaps point you to more specific locations:

The front-end consists of a single template HTML file containing the JavaScript that's used to render and manipulate the 3D scene. It's located at src/sage/ext_data/threejs/threejs_template.html.

The best place to start looking on the back-end is src/sage/plot/plot3d/base.pyx. Within, there's a Graphics3d class, and inside it is the _rich_repr_threejs method. Briefly, this method collects viewing options set by the user or defaults; builds up the points, lines, surfaces, and texts used in the scene; and inserts those options and the scene data into a copy of the HTML from the template.

How the resulting HTML gets saved to a file and launched in your browser, I'm less knowledgeable of, but,, and in src/sage/repl/rich_output/ may be good places to look.

Any features or bug fixes you contribute would be greatly appreciated! If you create a ticket over at trac dot sagemath dot org (can't seem to post a link) for such changes, consider CC'ing paulmasson as he's the creator of the three.js viewer and is who I've been most in contact with regarding it. And feel free to CC me as well: gh-jcamp0x2a.