Lab#4A:Composing Static Scenes Using Basic Geometric Objects and 3D Transformations

 

Goal: Get familiar with the use of 3D transformations through glTranslate, glRotate, and glScale to arrange a scene composed of basic geometric objects that are implemented by yourself or provided by GL, GLU, or GLUT.

 

 

  1. Task: Compose a static scene of your desk with at least 8 objects in the scene. For example, see View1.JPG and View2.JPG the same scene viewed from different setting of the camera.

 

  1. Skills: You should use 3D transformations provided by glTranslate, glRotate, and glScale to arrange a scene composed of basic geometric objects implemented by yourself or provided by GL, GLU, or GLUT.

 

  1. Geometric objects available in GLU and GLUT: Play with the sample code here to see the use of several types of geometric objects available in GLU and GLUT.Press the space key to stop or keep the automatic movement, press x, y, z keys to select the axis of rotation, and press 0, 1, Ö,9 to select different geometric objects.

 

  1. Sample framework of code: Download and play with the code basis provided here.Please carefully examine the code, and add in your own additional code to create the scene you want.

 

  1. Bells and whistles: The code basis only uses a single buffer for displaying the static scene viewed from a fixed camera setting. You can use double buffers, and add the capacity of a moving camera like what you did in Lab 3A and 3B.

 

  1. Submit your source code together with a self-evaluation report as a zip file under Canvas.

 

 

/******************************************************************/

 

Play with transformation.exe from Nate Robinís tutor repository to feel the effects of 3D transformations and its relationship with the GL_MODELVIEW matrix stack.

 

gl functions: regarding basic 3D transformation:

Review Chapter 3 of the OpenGL programming guide in last reading.

And the references in the blue bookregarding

 

glu geometric objects: The current reading of the blue book regarding

 

glut geometric objects: The current reading of section 11 of GLUT 3.0 specification on several types of geometric objects available in GLUT.