See contrib/demo for the source code to the demo, with minor modifications and improvements since that was released.