The first program you are to write will allow a user to create a 2D profile with a with a set of points in a 2D space. The user will interactively, and with the mouse, create a profile by specifying control points. Additionally, the user must be able to visualize the profile as a polyline as it is being created, in an OpenGL window. Once the profile has been specified, the user will give as input to the program the number of successive rotations to accomplish a full revolution around the vertical axis of the space in which the profile was created. The program will then compute the angle for these rotations. The program then rotates the profile with the successive rotations and creates a polygon mesh of the object as it is being created. Each polygon must be a triangle and the order in which the points are being stored should be consistent (useful for surface normal computations). The program saves this data structure in a file and then terminates. Use a data structure that is convenient, such as the one proposed in the textbook at page 296. The second part of this assignment is to create a program that will read such a file containing a polygon mesh and will render it within an OpenGL window. The program loads the object and sets the 3D camera, over which the user will have control with the mouse (or buttons, if you implement them). Given a camera position, the program will first perform a simple back face removal with the surface normals. Then a Z-Buffer algorithm will be employed to finish up the hidden surface removal (in OpenGL, this can be done very easily with glEnable(GL_DEPTH_TEST)). You should render the surfaces with different shades of a single color. The chosen color can be your favorite combination or red, green, and blue (RGB). For this, set the material properties with diffuse, specular and ambient components and a light source that has an adequate position for visualisation of the object. Use glShadeModel(GL_SMOOTH) to perform Gouraud shading. Here are some suggestions for this assignment along with the rules for submission. There are 3 bonus marks if you figure out how to use buttons in OpenGL and allow the user to control the camera with them. Use a maximum of OpenGL routines to make your life simpler. There is a good source of OpenGL documentation here. Your programs should terminate when the user types the q key on the keyboard. ------------------------------------------------------
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
## Platform
Unix machine