CS-460/560, Week 11-B
Spring, 1998
R. Eckert


3-D GRAPHICS: Displaying images of a real or imagined 3-D scene on a 2-D

Problem # 1: MODELING--

Representing objects in 3-D space (making a model).

First need to represent points ==> use of a 3-D coordinate system:

   Cartesian: (x,y,z)

   Spherical: rho--distance from origin
              theta--aximuthal angle
              phi--polar angle

   Conversion:  x = rho * sin(phi) * cos(theta)
                y = rho * sin(phi) * sin(theta)
                z = rho * cos(phi)

Types of 3-D models--

  1. Boundary Representation (B-Rep)--surface descriptions. Two common

    A. Polygonal. Object surfaces approximated by a mesh of planar
                   Scene -->
                           Objects -->
                                     Polygons -->
                                                Vertices (points)

    B. Bicubic parametric surface patches. Objects represented exactly by
       nets of elements called surface patches. These are polynomials in
       two parametric variables--usually cubic (e.g., Bezier surface
       patches, B-Spline surface patches).

  2. Solid Representation--solid modeling. Objects represented exactly by
  combinations of elementary solid objects such as spheres, cylinders,
  boxes, etc. These are called geometric primitives.

    Constructive Solid Geometry (CSG)--Complex objects are built up by
    combining geometric primitives using boolean set operations (union,
    intersection, difference) and linear transformations. The object is
    stored as a tree--the leaves contain primitives; nodes store set
    operators or transformations.

Problem # 2--RENDERING--

Displaying a view of the model.

  A. Projection--Going from 3-D to 2-D. Every world coordinate point in
  the scene (xw,yw,zw) maps to a point on the device viewing screen
  (xv,yv). Projection rays from each point in the scene which pass
  through the projection plane (viewing screen) and which terminate on a
  point called the "center of projection" are constructed. The intersection
  point of projection ray with the projection plane is the projection
  point (xv,yv). Two basic types of projection:

     1. Parallel projection--The center of projection is at infinity.
     Therefore the projection rays are parallel. Equal-size objects
     at different distances from the screen have the same size on the
     screen. Parallel lines in the scene project to parallel lines on the
     screen. Useful in CAD.

     2. Perspective projection--The center of projection is at a finite
     distance from the screen. An object farther away from the screen
     has a smaller projection on the screen than an equal-sized object
     closer to the screen (i.e., farther objects appear to be smaller)-->
     realistic images. Parallel lines in the scene do not necessarily
     project to parallel lines on the screen.

  B. Hidden surface removal--

     Surfaces facing away from the viewer are invisible to him, and
     should not be displayed (backface culling).

     Surfaces blocked by objects closer to the viewer are invisible and 
     should not be displayed.

  C. Shading--Projections of surfaces should be colored (shaded) with a
  color that depends on the intensity of the light reflected from the
  surface into the eyes of the viewer. Need an illumination/reflection 
  model that takes into account the material properties of surfaces and 
  how light interacts with them.

  D. Other effects--e.g., shadows, transparency, multiple reflections,
  atmospheric absorption, etc.

THE VIEWING PIPELINE--The chain of transformations and operations needed
to go from 3-D models of objects in a scene to an image of the scene on
the viewing screen.

1. Local coordinate space (3-D):
   Individual object descriptions given
                | Modeling Transformations
2. World coordinate space (3-D):
   Scene is composed
   Objects, lights positioned
                | 3-D Viewing Transformation
3. Viewing coodinate space (3-D):
   Eye/camera coordinate system
                | 3-D clipping
                | Backface culling
4. 3-D viewing volume:
   Eye/camera coordinate system
                | Projection Transformation
5. 2-D projection plane description:
   2-D World coordinate system window
                | 2-D Viewing Transformation (window to viewport)
                | 2-D clipping
                | Hidden surface removal
                | Shading
                | Other effects
6. 2-D Device coordinate space:
   2-D Viewport coordinate system window