1 of 54

Unit-1�Computer Graphics and Hardware

PREPARED BY: SUSHANT BHATTARAI

WWW.NOTEDINSIGHTS.COM

2 of 54

Introduction

  • It isn’t an easy task to draw a picture, especially in a computer screen.
  • For this purpose computer graphics is used which significantly decreases the burden of drawing a picture in a computer screen.
  • So we can define computer graphics as, “The creation of pictures with the help of a computer. The end product of the computer graphics is a picture it may be a business graph, drawing, and engineering.”

2

3 of 54

Application Area of Computer Graphics

  • User Interface
    • Most applications have user interfaces that rely on desktop windows systems to manage multiple simultaneous activities , and on point-and click facilities to allow users to select menu items, icons and objects on the screen. These activities fall under computer graphics. Typing is necessary only to input text to be stored and manipulated. For example, Word processing, spreadsheet, and desktop-publishing programs are the typical examples where user-interface techniques are implemented.
  • Plotting
    • Plotting 2D and 3D graphs of mathematical, physical, and economic functions use computer graphics extensively. The histograms, bar, and pie charts; the task-scheduling charts are the most commonly used plotting. These all are used to present meaningfully and concisely the trends and patterns of complex data.

3

4 of 54

Application Area of Computer Graphics

  • Office automation and electronic publishing
    • Computer graphics has facilitated the office automation and electronic publishing which is also popularly known as desktop publishing, giving more power to the organizations to print the meaningful materials in-house. Office automation and electronic publishing can produce both traditional printed (Hardcopy) documents and electronic(softcopy) documents that contain text, tables, graphs, and other forms of drawn or scanned-in graphics.
  • Computer Aided Drafting and Design
    • One of the major uses of computer graphics is to design components and systems of mechanical, electrical, electrochemical, and electronic devices, including structures such as buildings, automobile bodies, airplane and ship hulls, very large scale integrated (VLSI) chips, optical systems,. and telephone and computer networks. These designs are more frequently used to test the structural, electrical, and thermal properties of the systems.

4

5 of 54

Application Area of Computer Graphics

  • Scientific and business Visualization
    • Generating computer graphics for scientific, engineering, and medical data sets is termed as scientific visualization whereas business visualization is related with the non scientific data sets such as those obtained in economics. Visualization makes easier to understand the trends and patterns inherent in the huge amount of data sets. It would , otherwise , be almost impossible to analyze those data numerically.
  • Simulation and modeling
    • Simulation helps to learn or to feel the conditions one might have to face in near future without being in danger at the beginning of the course. For example, astronauts can exercise the feeling of weightlessness in a simulator; similarly a pilot training can be conducted in flight simulator. The military tank simulator, the naval simulator, driving simulator, air traffic control simulator, heavy-duty vehicle simulator, and so on are some of the mostly used simulator in practice. Simulators are also used to optimize the system, for example the vehicle, observing the reactions of the driver during the operation of the simulator.

5

6 of 54

Application Area of Computer Graphics

  • Entertainment
  • Disney movies such as Lion Kings and The Beauty of Beast, and other scientific movies like Jurassic Park, The lost world etc are the best example of the application of computer graphics in the field of entertainment. Instead of drawing all necessary frames with slightly changing scenes for the production of cartoon-film, only the key frames are sufficient for such cartoon-film where the in between frames are interpolated by the graphics system dramatically decreasing the cost of production while maintaining the quality. Computer and video games such FIFA,Doom ,Pools are few to name where graphics is used extensively

6

7 of 54

Application Area of Computer Graphics

  • Art and commerce
    • Here computer graphics is used to produce pictures that express a message and attract attention such as a new model of a car moving along the ring of the Saturn . These pictures are frequently seen at transportation terminals supermarkets , hotels etc. The slide production for commercial , scientific, or educational presentations is another cost effective use of computer graphics. One of such graphics packages is a PowerPoint.
  • Cartography
    • Cartography is a subject , which deals with the making of maps and charts. Computer graphics is used to produce both accurate and schematic representations of geographical and other natural phenomena from measurement data. Examples include geographic maps , oceanographic charts, weather maps, contour maps and population-density maps. Surfer is one of such graphics packages , which is extensively used for cartography.

