Vous êtes sur la page 1sur 13

MC0072-Unit-01-Introduction to Computer Graphics

Unit-01-Introduction to Computer Graphics Structure: 1.1 Introduction Objectives 1.2 Image Processing as Picture Analysis 1.3 The advantages of Interactive Graphics Self Assessment Questions 1.4 Representative Uses of Computer Graphics Self Assessment Questions 1.5 Classification of Applications 1.6 Development of Hardware and Software for Computer Graphics 1.6.1 Output Technology Architecture of a Vector Display Architecture of a Raster Display Direct-view storage tubes 1.6.2 Input Technology 1.6.3 Software Technology Self Assessment Questions 1.7 Conceptual Framework for Interactive Graphics Self Assessment Questions 1.8 Summary

1.9 Terminal Questions 1.1 Introduction The computer is an information processing machine. It is a tool for storing, manipulating and correlating data. There are many ways to communicate the processed information to the user. The computer graphics is one of the most effective and commonly used way to communicate the processed information to the user. It displays the information in the form of graphics objects such as pictures, charts, graphs and diagrams instead of simple text. Thus we can say that computer graphics makes it possible to express data in pictorial form. In computer graphics, pictures or graphics objects are presented as a collection of discrete picture elements called pixels. The pixel is the smallest addressable screen element. It is the smallest piece of the display screen which we can control. The control is achieved by setting the intensity and color of the pixel which compose the screen. Each pixel on the graphics display does not represent mathematical point. Rather, it represents a region which theoretically can contain an infinite number of points. For example, if we want to display point P1 whose coordinates are (4.2, 3.8) and point P2 whose coordinates are (4.8, 3.1) then P1 and P2 are represented by only pixel (4,3), as shown in the Fig. 1.1. In general, a point is represented by the integer part of x and integer part of y, i.e., pixel (int (x), int (y)).

Fig. 1.1: Pixel display area of 6 x 5 The special procedures determine which pixel will provide the best approximation to the desired picture or graphics object. The process of determining the appropriate pixels for representing picture or graphics object is known as rasterization, and the process of representing continuous picture or graphics object as a collection of discrete pixels is called scan conversion. The computer graphics allows rotation, translation, scaling and performing various projection on the picture before displaying it. It also allows to add effects such as hidden surface removal, shading or transparency to the picture before final representation. It provides user the control to modify contents, structure, and appearance of pictures or graphics objects using input devices such as a keyboard, mouse, or touch-sensitive panel on the screen. There is a close relationship between the input devices and display devices. Therefore, graphics devices includes both input devices and display devices.

Objectives : At the end of this unit, you will be able to understand the

Image Processing as Picture Analysis The advantages of Interactive Graphics Representative Uses of Computer Graphics Classification of Applications Development of Hardware and Software for Computer Graphics

1.2 Image Processing as Picture Analysis The computer graphics is a collection, contribution and representation of real or imaginary objects from their computer-based models. Thus we can say that computer graphics concerns the pictorial synthesis of real or imaginary objects. However, the related field image processing or sometimes called picture analysis concerns the analysis of scenes, or the reconstruction of models of 2D or 3D objects from their picture. This is exactly the reverse process. The image processing can be classified as Image enhancement Pattern detection and recognition Scene analysis and computer vision The image enhancement deals with the improvement in the image quality by eliminating noise or by increasing image contrast. Pattern detection and recognition deal with the detection and clarification of standard patterns and finding deviations from these patterns. The optical character recognition (OCR) technology is an practical example of pattern detection and recognition. Scene analysis and computer vision deals with the recognition and construction of 3D model of scene from several 2 D images. The above three fields of image processing proved their importance in many area such as finger print detection and recognition, modeling of building, ships, automobiles etc. , and so on. We have discussed the two fields: computer graphics and image processing of computer processing of picture. In the initial stages they were quite separate disciplines. But now a days they use some common features, and overlap between them is growing. They both uses raster displays. 1.3 The advantages of Interactive Graphics Let us discuss the advantages of interactive graphics. Today, a high quality graphics display of personal computer provide one of the most natural means of communication with a computer.

