From Chris' Spherical pendulum code

Will be modified!