Reference no: EM131210679
Submit your solution document in the form of a single ZIP file on or before the cut-off date shown above.
Please follow the instructions on the filename convention, it is important!
You must implement your assignment in a single C file. This is necessary to expedite compiling for this assignment.
NAMING CONVENTION
File name:
{surname}_{firstnames}_tma.c Example
teh_james_tma.c
1. Please make sure your code must compile and run, on the suggested platform in class.
2. Include all class libraries and header files used. Zip your files together with the C file.
3. Remember to provide comments to your code.
4. Finally, submit your single ZIP file.
Question 1
Assemble an OpenGL/GLUT application in C++ that does the following:
(a) Using Open GL, create a resizeable window (resizing using mouse).
(b) Implement display function to draw the following 3D objects. Illustrate the objects in white on a black background. The objects should be drawn in a size relative to the window. For example, if the window is made smaller, the objects should be drawn smaller and vice-versa:
(i) Pyramid
(ii) Cube
(c) Develop the following keyboard control:
- Press Escape key to exit the application
- Press ‘c' key to display the Cube and not the Pyramid
- Press ‘p' key to display the Pyramid and not the Cube
- Press ‘a' key to display both the Cube and the Pyramid
(d) Employ more advanced computer graphics concepts by including the following features in your program.
(i) Create a color cube using one color for each vertices of the cube, and using a bilinear color interpolation method.
(ii) Modify the program to rotate only the cube about any axis, whether with both objects displayed or only the cube displayed. This rotation should be started or stopped by the left mouse button.
(e) Appraise your code with clear comments, and ensure that your answers are explained in simple terms.
C++ function that receives an integer passed to it
: Write a statement that calls the divide By Two function from Pencil and Paper Exercise 1, passing the function the contents of the total variable. The statement should assign the function's return value to a double variable named quotient. (The an..
|
Payoff diagrams for the call
: Verify that you obtain exactly same profit diagram for the purchase of a 950-strike S & R put and sale of a 1000-strike S&R put( put spread). What is the difference in the payoff diagrams for the call and put spreads? Why is there a difference?
|
Calculate the equity risk premium
: If the rate of return on the S&P 500 index was 23% for 2009, and the risk-free rate at the end of 2009 was 1%, calculate the equity risk premium for 2009.
|
Write an algorithm to count up the total dollar amount
: Write an algorithm to count up the total dollar amount of coins a person has removed. The algorithm should work for any number of coins and should report the dollar amount of the coins selected.
|
Illustrate the objects in white on a black background
: MTD315 - Computer Interactive Graphics - Illustrate the objects in white on a black background. The objects should be drawn in a size relative to the window and employ more advanced computer graphics concepts by including the following features in yo..
|
Advantage of excess capacity in a existing plant
: You are an analyst for a sporting goods corporation that is considering a new project which will take advantage of excess capacity in a existing plant. The plant has a capacity to produce 50000 tennis racquets
|
What in general will the project achieve
: What in general will this project achieve? What is the history of the problem? Why is this problem interesting? When and why does the problem occur? Is the problem already solved? What is done now?
|
Is the vedanta philosophy reasonable
: Is the Vedanta philosophy reasonable? Does it accurately describe reality? Why or why not? Consider the notion of a higher or "transcendental" reality. Could it be true that there is an "immaterial" realm, or do you agree with the materialist view?
|
Appropriate opportunity cost
: The actual cost of materials used to produce each unit is $ 20. Your tax rate will be 40% and the appropriate opportunity cost is 12%.
|