It provides tools for producing pictures not only of concrete, real-world objects but also of abstract, synthetic objects, such as mathematical surfaces in 4D and of data that have no inherent geometry, such as survey results. It has an ability to show moving pictures, and thus it is possible to produce animations with interactive graphics. With interactive graphics use can also control the animation by adjusting the speed, the portion of the total scene in view, the geometric relationship of the objects in the scene to one another, the amount of detail shown and so on. The interactive graphics provides tool called motion dynamics. With this tools user can move and tumble objects with respect to a stationary observer, or he can make objects stationary and the viewer moving around them. A typical example is walk throughs made by builder to show flat interior and building surroundings. In many case it is also possible to move both objects and viewer. The interactive graphics also provides facility called update dynamics. With update dynamics it is possible to change the shape, colour or other properties of the objects being viewed. With the recent development of digital signal processing (DSP) and audio synthesis chip the interactive graphics can now provide audio feedback along with the graphical feedbacks to make the simulated environment even more realistic. In short, interactive graphics permits extensive, high-bandwidth user-computer interaction. It significantly enhances the ability to understand information, to perceive trends and to visualize real or imaginary objects either moving or stationary in a realistic environment. It also makes it possible to get high quality and more precise results and products with lower analysis and design cost. Self Assessment Questions: 1. State the classification of image processing. 2. Write the advantages of interactive graphics. 1.4 Representative Uses of Computer Graphics The use of computer graphics is wide spread. It is used in various areas such as industry, business, government organizations, education, entertainment and most recently the home. Let us discuss the representative uses of computer graphics in brief. User Interfaces: User friendliness is one of the main factors underlying the success and popularity of any system. It is now well established fact that graphical interfaces provide and attractive and easy interaction between users and computers. The built-in graphics provided with user interfaces use visual control items such as buttons, menus, icons, scroll bar etc, which

allows user to interact with computer only by mouse-click. Typing is necessary only to input text to be stored and manipulated. Plotting of graphics and chart: In industry, business, government and educational organizations, computer graphics is most commonly used to create 2D and 3D graphs of mathematical, physical and economic functions in form of histograms, bars and pie-charts. These graphs and charts are very useful for decision making. Office automation and Desktop Publishing: The desktop publishing on personal computers allow the use of graphics for the creation and dissemination of information. Many organizations does the in-house creation and printing of documents. The desktop publishing allows user to create documents which contains text, tables, graphs and other forms of drawn or scanned images or pictures. This is one approach towards the office automation. Computer-aided Drafting and Design: The computer-aided drafting uses graphics to design components and systems electrical, mechanical, electromechanical and electronic devices such as automobile bodies, structures of building, airplane, ships, very large-scale integrated (VLSI) chips, optical systems and computer networks. Simulation and Animation: Use of graphics in simulation makes mathematical models and mechanical systems more realistic and easy to study. The interactive graphics supported by animation software proved their use in production of animated movies and cartoons films. Art and Commerce: There is a lot of development in the tools provided by computer graphics. This allows user to create artistic pictures which express messages and attract attentions. Such pictures are very useful in advertising. Process Control: By the use of computer now it is possible to control various processes in the industry from a remote control room. In such cases, process systems and processing parameters are shown on the computer with graphic symbols and identifications. This makes it easy for operator to monitor and control various processing parameters at a time. Cartography: Computer graphics is also used to represent geographic maps, weather maps, oceanographic charts, contour maps, population density maps and so on. Self Assessment Questions: 1. Discuss the representative uses of computer graphics in various applications. 1.5 Classification of Applications In the last section we have seen various uses of computer graphics. These uses can be classified as shown in the Fig. 1.2. As shown in the Fig. 1.2, the use of computer graphics can be classified according to dimensionality of the object to be drawn: 2D or 3D. It can also be classified according to kind of picture: Symbolic or Realistic. Many computer graphics applications are classified by the type of interaction. The type of interaction determines the users degree of

control over the object and its image. In controllable interaction user can change the attributes of the images. Role of picture gives the another classification. Computer graphics is either used for representation or it can be an end product such as drawings. Pictorial representation gives the final classification to use computer graphics. It classifies the use of computer graphics to represent pictures such as line drawing, black and white, colour and so on.

Fig. 1.2 1.6 Development of Hardware and Software for Computer Graphics The development of hardware of computer graphics involves the development of input and output device technology. Therefore, in all development of computer graphics involves the development in three fields: 1. Output technology 2. Input technology and 3. Software technology 1.6.1 Output Technology Fig. 1.3 shows the historical development in the output technology. In early days of computer the hardcopy devices such as teletype printer and line printer were in use with computer driven CRT displays. In mid fifties command and control CRT display consoles were introduced. The more display devices developed in mid-sixties and in common use until the mid-eighties, are called vector, stroke, line drawing or calligraphic displays. The term vector is used as a synonyms for line; a stroke is a short line, and characters are made of sequence of such strokes.