7

8 of 54

Input Devices

  • Input devices allow users and other applications to input data into the computer, for processing.
  • The data input to a computer can be in the form of text, audio, video, etc. users working in an office.
  • The data is entered manually by the user or with minimal user intervention.
  • Input devices are classified as follows
  • Human data entry devices
    • Keyboard
    • Pointing devices—mouse, trackball, joystick, digitizing tablet
    • Pick devices—light pen, touch screen
  • Source data entry devices
    • Audio input—speech recognition
    • Video input—digital camera
    • Scanner—hand-held scanner, flat-bed scanner
    • Optical Scanner—OCR, OMR, MICR, barcode reader

8

9 of 54

Human Data Entry Device-Keyboard

  • Keyboard is a common input device. It is provided along with the computer, and is easy to use.
  • It is used for entering the text data. For inputting the data, the user types the data using the keyboard.
  • When the data is being typed, the display monitor displays the typed data.
  • Cursor is a vertical line, an underscore, blinking line, etc. Cursor moves with each typed character.
  • The position of cursor indicates the location on monitor where the typed-in character will be displayed.

9

10 of 54

Keyboard

  • The design of a keyboard is similar to a standard typewriter. The modern keyboards are QWERTY keyboard (Q, W, E, R, T, Y are the sequence of keys in top row of letters).
  • Standard keyboard contains 101 keys which are arranged in the same order as a typewriter. The keyboard has five sections (1) Typing keys (1, 2, 3…, A, B, C…), (2) Numeric keypad (numeric keys on right side), (3) Function keys (F1, F2…. on top side), (4) Control keys (cursor keys, ctrl, alt.…), and (5) Special-purpose keys (Enter, shift, spacebar…).
  • Some keyboards have 110 keys, where the extra keys are designed to work with the Windows operating system.

10

11 of 54

Keyboard

  • When a key is pressed, keyboard interacts with a keyboard controller and keyboard buffer.
  • The keyboard controller stores the code of pressed key in keyboard buffer and informs the computer software that an action has happened on the keyboard.
  • The computer software checks and reads the keyboard buffer and passes the code of pressed character to the system software.
  • Due to a time gap between pressing of a key on keyboard and reading by the system software, keyboard buffer is designed to store many keystrokes together.

11

12 of 54

Pointing Device

  • Pointing devices are used for providing the input to computer by moving the device to point to a location on computer monitor.
  • The input data is not typed; instead, the data is entered by moving the pointing device.
  • The cursor on the computer monitor moves with the moving pointing device.
  • Operations like move, click and drag can be performed using the pointing devices.
  • Mouse, trackball, joystick and digitizing tablet are some of the common pointing devices.

12

13 of 54

Mouse

  • It is the most common pointing input device. The data is entered by pointing the mouse to a location on the computer screen.
  • The mouse may also be used to position the cursor on screen, move an object by dragging, or select an object by clicking.
  • The key benefit of using a mouse is that the cursor moves with the mouse. So, the cursor can be positioned at any location on the screen by simply moving the mouse.
  • It provides an easy way to select and choose commands from menus, dialog boxes, icons, etc.
  • Mouse is used extensively, while working with graphics elements such as line, curve, shapes, et

13

14 of 54

