Binder VPython update

59 views
Skip to first unread message

Bruce Sherwood

unread,
Sep 30, 2016, 2:16:43 PM9/30/16
to Project Jupyter
The VPython demo programs at Binder have been updated to include programs with widgets:

http://mybinder.org/repo/BruceSherwood/vpython-jupyter

Simon Biggs

unread,
Oct 1, 2016, 2:13:15 AM10/1/16
to Project Jupyter
Thanks Bruce. If you would like I made a fluence demo using ipython and widgets:
https://github.com/SimonBiggs/MRS360-Lecture-Widgets/blob/master/Fluence.ipynb

Feel free to reuse it if you wish.

Bruce Sherwood

unread,
Oct 1, 2016, 11:41:08 AM10/1/16
to Project Jupyter
Thanks, Simon, but your program uses the original ivisual module, not the vpython module. John Coady created ivisual, and later he, Ruth Chabay, and I have collaborated in creating the vpython module, which is now much more complete and robust than ivisual. Note that the ivisual repository hasn't changed since last December, and that the repository gives a link to vpython.org, where you will find detailed documentation.

Jupyter VPython uses the same syntax as GlowScript VPython (glowscript.org). The difference is that the GlowScript version uses the RapydScript Python-to-JavaScript transpiler and makes it possible to write and run programs in the browser, without installing anything. This has proven to be highly appropriate for those new to programming, but there is no access to the world of Python modules. Jupyter VPython is appropriate for experienced programmers because 1) it is true Python (RapydScript tries to come close but cannot be 100% correct Python) and 2) it of course provides access to all Python modules. Jupyter VPython uses the GlowScript library to display the 3D animations in the notebook. 

Bruce Sherwood

unread,
Oct 1, 2016, 9:56:39 PM10/1/16
to Project Jupyter
I attempted to convert your program to use the vpython module, though it doesn't quite run, probably because I'm not sure how I'm supposed to set the parameters with the sliders. I attach the notebook.

Fluence.ipynb
Reply all
Reply to author
Forward
0 new messages