Report as inappropriate.
I've begun a series of video lessons as to how to make this. First lesson is at:
This and more video lessons and code clips at http://mrstewartslessons.com.
You'll find the code is thoroughly commented if you want to modify it. Feel free to use it however you want.