13.003 Computational Geometry and Visualization

OpenGL Viewing Pipeline


The viewing pipeline refers to the actions necessary to process the specified geometric primitives and show them on the display device. For 2D geometry this is easy. First, we specify the world coordinate window, a region of the 2D plane in which we have defined the geometry. Next, we define the viewport, the region of the 2D display screen onto which the world window is mapped. This mapping is potentially comprised of a translation and a scaling.

For 3D geometry, the viewing pipeline is more complicated and is best explained using the analogy of a camera. We start with an object and a camera, each of which can move freely in 3D space. We want to fix the relative positions of the camera and object so that the camera is looking at the object. The camera then performs a projection, converting the 3D object into a 2D image.

OpenGL provides functions that perform each of these operations.

Mathematically, the transformations are performed by considering each vertex of the geometric primitive as a vector and multiplying it by a matrix that performs the specific transformation.

Note that although the modeling and viewing transformations can be considered logically separate operations, OpenGL concatenates all of the modeling and viewing transformations into a single matrix. A separate matrix is provided to perform the projection transformation.


On to "Matrix Manipulation"
Back to "Viewing and modeling transformations"
Back to "Lectures on OpenGL and Computer Graphics"