Revisited, updated ArcBall sketch for processing, features PVector and PShape (retained shape). Pressing x, y or z keys "constrains" rotation to that axis. Otherwise drag mouse to rotate (arcball) in and direction. Requires greater than processing-2.0a5 for colored faces . Doesn't work on-line anymore... Also you, can't see the java files included as part of the sketch.
To tweak this sketch, first download it.
Make your updates, then upload your tweak!