A poster on GlowScript and Jupyter VPythons

42 views
Skip to first unread message

Bruce Sherwood

unread,
Jul 29, 2016, 6:23:37 PM7/29/16
to VPython-users
Here is a poster on the relationship between GlowScript VPython and Juptyer VPython, presented at a recent conference of the American Association of Physics Teachers.


Doug Blank

unread,
Jul 29, 2016, 6:27:08 PM7/29/16
to vpytho...@googlegroups.com
Something missing? I didn't see the attachment.

-Doug

On Fri, Jul 29, 2016 at 6:23 PM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Here is a poster on the relationship between GlowScript VPython and Juptyer VPython, presented at a recent conference of the American Association of Physics Teachers.


--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruce Sherwood

unread,
Jul 29, 2016, 6:33:31 PM7/29/16
to VPython-users
Puzzling. What I see is a highlighted link, but it doesn't do anything. Here it is:

http://vpython.org/contents/announcements/VPython-in-a-Browser.pdf

Doug Blank

unread,
Jul 29, 2016, 6:47:55 PM7/29/16
to vpytho...@googlegroups.com
Thanks Bruce, and congrats to you and Ruth!

BTW, we have just recently made all of our Physics Jupyter notebooks available for all:

https://github.com/BrynMawrCollege/TIDES

(in the notebooks subdirectory.)

These are licensed as "Creative Commons AttributionNonCommercial-ShareAlike 4.0" so perhaps they can be useful to others to combine with VPython and Jupyter.

Thanks again!

-Doug

On Fri, Jul 29, 2016 at 6:33 PM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Puzzling. What I see is a highlighted link, but it doesn't do anything. Here it is:

http://vpython.org/contents/announcements/VPython-in-a-Browser.pdf

--

Bruce Sherwood

unread,
Jul 29, 2016, 7:01:36 PM7/29/16
to VPython-users
Doug, does VPython show up anywhere in the notebooks? I sort of expected it to show up in Module 3 on iterative methods but didn't see it there.

Doug Blank

unread,
Jul 29, 2016, 7:12:32 PM7/29/16
to vpytho...@googlegroups.com
On Fri, Jul 29, 2016 at 7:01 PM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Doug, does VPython show up anywhere in the notebooks? I sort of expected it to show up in Module 3 on iterative methods but didn't see it there.

No, not yet. We are working on a strategy for how to combine real Python and VPython visualizations. We want to keep using numpy/matplotlib/etc, but be able to use VPython. One complexity is that we run everything from a server (JupyterHub). That complicates the code that runs on the server but displays in the client. We have to be able to manage both the cycles on the server, and the bandwidth to the browser.

-Doug

Bruce Sherwood

unread,
Jul 29, 2016, 7:46:57 PM7/29/16
to VPython-users
Note the Jupyter VPython programs run fine at Binder (assuming you can get the attention of a server):


Bruce Sherwood

unread,
Jul 29, 2016, 8:59:25 PM7/29/16
to VPython-users
I'll also point out that in Jupyter VPython almost all of the rendering machinery is in the browser, using the GlowScript libraries, so the 3D aspects don't impose any significant burden on the server.

Doug Blank

unread,
Jul 29, 2016, 10:46:24 PM7/29/16
to vpytho...@googlegroups.com
On Fri, Jul 29, 2016 at 7:46 PM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Note the Jupyter VPython programs run fine at Binder (assuming you can get the attention of a server):


They do indeed run, but some of the infinite loops are difficult (sometimes impossible) to interrupt (pressing the Interrupt Kernel button). This would be a good use for ipywidgets. Then you could pause/start/stop the animation without having a infinite loop and having to interrupt the kernel.

> I'll also point out that in Jupyter VPython almost all of the rendering machinery is in the browser, using the GlowScript libraries, so the 3D aspects don't impose any significant burden on the server.

Yes, the GlowScripts do run in the browser, but don't have access to CPython libs like matplotlib/numpy/etc. right? So that would not be an option for us without some additional teaching as we use CPython3 exclusively.

Bruce Sherwood

unread,
Jul 30, 2016, 12:35:21 AM7/30/16
to VPython-users
No, I'm not saying that you would want to use GlowScript VPython. You need access to the full Python ecology. I was only pointing out that the rendering aspects of Jupyter VPython are almost entirely handled by the GlowScript JavaScript and GPU machinery in the browser and put almost no load on your server. Jupyter VPython runs with CPython2 and CPython3.

Can you give a specific example of what you mean by "some of the infinite loops are difficult to interrupt"? I'm not sure I've seen an example of that, unless you're referring to the fact that Binder itself is problematic, in that depending on the day or time of day performance can be terrible, because it's basically timesharing.

As for widgets, in the Binder collection the programs "Buttons, sliders, and menus" and "RGB-HSV colors" and "Textures" (for example) currently use Jupyter widgets. An even simpler case of run/pause is the "Rug" program, where simply clicking the canvas pauses or runs. However, easy to use widgets have just been added to GlowScript VPython and will soon be available in Jupyter VPython (along with the new 3D text object), thereby making the same widget code run in either Jupyter VPython or GlowScript VPython. The new GlowScript widgets are button, radio button, checkbox, slider, and menu. 

Here's the documentation for the new widgets:

Bruce Sherwood

unread,
Jul 30, 2016, 9:54:33 AM7/30/16
to VPython-users
It would be instructive for all of us if you would be willing to install vpython and try the demo programs in the zip file provided at vpython.org. It's difficult to conclude anything about performance issues from the Binder situation, where we don't know what the server situation is, and performance varies enormously from one day to the next, or one hour to the next.
Reply all
Reply to author
Forward
0 new messages