Adapted from an "Introduction to Coding" video (original source) given at MIT on July 21, 2013. Part of the HSSP 2013 course Computer Programming and Interactive Graphics by Curran Kelleher.
Modeling the pendulums seen in the video Pendulum Waves starring Alan
Look at the JS code to see functions representing a number of intermediate steps.