Member-only story

Web VPython Road Test

Rhett Allain
10 min readMar 24, 2024

--

Let’s suppose that you are in a physics course that includes some type of numerical calculations. Maybe that course uses python — but not just any python, it uses Web VPython. If that’s the case, you will need to know a certain set of skills. OK, don’t worry. I’m going to go over the very basic stuff you need to know. It’s like a road test except for python and not a car.

Python vs. Web VPython

Of course there’s python. It has a bunch of useful modules like numpy and matplotlib . You can use these by installing Anaconda or going to Google Colab.

There’s another option — Web VPython. This is another online version of python that has the following awesome features.

  • Great and simple graphs along with animated graphs (but no 3D graphs).
  • Vectors. Everyone likes vectors.
  • 3D visual objects — but I’m not going to use those in this tutorial.
  • Runs online — you can even run it on a phone (but I wouldn’t recommend it).
  • Oh, it’s free.

There are two common places to use Web VPython. You can go to glowscript.org or trinket.io. They are pretty much the same, but I tend to use trinket. Note: if you are using trinket.io, make sure that you choose “glowscript” when you create a new trinket. Otherwise, you…

--

--

Rhett Allain
Rhett Allain

Written by Rhett Allain

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.

Responses (1)