Page 29 - Computer Graphics Handout
P. 29

We use this approach extensively, starting in Chapter 4. Having many parameters to adjust, however, can also make it difficult to
          get a desired image. Part of the problem lies with the synthetic-camera model. Classical viewing techniques, such as are used in
          architecture, stress the relationship between the object and the viewer, rather than the independence that the synthetic-camera
          model  emphasizes.  Thus,  the  classical  two-point  perspective  of  a  cube  in  Figure  1.33  is  a  two-point  perspective  because  of  a
          particular relationship between the viewer and the planes of the cube (see Exercise 1.7). Although the OpenGL API allows us to set
          transformations with complete freedom, it also provides helpful extra functions. For
          example, consider the two function calls













          LookAt(cop, at, up);
          Perspective(field_of_view, aspect_ratio, near, far);
          The first function call points the camera from the center of projection toward a desired point (the at point), with a specified up
          direction for the camera. The second selects a lens for a perspective view (the field of view) and howmuch of the world that the
          camera should image (the aspect ratio and the near and far distances). However, none of the APIs built on the synthetic-camera
          model provide functions for directly specifying a desired relationship between the camera and an object.
          Light sources are defined by their location, strength, color, and directionality. APIs provide a set of functions to specify these
          parameters for each source. Material properties are characteristics, or attributes, of the objects, and such properties are specified
          through a series of function calls at the time that each object is defined.


                                                              29
   24   25   26   27   28   29   30   31   32   33   34