Exercise: OpenGL Transformations
EX_OPENGL_TRANSFORMATIONS
Copy the 2D OpenGL template from H:\Graphics\Basic2DOpenGLApp.
Put it into a directory on your G: drive called G:\OpenGLExercises\ex3a\ for
part A, G:\OpenGLExercises\ex3b\ for part B etc.
Play with the application Robot.exe
Part A
- Using primitives based on the origin construct the robot arm shown
in figure-A.
- N.B. It is important that you create the components as objects centered
on the origin and then transform them into place (see diagram)
- Compile and Execute.
Part B
- Create a Win32 Application project in VisualC++ called EX_OPENGL_TRANSFORMATIONS_B.
(use the "Simple Application" template)
- Modify the code in part A to allow the user to rotate the shoulder using
the 'z' & 'x' keys.
- Compile and Execute.
Part C
- Modify the code in part B to allow the user to rotate the
elbow using the 'a' & 's' keys.
- Compile and Execute.
Part D
- Modify the code in part C to allow the user to close the
jaw using the 'q' & 'w' keys.
- Compile and Execute.