The examples are from my study of the OpenGL Shading Language Cookbook. The code is transferred to glut.