An artificial horizon and compass made with Processing. Its only responding to mouse movements at the moment, but will eventually be fed data from gyros connected to an Arduino. You can visit my website: http://timlightfoot.net to download the code. If for some reason my site is down, feel free to send me a message with your email address enclosed and I will send you a copy of the code.
********************
Code updated to version 2. Includes more comments explaining how the code works, and some optimization which reduced the overall number of lines of code. Also, better overall organization.