Ask Your Question

plot_vector_field3d and three.js viewer

asked 2018-02-13 05:56:22 -0500

jepstra gravatar image

I guess there might be some mistake in my code, but I cannot use plot_vector_field3d and show the result with three.js viewer. The code is

var('x y z')
f = (x, y, z)
show(plot_vector_field3d(f, (x,-3,3), (y,-3,3), (z,-3,3), aspect_ratio=1), viewer='threejs')

and it only shows an empty box. How to explain this behaviour?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-02-13 15:14:45 -0500

eric_g gravatar image

updated 2018-02-13 15:26:52 -0500

Unfortunately the plot of vector fields with threejs is not implemented yet. This is one of the reasons why threejsis not the default 3d viewer in Sage yet, see the "con" section of

Moreover, the person who started the implementation of threejs in Sage cannot work further on it at the moment. So, if you (or anybody else reading this) feel like to implement vector fields in threejs, you are very welcome. This would be a nice way to contribute to the open-source project SageMath! Please contact me for guidance if required.

edit flag offensive delete link more


Thank you very much for your comment and attention!! I'm afraid I'm not very used to the code inside Sage... but I hope I may contribute to SageMath in the future.

jepstra gravatar imagejepstra ( 2018-02-14 02:15:20 -0500 )edit

Very good! A good starting point is; see also for implementing new parents.

eric_g gravatar imageeric_g ( 2018-02-15 03:56:28 -0500 )edit

@eric_g thank you very much!!

jepstra gravatar imagejepstra ( 2018-02-15 11:07:31 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-02-13 05:56:22 -0500

Seen: 56 times

Last updated: Feb 13