Using GlowScript in AP Physics C

Rather than work on THIS week, I spent some time today trying to put together something for the Hour Of Code for my AP Physics C class. I am a fan of Rhett Allain at Wired’s Dot Physics. He teaches using a version of Python (really VPython) called GlowScript and I have been working up some code using some of the video analysis labs we’ve done in AP Physics. First, here is the video upon which this code is based. Check that out first. This is one of the fantastic direct measurement video labs from Peter Bohacek and has built-in controls and measurement tools. Those by themselves are fantastic for teaching and learning physics.

Here is my code written and edited at GlowScript.org. Give it a try and compare the result to the video. Not too bad. Now I think the cool bit will having the students do similar things. This is a PERFECT activity for Hour of Code coming up in December.
Here is the code, but although the link above is working, the code below may not.

For astro, I’m going to modify an activity from HOC 2014 from AAS, PencilCode, Google CS First, and Code.org.