WEEK 5:  October 6 - October 12

OUTLINE:


Making the Transition to 3D Modeling

  • right-handed xyz coordinate system
  • how our TUGL library should handle 3D points
Spherical Coordinate System for Viewing
  • camera set on the orgin looking down the negative z axis
  • using glFrustum(left, right, bottom, top, near, far) for perspective projection
  • using the keyboard to control
    • elevation
    • azimuth
    • twist
    • distance to near plane

Review of Vectors Hill: Chapter 4 through 4.5

  • vector vs point
  • vector operations
    • difference between two points and how it relates to parametric representation of a line (and to tweening)
    • sum
    • scalar product
    • dot product
    • length (magnitude)
    • unit vectors
  • linear combination of vectors
    • affine linear combination
    • convex affine linear combination

2D and 3D Transformations

Transformations of Objects       Hill: Chapter 5;   

  • Affine Transformations

    Task: Develop general procedures for applying translation, rotation, and scaling parameters to reposition and resize 2D objects. Then extend to 3D.

    • Matrix Multiplication
      • the Identity Matrix
    • Translation
      • with respect to the origin
      • with respect to an arbitrary fixed point
    • Scaling
      • with respect to the origin
      • with respect to an arbitrary fixed point
    • Rotation
      • with respect to the origin
      • with respect to an arbitrary fixed line

    • Homogeneous Coordinates

    • Composition of Transformations

  • OpenGL and Affine Transformations
    • the pipeline
    • the Current Transformation
    • the stack

REFERENCE(S):

Computer Graphics Using OpenGL (Hill):
     Section 4.1, 4.2, 4.3, 4.4 (p. 132 - 154)
    Appendix A2.3 (pages 707-708)
   

Computer Graphics Using OpenGL (Hill): Chapter 5; 

GLUT Programming Interface: Chapters 11 (Object Rendering)
;   
  

OpenGL Manual/v.1.2:
p. 129-130
OpenGL Manual/v.1.2:  Modeling Transformations, pages 104 - 112;

GLUT Programming Interface:

DEMOS and FILES:

part of the spinning square

/classes/cs3014/files/Viewing/sphericalview.cpp

/classes/cs3014/files/Transformations (everything in this directory)

EXERCISES: CLICK FOR PRINTABLE VERSION OF EXERCISES