To rotate: hold down mouse button while moving the mouse
 
Source code
Built with Processing