CS 4554- Computer Graphics I: Assignment 2 : 3D Transform and Navigation

Requirements

  • Download the sample project : CG1_LAB2.zip;
  • Load and display multiple 3D objects in the scene ( num >= 3 );
  • Use keyboard to translate, rotate and scale one object;
  • Use keyboard to translate and rotate camera;
  • Draw each face as filled polygon rather than wireframe;
    You can fill each polygon with random color to distinguish them if you do not implement any lighting on it yet;

Upload( blackboard )

  • A description of your project structure (short documentation);
  • Source code with enough comments to make it clear what you are doing;
  • Movie of your animation

Extensions (Preparation for next Lab)

  • Use mouse to rotate the object instead of keyboard.
    The object should rotate in the direction that you drag the mouse ( like a trackball )
  • Calculate and display normal for each vertex ( Important for lighting and shading! )
    Vertex normal can be calculated by averaging the normals from neighboring faces.

Notes

  • Search gluPerspective and gluLookat for more information about projection and view matrix;
  • Notice that OpenGL uses column major matrix rather than row major matrix;
  • Learn how to draw lines, polygons, and other primitives in OpenGL(Search glBegin/glEnd/glVertexPointer for more information);