Mouse

  • Mouse is a small hand-held device having two or three buttons on its upper side.
  • In addition to the buttons, mouse also has a small wheel between the buttons.
  • The wheel of the mouse is used for the up and down movement, for example, scrolling a long document. A mouse is classified as physical mouse or optical mouse.
  • Physical Mouse
    • It has a rubber ball on the bottom side that protrudes when the mouse is moved.
    • It requires a smooth, dust free surface, such as a mouse pad, on which it is rolled.
  • Optical Mouse
    • It uses a Light Emitting Diode (LED) and a sensor to detect the movement of mouse.
    • Optical mouse requires an opaque flat surface underneath it.
    • Optical mouse was introduced by Microsoft in 1999.
    • Optical mouse is better than physical mouse as there is no moving part that can cause wear and tear, and dirt cannot get inside it.

14

15 of 54

Mouse

  • In a physical mouse, rollers and sensors are used to sense the direction and rate of movement of mouse.
  • When the ball of mouse moves, the rollers sense the horizontal and vertical movement and sensors sense the speed of movement.
  • This information is passed to computer via the mouse chord. When an optical mouse is moved, a beam of light is reflected from its underside.
  • These pulses of light determine the direction and rate of movement. This information is sent to computer via the mouse chord

15

16 of 54

Trackball

  • Trackball is a device that is a variant of the mouse but has the functionality of mouse.
  • It is easy to use and takes less space than a mouse. Trackball is generally built in laptops since there is no space for the mouse to move on the lap.
  • Trackballs come in various sizes small and big.
  • Trackball looks like an upside-down mouse. Instead of moving the whole device to move the cursor on computer screen, trackball requires the ball to be rotated manually with a finger.
  • The trackball device remains stationary.
  • The cursor on the computer screen moves in the direction in which the ball is moved.
  • The buttons on trackball are used in the same way as mouse buttons.

16

17 of 54

Digitizing Tablet

  • It is an input device used primarily to input drawings, sketches, etc.
  • Digitizing tablet is used for Computer Aided Design (CAD) for the design of buildings, automotive designs, and designing of maps, etc.
  • Digitizing tablet consists of two parts electronic tablet and pen.
  • The electronic tablet is a flat bed tablet. The pen looks like a ball pen but has an electronic head.
  • The pen in moved on the tablet. Each position on the tablet corresponds to a fixed position on the screen.
  • Drawings can be made on the tablet using a pen, and is provided as input to computer, where, a location on the tablet corresponds to a specific location on the screen.
  • The tablet contains circuit that can detect the movement of pen on the tablet, convert the movements into digital signals and send the digital signal to the computer.

17

18 of 54

Pick Devices

  • Pick devices are used for providing input to the computer by pointing to a location on the computer monitor.
  • The input data is not typed, the data is entered by pointing the pick device directly on the computer screen.
  • Light pen and touch screen are some common pick devices.

18

19 of 54

Light Pen�

  • It is a light sensitive pen-like input device and is used to select objects directly on the computer screen.
  • It is used for making drawing, graphics and for menu selection.
  • Figures and drawings can be made by moving the pen on computer screen.
  • The pen contains a photocell in a small tube.
  • When the pen is moved on the screen, light from the screen at the location of pen causes the photocell to respond.
  • The electric response is transmitted to the computer that can identify the position on screen at which the light pen is pointing.

19

20 of 54

Touchscreen

  • It is an input device that accepts input when the user places a fingertip on the computer screen.
  • The computer selects the option from the menu of screen to which the finger points.
  • Touch screen are generally used in applications like Automated Teller Machine (ATM), public information computers like hospitals, airline reservation, railway reservation, supermarkets, etc.
  • Touch screen consists of a clear glass panel that is placed over the view area of computer screen.
  • In addition to the glass panel with sensors, it has a device driver, and a controller that translates the information captured by the glass panel sensors to a form that the computer can understand.

20

21 of 54

Touchscreen

  • Touch screens have an infrared beam that criss-cross the surface of screen.
  • When a fingertip is touched on the screen, the beam is broken, and the location is recorded.
  • Some touch screens have ultrasonic acoustic waves that cross the surface of screen.
  • When a fingertip is touched on the screen, the wave is interrupted, and the location is recorded.
  • The recorded location is sent to the computer via the controller of touch screen, in a form that the computer can understand.