Fig. 1.3 Architecture of a Vector Display

Fig. 1.4: Vector Scan CRT As shown in Fig. 1.4 vector scan CRT display directly traces out only the desired lines on CRT i.e If we want a line connection point A with point B on the vector graphics display. We simply drive the beam deflection circuitry which will cause beam to go directly from point A to B. If we want to move the beam from point A to point B without showing a line between points, we can blank the beam as we move it. To move the beam across the CRT, the information about both, magnitude and direction is required. This information is generated with the help of vector graphics generator. The fig. 1.5 shows the typical vector display architecture. It consists of display controller, Central Processing Unit (CPU), display buffer memory and a CRT. A display controller is connected as an I/O peripheral to the central processing unit (CPU). The display buffer memory stores the computer produced display list or display program. The program contains point and line plotting commands with (x,y) or (x,y,z) end point coordinates, as well as character plotting commands. The display controller interprets commands for plotting points, lines and characters and sends digital and point coordinates to a vector generator. The vector generator then converts the digital coordinates values to analog voltages for beam-deflection circuits that displace an electron beam writing on the CRTs phosphor coating.

Fig. 1.5: Architecture of a vector display In vector displays beam is deflected from end point to end point, hence this technique is also called random scan. We know as beam, strikes phosphor it emits light. But phosphor light decays after few milliseconds and therefore it is necessary to repeat through the display list to refresh the phosphor at least 30 times per second to avoid flicker. As display buffer is used to store display list and it is used for refreshing, the display buffer memory is also called refresh buffer. Architecture of a Raster Display The fig. 1.6 shows the architecture of a raster display. It consists of display controller, central processing unit (CPU), video controller, refresh buffer, keyboard, mouse and the CRT.

Fig. 1.6: Architecture of a raster display As shown in the Fig. 1.6, the display images stored in the form of 1s and 0s in the refresh buffer. The video controller reads this refresh buffer and produces the actual image on the screen. It does this by scanning one scan line at a time, from top to bottom and then back to the top.

Fig. 1.7: Raster Scan CRT In this method, the horizontal and vertical deflection signals are generated to move the beam all over the screen in a pattern shown in the Fig. 1.7. Here, the beam is swept back forth from left to right across the screen. When the beam is moved from the left to right, it is ON. The beam OFF, when it is moved from right to left as shown by dotted line in Fig. 1.7 When the beam reaches the bottom of the screen, it is made OFF and rapidly retraced back to the top to start again. A display produced in this way is called raster scan display. Raster scanning process is similar to reading different lines on the page of a book. After completion of scanning of one line, the electron beam files back to the start of next line and process repeats. In the raster scan display, the screen images is maintained by repeating scanning the same image. This process is known as refreshing of screen. Vector Scan Display 1. In vector scan display the beam is moved between the end points of the graphics primitives Raster Scan Display 1. In raster scan display the beam is moved all over the screen one scan line at a time, from top to bottom and then back to top. 2. Vector display flickers when 2. In raster display, the refresh process is the number of primitives in the independent of the complexity of the buffer becomes too large. image. 3. Scan conversion is not 3. Graphics primitives are specified in required. terms of their endpoints and must be scan converted into their corresponding pixels in the frame buffer. 4. Scan conversion hardware is 4. Because each primitive must be scan not required. converted, real time dynamics is far more computational and requires separate scan conversion hardware. 5. Vector display draws a 5. Raster display can display continuous and smooth lines mathematically smooth line, polygons and boundaries of curved primitives only by

6. Cost is more. 7. Vector display only draws lines and characters.

approximating them with pixels on the raster grid. 6. Cost is low. 7. Raster display has ability to display areas filled with solid colors or patterns. Direct-view storage tubes In last sixties, the direct-view storage tube (DVST) was introduced in the display technology. The direct-view storage tubes (DVST) give the alternative method of maintaining the screen image. A DVST uses the storage grid which stores the picture information as a charge distribution just behind the phosphor-coated screen. The Fig. 1.8 shows the general arrangement of the DVST. It consists of two electron guns: a primary gun and a flood gun.

