Rubber Pencil Illusion-1

Have you ever tried the "Rubber Pencil illusion?" If not, do a quick web search -- you'll find plenty of content describing how to perform/observe the simple illusion. However, there aren't many attempts to dig deep into the math or physics of how it works. In my search, the journal article http://www.springerlink.com/content/wq4608017297535u/ comes the closest. Sinusoidal motion is the basis for the simulation below (An imperfect assumption from a physics perspective, but a reasonable approximation I believe). Play with the sliders and checkboxes to get a sense of how each control affects the animation.