Page 26 - Computer Graphics Handout
P. 26

actions. By clicking   on these items, the user guides the software and produces images without having towrite programs. Of course,


































          someone has to develop the code for these applications, and many of us, despite the sophistication of commercial products, still
          have to write our own graphics application programs (and even enjoy doing so).
          The interface between an application program and a graphics system can be specified through a set of functions that resides in a
          graphics library. These specifications are called the application programming interface (API). The application programmer’s model
          of the system is shown in Figure 1.28. The application programmer sees only the API and is thus shielded from the details of both
          the hardware and the software implementation of the graphics library. The software drivers are responsible for interpreting the
          output of the API and converting these data to a form that is understood by the particular hardware. From the perspective of the
          writer of an application program, the functions available through the API should match the conceptual model that the user wishes
          to employ to specify images.

          1.6.1 The Pen-Plotter Model
          Historically, most early graphics systems were two-dimensional systems. The conceptual model that they used is now referred to as
          the pen-plotter model, referencing the output device that was available on these systems. A pen plotter (Figure 1.29) produces
          images by moving a pen held by a gantry, a structure that can move the pen in two orthogonal directions across the paper. The
          plotter can raise and lower the pen as required to create the desired image. Pen plotters are still in use; they are well suited for
          drawing large diagrams, such as blueprints. Various APIs—such as LOGO and PostScript—have their origins in this model. Although
          they differ from one another, they have a common view of the process of creating an image as being similar to the process of
          drawing on a pad of paper. The user works on a two-dimensional surface of some size. She moves a pen around on this surface,
          leaving an image on the paper.















                                                              26
   21   22   23   24   25   26   27   28   29   30   31