21

22 of 54

Optical Input Device

  • Optical input devices allow computers to use light as a source of input.
  • Scanner is an example of optical input device.
  • Other common optical input devices are magnetic ink character reader used for Magnetic Ink Character Recognition (MICR), optical mark reader used for Optical Mark Recognition (OMR), optical character reader for Optical Character Recognition (OCR) and Barcode Reader.

22

23 of 54

OCR(Optical Character Recognition)

  • OCR is a technique for the scanning of a printed page, translating it, and then using the OCR software to recognize the image as ASCII text that is editable.
  • OCR uses optical character reader for recognition. The optical character reader stores the scanned image as bitmap image which is a grid of dots.
  • We cannot edit the text that has been scanned. To edit the scanned text, you need OCR software.
  • The OCR software translates the array of dots into text that the computer can interpret as words and letters.
  • To recognize the words and letters of text, the OCR software compares the pattern on the scanned image with the patterns stored inside the computer. The text files generated via OCR can be stored in different formats.

23

Fig:OCR system

24 of 54

Optical Mark Recognition(OMR)

  • OMR is used to detect marks on a paper. The marks are recognized by their darkness. OMR uses an optical mark reader to read the marks.
  • The OMR reader scans the forms, detects the mark that is positioned correctly on the paper and is darker than the surrounding paper, and passes this information to the computer for processing by application software.
  • For this, it uses a beam of light that is reflected on the paper with marks, to capture presence and absence of marks.
  • The optical mark reader detects the presence of mark by measuring the reflected light.
  • The pattern of marks is interpreted and stored in the computer.
  • OMR is widely used to read answers of objective type tests, where the student marks an answer by darkening a particular circle using a pencil. OMR is also used to read forms, questionnaires, order forms, etc.

24

25 of 54

OMR

25

26 of 54

Barcode Reader

  • Barcodes are adjacent vertical lines of different width that are machine readable. Goods available at supermarkets, books, etc. use barcode for identification.
  • Barcodes are read using reflective light by barcode readers.
  • This information is input to the computer which interprets the code using the spacing and thickness of bars.
  • Hand-held barcode readers are generally used in departmental stores to read the labels, and in libraries to read labels on books.
  • Barcode readers are fast and accurate. They enable faster service to the customer and are also used to determine the items being sold, number of each item sold or to retrieve the price of item.

26

27 of 54

Output Devices

  • Output devices provide output to the user, which is generated after processing the input data.
  • The processed data, presented to the user via the output devices could be text, graphics, audio or video.
  • The output could be on a paper or on a film in a tangible form, or, in an intangible form as audio, video and electronic form. Output devices are classified as follows:
  • Hard Copy Devices
    • Printer
    • Plotter
    • Computer Output on Microfilm (microfiche)
  • Soft Copy Devices
    • Monitor
    • Visual Display Terminal
    • Video Output
    • Audio Response

27

28 of 54

Hard Copy Devices

  • The output obtained in a tangible form on a paper or any surface is called hard copy output.
  • The hard copy can be stored permanently and is portable. The hard copy output can be read or used without a computer.
  • The devices that generate hard copy output are called hard copy devices.
  • Printer, plotter and microfiche are common hard copy output devices.

28

29 of 54

Printer

  • A printer prints the output information from the computer onto a paper.
  • Printers are generally used to print textual information, but nowadays printers also print graphical information.
  • The print quality (sharpness and clarity of print) of the printer is determined by the resolution of the printer. Resolution is measured in dots per inch (dpi).
  • Printers with a high resolution (more dpi) provide better quality output. Different kinds of printers are available for different types of applications.
  • Printers are classified into two categories
    • Impact Printer
    • Non-Impact Printer

29

30 of 54