Fig. 1.8: Arrangement of DVST A primary gun stores the picture pattern and the flood gun maintains the picture display. A primary gun produces high speed electrons which strike on the storage grid to draw the picture pattern. As electron beam strikes on the storage grid with high speed, it knocks out electrons from the storage grid keeping the positive charge. The knocked out electrons are attracted towards the collector. The net positive charges on the storage grid is nothing but the picture pattern. The continuous low speed electrons from flood gun pass through the control grid and are attracted to the positive charged areas of the storage grid. The low speed electrons then penetrate the storage grid and strike the phosphor coating without affecting the positive charge pattern on the storage grid. During this process the collector just behind the storage grid smooth out the flow of flood electrons. Advantages of DVST 1. Refreshing of CRT is not required. 2. Because no refreshing is required, very complex pictures can be displayed at very high resolution without flicker.

3. It has flat screen. Disadvantages of DVST 1. They do not display colors and are available with single level of line intensity. 2. Erasing requires removal of change on the storage grid. Thus erasing and redrawing process takes several seconds. 3. Selective or part erasing of screen is not possible. 4. Erasing of screen produces unpleasant flash over the entire screen surface which prevents its use of dynamic graphics applications. 5. It has poor contrast as a result of the comparatively low accelerating potential applied to the flood electrons. 6. The performance of DVST is some what inferior to the refresh CRT. In early seventies the inexpensive raster graphics displays were developed. Raster displays store the display primitives (such as lines, characters solid and filled patterns) in a refresh buffer in terms of their corresponding pixels. 1.6.2 Input Technology Input technology has also improved greatly over the years. Number of input devices were developed over the years. These devices are punch cards, light pens, keyboard, tables, mouse and scanners. 1.6.3 Software Technology Like output and input technology there is a lot of development in the software technology. In early days low level software were available. Over the years software technology moved from low level to device dependent and then to device independent packages. The device independent packages are high level packages with can drive a wide variety of display and printer devices. As a need for the device independent package a standardization is made and specification are decided. The first graphics specification to be officially standardized was GKS (the Graphical Kernel System). GKS supports the grouping of logically related primitives such as lines, polygons, and character strings and their attributes in collected form called segments. In 1988, a 3D extension of GKS, became an official standard, as did a much more sophisticated but even more complex graphics system called PHIGS (Programmers Hierarchical Interactive Graphics System). PHIGS, as its name implies, supports nested hierarchical grouping of 3D primitives, called structures. In PHIGS, all primitives are subjected to geometric transformations such as scaling, rotation and translation to accomplish dynamic movement. PHIGS also supports a database of

structures the programmer may edit and modify. PHIGS automatically updates the display whenever the database has been modified. Self Assessment Questions: 1. Explain the architecture of a vector display with neat diagram. 2. Write the advantages and disadvantages of DVST. 1.7 Conceptual Framework for Interactive Graphics The Fig. 1.9 shows the high level conceptual framework for interactive graphics. It consists of input and output devices, graphics system, application program and application model. A computer receives input from input devices, and outputs images to a display device. The input and output devices are called the hardware components of the conceptual framework. There are three software components of conceptual framework. These are: Application Model Application Program and Graphic System

Fig. 1.9: Conceptual frame work for interactive graphics Application Model: The application model captures all the data and objects to be pictured on the screen. It also captures the relationship among the data and objects. These relationships are stored in the database called application database, and referred by the application programs. Application program: It creates the application model and communicates with it to receive and store the data and information of objects attributes. The application program also handles user input. It produces views by sending series of graphics output commands to the graphics system. The application program is also responsible for interaction handling. It does this by event handling loops. Graphics System: It accepts the series of graphics output commands from application program. The output commands contain both a detailed geometric description of what is to be viewed and the attributes describing how the objects should appear. The graphics system is responsible for

actually producing the picture from the detailed descriptions and for passing the users input to the application program for processing. Self Assessment Questions: 1. Discuss the types of software components of conceptual framework for interactive graphics. 1.8 Summary Computer graphics is one of the most exiting and rapidly growing computer field. It is also an extremely effective medium for communication between human beings and computers. It is one of the most effective and commonly used way to communicate the processed information to the user. Mainly this unit deals with the image processing as picture analysis, advantages of interactive graphics, representative uses of computers graphics. Classification of applications and development of hardware and software for computer graphics. 1.9 Terminal Questions 1. Discuss on topic image processing as picture analysis. 2. List the advantages of interactive graphics. 3. Explain the representative uses of computer graphics. 4. Explain the classification of use of computer graphics. 5. Explain the development of hardware and software for computer graphics. 6. Explain the architecture of a vector display. 7. Explain the architecture of a raster display. 8. Give the comparison between vector scan display and raster scan display. 9. Give historical development of output technology. 10. Write a short note on a) Input technology b) Software technology 11. With a neat block diagram explain the conceptual framework of interactive graphics.