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

  1. Using primitives based on the origin construct the robot arm shown in figure-A.
  2. N.B. It is important that you create the components as objects centered on the origin and then transform them into place (see diagram)
  3. Compile and Execute.

Part B

  1. Create a Win32 Application project in VisualC++ called EX_OPENGL_TRANSFORMATIONS_B. (use the "Simple Application" template)
  2. Modify the code in part A to allow the user to rotate the shoulder using the 'z' & 'x' keys.
  3. Compile and Execute.

Part C

  1. Modify the code in part B to allow the user to rotate the elbow using the 'a' & 's' keys.
  2. Compile and Execute.

Part D

  1. Modify the code in part C to allow the user to close the jaw using the 'q' & 'w' keys.
  2. Compile and Execute.