Impact Printer

  • Impact printers use the typewriter approach of physically striking a typeface against the paper and inked ribbon.
  • Impact printers can print a character or an entire line at a time.
  • Impact printers are low-cost printers useful for bulk printing.
  • Dot matrix printers, daisy wheel printers and drum printers are examples of impact printers.
  • Sound produced by an impact printer: https://www.youtube.com/watch?v=tEJYNtI2ul4

30

31 of 54

Dot-matrix Printer

  • Dot Matrix Printers print one character at a time.
  • The speed of dot matrix printer lies between 200 and 600 characters per second (cps) and their resolution ranges from 72 to 360 dpi(dots per inch).
  • Dot matrix printers normally come in two sizes—80 column printer and 132 column printer.
  • Dot matrix printers can print alphanumeric characters, special characters, charts and graphs.
  • They can print only in black and white. Some dot matrix printers can print in both directions - left to right and right to left.
  • Dot matrix printers are commonly used for printing in applications like payroll and accounting.

31

32 of 54

Daisy Wheel Printer

  • Daisy Wheel Printers print one character at a time.
  • They produce letter quality document which is better than a document printed by a dot matrix printer.
  • The speed of daisy wheel printers is about 100 cps.
  • The print head of the printer is like a daisy flower, hence the name.
  • These printers are slow, can only print text (not graphics), and are costly in comparison to dot matrix printers.
  • Daisy wheel printers are used where high quality printing is needed and no graphics is needed.

32

33 of 54

Daisy Wheel Printer

33

34 of 54

Drum Printer

  • Drum Printers are line printers.
  • They are expensive and faster than character printers but produce a low quality output. They can print 200–2500 lines per minute.
  • Drum printers are generally used for voluminous print outputs.

34

35 of 54

Non-impact Printer

  • Non-Impact Printers do not hit or impact a ribbon to print. They use electro-static chemicals and ink-jet technologies.
  • Non-impact printers are faster and quieter than impact printers.
  • They produce high quality output and can be used for printing text and graphics both in black and white, and color.
  • Ink-jet printers and laser printers are non-impact printers.

35

36 of 54

Ink-jet Printer

  • Ink-jet Printers spray ink drops directly on the paper like a jet.
  • Their resolution is more than 500 dpi.
  • They produce high quality graphics and text.
  • Ink-jet printers are commonly found in homes and offices.

36

37 of 54

Laser Printer

  • Laser Printers provide highest quality of text and graphics printing.
  • Laser printers process and store the entire page before printing and are also known as page printers.
  • The laser printer can print 5–24 pages of text per minute and their resolution ranges from 400 to 1200 dpi.
  • They are faster and expensive than impact printers.
  • Laser printers are used in applications requiring high quality voluminous printing.

37

38 of 54

Plotter

  • A plotter is used for vector graphics output to draw graphs, maps, blueprints of ships, buildings, etc.
  • Plotters use pens of different colors (cyan, magenta, yellow and black) for drawing.
  • Plotters draw continuous and accurate lines, in contrast to printers where a line is drawn as closely spaced dots.
  • Plotter is a slow output device and is expensive.
  • Plotters are of two kinds—drum plotter and flatbed plotter.
  • Plotters are mainly used for drawings in AUTOCAD (computer assisted drafting), Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM) applications.

38

39 of 54

Soft Copy output devices

  • The output obtained in an intangible form on a visual display, audio unit or video unit is called soft copy output.
  • The soft copy allows corrections to be made, can be stored, and, can be sent via E– to other users. The soft copy output requires a computer to be read or used.
  • The devices that generate soft copy output are called soft copy devices.
  • Visual output devices like computer monitor, visual display terminal, video system and audio response system are common soft copy output devices.

39

40 of 54

