College-Prep Physics: I’ve been coding with my AP Physics classes for years. But in honor of this week’s Hour of Code, I tried VPython programming for the first time with my College-Prep class. We used the GlowScript version of VPython, which can now run regular VPython code inside a browser. Nothing to install!
Why are we coding in physics class?
I asked the students if they had ever seen the first Toy Story movie:
Realistic motion is often too complicated for animators to do by hand, says Michael Kass, a researcher at Pixar Animation Studios. “The results can be awful and very expensive.” He points to the original 1995 Toy Story and notes that “if you see a wrinkle in clothing, it’s because an animator decided to put in a wrinkle at that point in time. After that we [at Pixar] decided to do a short film to try out a physically based clothing simulation.”
(excerpt from “Animation uses old physics to new effect” in Physics Today)
Then I showed this simple cloth physics engine:
Next, we watched these short clips showing more advanced modeling of clothing, hair (from Tangled), and snow (from Frozen).
Now it was time for the students to tinker with some code which modeled our red and blue constant velocity buggies. Rather than have them do a tutorial from scratch, I gave them a pre-written VPython program and asked them to make changes in order to create different outcomes. They worked in pairs, and I circulated around the room stamping their sheets as they accomplished each task. (The ♢♢ tasks require them to apply what they learned from the ♢ tasks.) Often there is more than one way to do each task.
For more info on how to incorporate programming and computational physics into an introductory physics course, I highly recommend reading this article:
Chabay, R. & Sherwood, B. (2008) Computational physics in the introductory calculus-based course. American Journal of Physics, 76(4&5), pp. 307-313. pdf abstract
NGSS Science and Engineering Practices:
#5. Using mathematics and computational thinking