So, then I started investigating and trialing a number of languages. Ideally I wanted something that was easy to install and get to grips with as I definitely did NOT want to teach the students complicated syntax and compiling (so Fortran was out), or that costs money (ditto Matlab). As the IT dept teaches Python, I tried that out using an online tool called Trinket. This looked promising as a basic code could be embedded into this website and the students could modify and play with it. The problem was that the syntax of Python, or rather Glowscript, is not terribly easy to get to grips with.
So, I found PhysGL which appears to fit the bill. It is free and online, although I cannot embed either the code or the animations. The syntax seems pretty intuitive, which is ideal, and the simulations look pretty nice. There are a couple of downsides, a) there is not too much in the way of instruction manuals, so I have had to work a bit out myself using trial and error, and b) as it is online and runs through the web it can be slow. This is especially a problem as using long time intervals can lead to errors. I need to think more about the circular motion and SHM simulations when I am back in Bermuda and with a faster laptop. However, for the basic kinematics stuff in both one and two dimensions (or three?!) it seems ideal.
The idea is to focus entirely on the physics and the logic behind how animations, kinematics and dynamics work in ever shorter steps, and not the nuts and bolts of the language itself.
The basic structure of any animation code is:
- define parameters and variables
- draw a background, if required
- run the physics inside a loop
- display vectors and/or a trace
So, the plan is to include this activity along with the usual labs and problem solving in class.