Rotating Box
This program displays a white 3D box, which will rotate as the mouse cursor is moved across its screen.
Built with Processing
Codevoid setup() {
size(255,255,P3D);
}
void draw() {
background(0);
lights();
noStroke();
translate(128,128);
rotateY(float(mouseX) / float(width) * PI);
rotateZ(float(mouseY)/float(height) * -PI);
box(50,50,50);
}