Hey, send me an e-mail to contact@voidroom.com and I will send you drawings of how to build a cap with some source code (although you may need to rewrite it a bit, to match you needs, axes etc)