Example code from the book IPhone3DProgramming by Phillip Rideout