A Java Applet Virtual Puppet
If you liked the virtual puppet page, but don't have an Arduino, it's still possible to do something similar using Processing and, better still, the result can be exported to a Java applet that can be put on a web page to share with others. The first thing that's needed is to have the Processing environment installed, using the links above. All of the instructions on how to use those software products are available at the links, and hopefully shouldn't be too difficult to follow. Then, the code we'll be using can be downloaded using the following link:Click here to download the Processing code.
Having set up Processing and downloaded the code, you should now be able to open the code in the Processing editor. You can run it straight from there to test it out or modify the code and, when you decide you're ready to make a web applet in Java all you need do is go to the File menu and select Export. Processing will then do all the hard work of making the applet for you, including a web page that you can edit to your own needs. Our virtual puppet applet is shown in Figure 1, and you can control it using the keyboard shortcuts detailed below. If you can see the applet but the controls don't work, try clicking the applet window. If the applet doesn't work at all, it probably either means that you're browser doesn't support Java (or you have the Java option turned off in your preferences), or you don't have Java installed on your computer. However, if the latter then installing Processing should cure that.
Figure 1. The virtual puppet Java applet.
The virtual puppet applet can be controlled using the following keyboard shortcuts:
Use the cursor arrow keys to move sideways, forwards and backwards.
Use the i and o keys to zoom in or out.
Use the , and . keys to change the speed of rotation.
Use the j key to jump.
Use the a and s keys to explode or implode the figure.
If it all goes horribly wrong, use the d key to put everything back the way it was at the start!