Monitor

  • Monitor is a common output device. The monitor is provided along with the computer, to view the displayed output.
  • A monitor is of two kinds - monochrome display monitor and color display monitor.
  • A monochrome display monitor uses only one color to display text and color display monitor can display 256 colors at one time.
  • The number of colors displayed by a color monitor varies with the kind of color adapter attached to it—CGA, EGA, VGA, XGA and SVGA.
  • Monitors are available in various sizes like 14, 15, 17, 19 and 21 inches.

40

41 of 54

Monitor

  • An image on the monitor is created by a configuration of dots, also known as pixels. The clarity of image on the computer screen depends on three factors
  • Resolution of Screen:-the number of pixels in horizontal and vertical direction. More the number of pixels, the sharper is the image. The common resolution of computer screen is 800x600 and 1024x768
  • Dot Pitch:-the diagonal distance between two colored pixels on a display screen, and
  • Refresh Rate:-the number of times per second the pixels are recharged so that their glow remains bright.

41

Fig: LED monitor

Fig: CRT monitor

42 of 54

Raster scan display system

  • In raster scan system, the electron beam is swept across the screen, one row at a time from top to bottom. As electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots.
  • Picture definition is stored in memory called frame buffer or refresh buffer. This memory holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the frame buffer and painted on the screen one row at a time.
  • Returning of electron beam from right end to left end after refreshing each scan line is called horizontal retrace.
  • At the end of each frame, the electron beam returns to the top left corner to begin next frame called vertical retrace.

42

43 of 54

Raster scan display system

43

44 of 54

44

45 of 54

45

46 of 54

Raster scan display system

  • Refresh Procedure

  • Interlaced vs. non-interlaced scan

  • In interlaced scan, each frame is displayed in two passes. First pass for odd scan lines and another for even ones.

  • In non-interlaced refresh procedure, electron beam sweeps over entire scan lines in a frame from top to bottom in one pass. 

46

47 of 54

Raster scan display system

47

48 of 54

Architecture of Raster scan display system

48

49 of 54

Architecture of Raster scan display system

  • There is a special purpose processor called video controller or display controller, is used to control the operation of the display device.
  • When a particular command is called by the application program, the graphics subroutine package sets the appropriate pixels in the frame buffer. The video controller then cycles through the frame buffer, one scan line at a time. It will bring a value of each pixel contained in the frame buffer and uses it to control the intensity of the CRT electron beam.
  • The display processor is a separate processor that performs graphics function such as scan conversion and raster operation.
  • System memory holds data and those program that execute on the CPU.
  • The display processor memory holds data plus program that perform scan conversion and raster operation.

49

50 of 54

Random Scan Display System

  • In random scan system, the electron beam is directed only to the part of screen where the picture is to be drawn. It draws a picture one line at a time, so it is also called vector display.
  • Picture definition is stored as a set of line drawing commands in an area of memory called refresh display file.
  • To display a picture, the system cycles through the set of commands in the display file.
  • After all commands are processed, the system cycle backs to the first line command in the list.

50

51 of 54

Random Scan Display System

51

52 of 54

Random Scan Display System

  • The refresh rate of vector display depends upon the no of lines to be displayed for any image. Picture definition is stored as a set of line drawing instructions in an area of memory called the refresh display file (Display list or display file)
  • To display a picture, the system cycles through the set of commands (line drawing) in the display file. After all commands have been processed, the system cycles back to the first line command in the list.
  • Random scan systems are designed for drawing all component lines 30 to60 times per second. Such systems are designed for line-drawing applications and can not display realistic shaded scenes. Since CRT beam directly follows the line path, the vector display system produce smooth line.

52

53 of 54

Architecture of Random Scan Display System

53

54 of 54

Architecture of Random Scan Display System

  • The graphics command in the application program are translated by the graphics package into a display list (display file) stored in system memory. The display list is accessed by the display processor to refresh the screen. The display processor cycles through each command in the display list once during each refresh cycle.
  • Graphics are drawn on a vector display system by directing the electron beam along component lines of the picture.

54