1. When you are writing a GLUT program, you get control back through callback functions. As expected, there are different callback functions for different events. You set it up initially by passing in function pointers to the appropriate callback functions (glutReshapeFunc, glutKeyboardFunc. etc).
2. The glutInitDisplayMode() function in main is given the characteristics of the display window as parameters. For example, in this program the parameters are GLUT_RGBA, which means the display window will use the RGBA color mode, and GLUT_DOUBLE which means that double buffering will be used.
3. the call to glOrtho() will set up the coordinate system, while glViewPort() sets up the part of the window that OpenGL will actually use.
My Program is made up of a bunch of circumscribed rectangles drawn according to the Golden ratio (1.618...) with the most outer "golden" rectangle being the entire window. I also drew the best approximation of the rectangles corresponding golden spiral using line strips. The 5 golden rectangles and 4 parts of the golden spiral come up one at a time by pressing the "n" key. Also, any kind of window resizing messes up my program completely as it is completely as it is based on proportions.