The second version of my previous experiment, this allows you to manually change the variables that control the pen.