4. METHOD OF SOLUTION
TEKLIB uses two coordinate systems, viewport and world, to generate graphic images on the screen. Viewport coordinates refer to an imaginary rectangular grid on the display screen surface. The world coordinate system is a rectangular grid on any x-y plane, defined by the application program. The rectangular portion of the x-y plane specified, termed a "window", is projected onto a rectangular region of the screen, called a "viewport". In addition to 2-D graphics, TEKLIB also provides subroutines for drawing projections of 3-D objects. The application program first defines a point in space to look at the "view point", and the direction and distance from that point to the observer's position. A viewing transformation is performed on each x,y,z point to project it onto a "view plane", a plane perpendicular to the line of sight and passing through the view point. This view plane then becomes the x-y plane of the world window which is mapped into the viewport.