The Programmer's Interface

Tom Kelliher, CS 320

Jan. 30, 1998

Announcements:

From last time:

  1. Installed GLUT.

  2. Experimented with two OpenGL programs.

Outline:

  1. The programmer's interface.

  2. Pictorial history.

  3. Modeling-Rendering Paradigm.

  4. Graphics architectures.

Assignment:

The Programmer's Interface

An API must allow us to specify:

  1. Objects --- collections of polygons. API primitives:
    1. Points.

    2. Line segments.

    3. Polygon outlines.

    4. Filled polygons.

    5. Curved surfaces (not supported by all APIs).

      OpenGL example:

      glBegin(GL_POLYGON);
         glVertex3f(0.0, 0.0, 0.0);
         glVertex3f(0.0, 1.0, 0.0);
         glVertex3f(0.0, 0.0, 1.0);
      glEnd();
      
      specifies a triangle.

      Adding additional vertices allows arbitrary polygons.

      Other type parameters: GL_LINE_STRIP, GL_POINTS .

  2. The viewer --- through the synthetic camera:
    1. Position.

    2. Orientation.

    3. Focal Length.

    4. Size of film (projection) plane.

  3. Light sources:
    1. Location.

    2. Direction.

    3. Strength.

    4. Color.

  4. Material properties --- transparency, etc.

All must be supported by the API.

A Pictorial History of Graphics

Refer to Plates 25 through 36 in the text:

  1. Wireframe images. Complex 3-D objects.

  2. Hidden surface removal.

  3. Flat shading. Lost 3-D. No light source.

  4. Constant shading. Found 3-D. Light source. Still see the polygons.

  5. Smooth shading. Polygons less obtrusive.

  6. Curved surfaces. Polygons gone.

  7. Multiple light sources.

  8. Texture mapping.

With graphics accelerators, the more sophisticated renderings are ``free.''

Modeling-Rendering Paradigm

Alternative to synthetic camera.

Modeler, interface file, renderer.

  1. Modeler:
    1. Concerned with design and placement of objects.

    2. Highly interactive process.

    3. Possibly more than one modeler, tailored to each application.

  2. Interface file:
    1. Output from modeler, input to renderer.

    2. Basic description of scene.

  3. Renderer:
    1. Adds lighting, viewer perspective, material properties (additional components of interface file).

    2. Computationally intensive.

    3. PIXAR's Renderman.

Graphics Architectures

Early Systems

Host, DA converter, CRT.

Display Processors

Host, display processor and display list, CRT.

  1. Separate processor.

  2. Host sends primitives along, stored in display list.

  3. Display processor deals with refresh, re-generation.

Graphics Pipelines

Consider a pipeline for computing large numbers of .

Properties of pipelines:

  1. Depth --- latency.

  2. Throughput.

Steps in a graphics pipeline:

  1. Transformation --- between series of coordinate systems. Matrix multiplications.

  2. Clipping --- cut scene down to field of view. Example: Excel.

  3. Projection --- Project 3-D objects into 2-D. Matrix multiplication.

  4. Rasterization --- Convert 2-D primitives to pixels.



Thomas P. Kelliher
Thu Jan 29 08:36:58 EST 1998
Tom Kelliher