Here is a time line for the development of VPython, an extension to the Python programming language that makes it unusually easy to generate navigable real-time 3D animations (vpython.org).
1997: While at Carnegie Mellon, after writing a volume on introductory electricity and magnetism, Ruth Chabay and I teach introductory “modern mechanics” for the first time, including having the students program computational models, using the cT language I had created, something a bit like a good Basic, with (2D) graphics built-in, but running in a windowing environment on Unix workstations, Macintosh, and Windows (cT overview). cT was based on the TUTOR language of the PLATO computer-based education system (see my home page for links to videos of a conference about the history of the PLATO system).
1998: We have a remarkable student in our mechanics class, David Scherer. While in high school he led a team of his friends to create a 3D game that later won a national prize. He’s intrigued that cT has allowed students to write computational models that work on all platforms, but he glimpses a more powerful approach that would support 3D.
2000: We abandon cT, and in the spring Scherer creates VPython, with Ruth and me deeply involved in design and testing. Many powerful programmers have no interest in or patience for novice programmers, but Scherer saw it as an interesting challenge how to make programmatic 3D animations accessible to novices. His answer is to make real-time navigable 3D animations a side effect of computations, lifting a huge task from the shoulders of the novice. Of course this is also a huge benefit to sophisticated programmers as well. The original version of VPython is now called “Classic” VPython. It requires installing Python, the “visual” module, and an improved program editor based on the IDLE editor that comes with Python. In the fall of 2000 we start having students use VPython to do computational modeling in our course.
2002-2006: Jonathan Brandmeyer, an engineering student at North Carolina State University where Ruth and I were teaching, makes major contributions to VPython 3. He introduces the use of the C++ Boost libraries to glue the core of VPython, implemented in threaded C++ code, to those components written in Python, and builds autoconfigurable installers for Linux. In the 19 year history of VPython only three people made major contributions to the complex C++ code, Scherer, Brandmeyer, and me.
2008: Scherer, having sold his first software company and thinking about what to do next, and I work on VPython 5. Jonathan Brandmeyer provided support in VPython 4beta for opacity, local lighting, and textures, and made some important architectural changes, but had to stop work on the project before it was completed. Further development led to API changes that were incompatible with the VPython 4beta release, so there was no version 4.
2011: Kadir Haldenbilen, a retired IBM engineer in Turkey, and I collaborate to create the 3D text object and the extrusion object for VPython 5.
2013: Release of VPython 6, based on wxPython, which was initiated by me in June 2012 to address the serious problem that the Carbon programming framework for the Mac will no longer be supported. Major contributions to the release were made by Steve Spicklemire, a physics professor at the University of Indianapolis.
Fall 2015: Some institutions using our textbook, including Georgia Tech, report switching from Classic VPython to GlowScript VPython, and note with surprise how much more enthusiastic students are about using VPython now that they don’t have to install anything. In contrast, Classic VPython required the installation of Python, the installation of the visual module, and, on the Mac, installation of an update to Tcl. This can be daunting and can fail for non-obvious reasons. Moreover, you need to know about folders and files and file extensions. The use of GlowScript VPython rises rapidly; here is a graph of usage vs. time.
January 2016: Coady, Ruth and I, and several well-known physics education colleagues (all of them users of our textbook and of VPython) publish a document on the further evolution of VPython, in which we announce abandonment of the 16-year-old Classic VPython in favor of the GlowScript and Jupyter versions. Here is that document, detailing our reasons.
January-September 2016: In collaboration with Coady, Ruth and I modify and complete Jupyter VPython to use the GlowScript VPython API instead of the Classic API that Coady had started with, because it is much better suited to the distributed nature of the Jupyter environment. Steve Spicklemire and Matthew Craig, a physics professor at Minnesota State University Moorhead, contribute mechanisms for creating pip and conda installers. Here are demo programs running in Jupyter notebooks.
July 2016: The 3D text object is implemented in GlowScript, with major contributions from Kadir Haldenbilen. I complete the GlowScript implementation of the extrusion object, though it is still missing some capabilities that were present in Classic VPython (I later implemented the missing capabilities).
February 2017: I make the 3D text object and extrusion object available in Jupyter VPython.
June 2017: In response to requests from users, I release a version of the Python module vpython that can run outside the Jupyter notebook environment. The module detects whether the program is running in the notebook, and if not, it sets up http and websocket server mechanisms that display the 3D animations in a browser page. This makes it possible to work in IDLE or Spyder or other environment that can launch Python programs. I thank John Coady for providing helpful advice, Matt Craig for new installers, and Ruth Chabay for useful discussions. We now call VPython used with installed Python “VPython 7”.
February 2019: Matt Craig carries out a major restructuring of the code base of VPython 7 and, with the help of John Coady, enables use with Jupyterlab and current Spyder. From that time forward Matt assumes major responsibility for keeping VPython 7 installers up to date.
2020-2021: During this period many new features were implemented, such as attach_light. There was also a lot of work involved in updating the code that precedes and follows the call to RapydScript-NG, to insert async and await where needed in user programs.
January 2021: Steve Spicklemire makes major changes to use Python 3 rather than Python 2 in the server component of the Google App Engine, which deals with storing and retrieving user programs.
Here is a description of the architecture of Web VPython and VPython 7.
Is there the possibility of inserting Vpython 7 inside a WxPython GUI (without browser)?
Thanks in advance
I don’t see how. The browser element is essential, because the rendering of the 3D scene is based on GPU use of WebGL, the version of OpenGL that is built into modern browsers. You could create a WxPython GUI that includes, say, a button which when clicked would start or stop a VPython animation, but the GUI and the 3D animation would appear in different windows. Note that VPython 7 does have a significant set of widgets built-in: button, radio, checkbox, slider, menu, and wtext:
I think of the following: Generate a mini web browser inside from a Wxpython frame and to show the 3D graphic there.
Note: Sorry, my english isn’t good
Thank You in advance
Sorry, but I don’t know enough about WxPython to know whether that’s possible. Go ahead and try it. However, my guess is that it won’t work because the vpython module won’t know to use that browser instead of opening a new one. Maybe if you can arrange that focus be on the embedded browser it might work. But as I say, I’m not a WxPython expert.
I am following a group of lessons on “using Python with Arduino” found on the http://www.toptechboy.com website. In lesson 3, the instructor introduces us to VPython and how it can receive and interpret information coming from the serial port of the Arduino. I was able to install vpython onto my raspberry pi, but found that with the Arduino connected and the Arduino program running with VPython, the processor was running at 95%. So I installed vpython onto my Desktop computer.
I am using Spyder version 3.3.1 to write the python script. When I create a simple program like “from vpython import*” and then “cube(), it opens a tab in my browser with the Glowscript “GS” and the page is blank. It doesn’t want to show a cube. But, I am able to see cubes and spheres if I login to the Glowscript website and upload code to it. The browser I am using is Opera 56.0.3051.52.
I will try another browser to see if that is the problem. Would you have any advice on how I can troubleshoot this? The toptechboy website insists that the virtual python only will work with python 2.7, but I do not want to work with 2 versions of python (I like to use Python 3).
By the way, great website and I plan on doing your tutorials if I can get the vpython working. My goal is to use it with my Arduino, like toptechboy.
I apologize that your post languished unapproved. Somehow I didn’t receive notification of your proposed post. At vpython.org see the instructions concerning installing VPython 7, where you will see that there is a problem with Spyder, which is being worked on.
Do you have any examples of using a third party physics engine with VPython?
Awesome contributions. Thank you for your efforts!
Am using VPython 7 to view simulation results. The simulation uses numpy.
It seems a bit awkward to be converting between numpy arrays, and vpython vectors, but I’m new to python. Perhaps there is some trick I’m missing?
At the risk of telling you what you already know, I haven’t used numpy for a long time,
so the following is surely not ideal, though it’s surely the case that numpy doesn’t
know about the VPython vector class:
vs = 
for i in range(0,data.size,3):
vs.append(vec(data[i], data[i+1], data[i+2]))
a = np.array([1,2,3,4,5,6])
b = vectorize(a)
I can say that VPython doesn’t know anything about numpy, so if you use VPython
there is no alternative to converting between numpy and vector.
Ugh. Indentations were lost in leaving my response……
Wow Bruce. You have my deepest respect for your creation.
I’ve been working with vpython for the past year and i absolitley love working with it.
This piece written here is also really interesting.
I’ve noticed that you are a great contributor to the vpython discussion forums. I however don’t see any changes in the timeline written above since 2019. Just out of interest, why did it stop ? Was it covid ? Is there something in the pipeline ?
There has continued to be a LOT of further development, but mostly in details, not major changes that seemed to need documentation here. You can of course see the repositories for VPython 7 and Web VPython for all the details: