The
Evolution of VPython
Recent developments in VPython have modernized and improved the language and environment.
· GlowScript (glowscript.org) is a browser-based implementation that requires no installation, and that utilizes significantly more of the capabilities of modern graphics hardware. The browser environment is accessible and easy to use.
· VPython 7 can now be used in the increasingly popular browser-based Jupyter scientific notebook environment, which provides advanced users full access to the computational ecology of Python (either 2.7 or 3.x). Jupyter is automatically included with either the Anaconda or Canopy Python distributions. As of June 2017 VPython 7 can also be run from IDLE or Spyder, with the 3D displays shown in a browser window rather than in a Jupyter notebook. See vpython.org for details.
After extended discussions we have decided that these two environments, GlowScript VPython and VPython 7, will be the VPython implementations to be further supported and developed. The older “Classic” VPython, which required the separate installation of Python 2.7 and visual (as well as Tcl on the Macintosh), will continue to exist in its current form, but will no longer receive updates or bug fixes, though Matt Craig has offered to continue to build an Anaconda conda package until the official end-of-life of Python 2.7 in 2020, as long as building the package does not require substantial modification to the Classic VPython codebase.
Moving to browser-based environments has already made possible the addition of graphics features not available in Classic VPython, and has opened the door to more sophisticated graphics features in the future, such as shadows. This has also significantly simplified the code base of VPython, making it easier for others to contribute to the development and maintenance of VPython.
In both implementations the VPython syntax is the same (although slightly different from Classic VPython), so the same program can run in either environment as long as it does not import modules that are not available in both.
Both of these VPython implementations utilize the same 3D graphics library, based on WebGL, which enables sophisticated use of modern graphics hardware in a browser environment. The browser and the GPU play an increasingly important role in the world of computing. One of the major advantages to browser-based graphics is the elimination of operating-system-specific code, system-specific installers, and of dependency on supporting libraries that are less well supported than those in the browser-based environments. The reason that we have chosen to implement the GlowScript syntax rather than the Classic syntax is that it is significantly better suited to the new computer environments.
Which environment is right for
your situation?
GlowScript: In recent months there have been many reports that new users of VPython (especially students) are unusually enthusiastic about the browser environment because no installation is required to get going. Moreover, it is unnecessary to talk an IT department into installing VPython, an important consideration in many institutions. GlowScript VPython programs may be easily shared through web links, and may be embedded in other web pages.
VPython 7: This environment is particularly appropriate for professional and scientific users, including advanced students, because it provides access to the very large catalog of Python modules, which cannot be referenced from the GlowScript JavaScript-based environment. Jupyter notebooks have become very popular with sophisticated users of Python. Jupyter notebooks can include images, LaTeX, text, etc., and can be shared (or submitted as assignment reports). For some purposes it may be more convenient to run from IDLE or Spyder.
How do I try GlowScript or VPython 7?
See the instructions at vpython.org
History
VPython 7was initiated by John Coady in May 2014, initially for the Jupyter notebook environment, and is being further developed by John Coady, Ruth Chabay, Bruce Sherwood, Steve Spicklemire, and Matt Craig. This work was extended to the IDLE/Spyder environment in June 2017 by Bruce Sherwood GlowScript was initiated by Bruce Sherwood and David Scherer in 2011; continued development is being done by Bruce Sherwood. Classic VPython was initiated by David Scherer in 2000. The blog article A time line for VPython development documents the whole history.
Technical details
In the VPython 7 environment, VPython programs run on a local server, using standard Python, and output is sent to a browser, where the GlowScript graphics library is used to display the 3D animation. In the GlowScript environment, VPython programs are compiled in the browser itself by the RapydScript Python-to-JavaScript compiler, and the program is run in the browser.
The GlowScript libraries are based on WebGL and use GPU (Graphics Processing Unit) hardware. Use of the GPU makes possible much more sophisticated 3D graphics than the CPU-based OpenGL graphics library used in Classic VPython can provide. The effort that would be required to restructure Classic VPython to take advantage of the new developments would be enormous, and probably unfeasible. Moreover, classic VPython is increasingly difficult to maintain and install, due to its dependence on sophisticated C++ code and on libraries that have significantly less support than those used by VPython 7 and GlowScript VPython.
Ruth Chabay
Bruce Sherwood
John Coady
Danny Caballero
Matt Craig
Steve Spicklemire
Aaron Titus
2016/01/25
Minor updates 2016/09/21
Updated to refer to VPython 7 2017/06/08