Question 1:
ECE59500 Computer Graphics Assignment 2
1. To emphasize the importance of understanding how the order of transformations influences the way a model is moved in the world. Consider the following three transformations:
Rotate 30.0 degrees about the axis (0.0, 1.0, 0.0); Rotate 45.0 degrees about the axis (0.0, 0.0, 1.0); Translate (0.0, 0.0, -0.5);
Discuss the six possible orderings of the above commands. Write an OpenGL program and use the keys ¡®q¡¯, ¡¯w¡¯, ¡¯e¡¯, ¡¯a¡¯, ¡®s¡¯, and ¡®d¡¯ to control the six cases respectively to display the teapot in the scene.
2. Implement two commands yourself: myRotatef(…) and myTranslatef(…), which perform the same transformations as glm::rotate(…) and glm::translate(…), respectively.
Write an OpenGL program to implement the six cases indicated in the step 1 by using your own transformations of myRotatef(…) and myTranslatef(…).
Question 2:
1. Write an OpenGL program to display a teapot in the middle of the window with appropriate glm::lookAt(…) and glm::perspective(…).
2. Revise the program by adding a flexible camera control option for user to slide, pitch, roll or yaw the camera. Use the keys S, P, R, and Y to control the camera respectively.
Notes: Provide source code listings, with documentation explaining what your code does.