29,99 €
This book explains the mathematical concepts in computer graphics, ideal for courses in graphics, engineering, game development, and industry professionals. It starts with how images are generated on screens and covers algorithms for creating simple geometry. The book progresses through two-dimensional and three-dimensional transformations, parametric representation of planar and space curves like cubic splines and Bezier curves. It also includes programming in C, OpenGL, and methods for generating 3D models.
The course begins with an introduction to computer graphics and vector representation of geometric entities. It then covers 2D and 3D transformations, parametric representation of curves and surfaces, windowing and clipping, and generating 3D models. The final chapters focus on projections and programming graphics using C and OpenGL.
Understanding these concepts is crucial for mastering computer graphics. This book transitions readers from basic concepts to advanced techniques, blending theoretical knowledge with practical skills. It is an essential resource for mastering the mathematical foundations and programming techniques in computer graphics.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 323
Veröffentlichungsjahr: 2024
MATHEMATICSFORCOMPUTER GRAPHICSANDGAME PROGRAMMING
LICENSE, DISCLAIMER OF LIABILITY, AND LIMITED WARRANTY
By purchasing or using this book (the “Work”), you agree that this license grants permission to use the contents contained herein, but does not give you the right of ownership to any of the textual content in the book or ownership to any of the information or products contained in it. This license does not permit uploading of the Work onto the Internet or on a network (of any kind) without the written consent ofthe Publisher. Duplication or dissemination of any text, code, simulations, images, etc. contained herein is limited to and subject to licensing terms for the respective products, and permission must be obtained from the Publisher or the owner of the content, etc., in order to reproduce or network any portion of the textual material (in any media) that is contained in the Work.
MERCURY LEARNING AND INFORMATION (“MLI” or “the Publisher”) and anyone involved in the creation, writing, production, accompanying algorithms, code, or computer programs (“the software”), and any accompanying Web site or software of the Work, cannot and do not warrant the performance or results that might be obtained by using the contents of the Work. The author, developers, and the Publisher have used their best efforts to insure the accuracy and functionality of the textual material and/or programs contained in this package; we, however, make no warranty of any kind, express or implied, regarding the performance of these contents or programs. The Work is sold “as is” without warranty (except for defective materials used in manufacturing the book or due to faulty workmanship).
The author, developers, and the publisher of any accompanying content, and anyone involved in the composition, production, and manufacturing of this work will not be liable for damages of any kind arising out of the use of (or the inability to use) the algorithms, source code, computer programs, or textual material contained in this publication. This includes, but is not limited to, loss of revenue or profit, or other incidental, physical, or consequential damages arising out of the use of this Work.
The sole remedy in the event of a claim of any kind is expressly limited to replacement of the book, and only at the discretion of the Publisher. The use of “implied warranty” and certain “exclusions” vary from state to state, and might not apply to the purchaser of this product.
MATHEMATICSFORCOMPUTER GRAPHICSANDGAME PROGRAMMING
A Self-Teaching Introduction
D. P. Kothari, PhDG. K. Awari, PhDD. D. Shrimankar, PhDA. R. Bhende, PhD
MERCURY LEARNING AND INFORMATION
Dulles, VirginiaBoston, MassachusettsNew Delhi
Copyright ©2019 by MERCURY LEARNING AND INFORMATION LLC. All rights reserved.ISBN: 978-1-68392-356-5. Reprinted and revised with permission.
Original title and copyright: Computer Graphics in Mathematical Approaches.Copyright ©2017 by New Age International (P) Ltd. Publishers. All rights reserved.ISBN: 978-93-86286-00-0
This publication, portions of it, or any accompanying software may not be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means, media, electronic display or mechanical display, including, but not limited to, photocopy, recording, Internet postings, or scanning, without prior permission in writing from the publisher.
Publisher: David PallaiMERCURY LEARNING AND INFORMATION22841 Quicksilver DriveDulles, VA [email protected]
D. P. Kothari, G. K. Awari, D. D. Shrimankar, A. R. Bhende.Mathematics for Computer Graphics and Game Programming.ISBN: 978-1-68392-356-5
The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. All brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks, etc. is not an attempt to infringe on the property of others.
Library of Congress Control Number: 2018964987
192021321 Printed on acid-free paper in the United States of America.
Our titles are available for adoption, license, or bulk purchase by institutions, corporations, etc. For additional information, please contact the Customer Service Dept. at 800-232-0223(toll free).
All of our titles are available in digital format at authorcloudware.com and other digital vendors. The sole obligation of MERCURY LEARNING AND INFORMATION to the purchaser is to replace the book, based on defective materials or faulty workmanship, but not based on the operation or functionality of the product.
CONTENTS
Preface
Chapter 1 Introduction to Computer Graphics
1.1 Definition of Computer Graphics
1.1.1 Definition of Computer Aided Design (CAD)
1.2 Image Generation on Screen
1.2.1 Working of Cathode Ray Tubes (CRT)
1.2.2 Design of Deflection Mechanism of CRT
1.3 Image Generating Techniques
1.3.1 CRT Based Display Devices
1.3.2 Non-CRT Based Display Devices
1.4 Graphic User Interface (GUI)
1.5 Refresh Rate
1.6 Working of Laser Printers
Exercises
Objective Questions
Answers
Chapter 2 Vector Representation of Geometric Entities
2.0 Introduction
2.1 Line Generation Algorithm Using Equation of Line
2.2 Line Generation Using DDA Algorithm
2.3 Bresenham’s Line Generation Algorithm
2.4 Bresenham’s Midpoint Circle Generation Algorithm
2.5 Bresenham’s Midpoint Ellipse Generation Algorithm
2.6 Arc Generation Algorithm Using Trigonometric Function
Exercises
Objective Questions
Answers
Chapter 3 Two-Dimensional Transformation
3.1 Introduction
3.2 Representation of 2D Geometry
3.3 Types of 2D Transformations
3.3.1 Scaling Transformation
3.3.2 Rotation Transformation
3.3.3 Translation Transformation
3.4 Need of Homogeneous Coordinates
3.5 Special Transformation
3.5.1 Reflection Transformation
3.5.2 Shear Transformation
3.6 Inverse Transformation
Exercises
Objective Questions
Answers
Chapter 4 Three-Dimensional Transformation
4.1 Introduction
4.2 Scaling Transformation
4.3 Translation Transformation
4.4 Rotation Transformation
4.5 Derivation for Rotation About Any Arbitrary Line in 3D Space
4.6 Reflection Transformation
4.7 Reflection About Any Arbitrary Plane in 3D Space
4.8 Shear Transformation
Exercises
Objective Questions
Answers
Chapter 5 Parametric Representation of Planar Curves
5.1 Introduction
5.2 Parametric Representation of a Circle
5.3 Parametric Representation of an Ellipse
5.4 Parametric Representation of a Parabola
5.5 Parametric Representation of a Hyperbola
Exercises
Objective Questions
Answers
Chapter 6 Parametric Representation of Space Curves
6.1 Introduction to Space Curves
6.2 Cubic Spline
6.3 B-Spline
6.4 Bézier Curves
6.5 Non-Uniform Rational B-Splines
6.5.1 Control Point
Exercises
Objective Questions
Answers
Chapter 7 Parametric Representation of Surfaces
7.1 Introduction to Surfaces
7.2 Surface of Revolution
7.3 Sweep Surfaces
7.4 Helical Spring
Exercises
Objective Questions
Answers
Chapter 8 Windowing and Clipping
8.1 Introduction
8.2 Windowing
8.3 Clipping
8.4 Need for Windowing and Clipping
8.5 Viewing Transformation
8.6 2D Clipping
8.7 Cohen-Sutherland Subdivision Line Clipping Algorithm
8.8 Intersection Calculation and Clipping
8.9 Midpoint Subdivision Algorithm
8.10 Advantage of the Midpoint Subdivision Algorithm
8.11 Comparison Between Cohen-Sutherland and Midpoint Subdivision Line Clipping Algorithms
8.12 Polygon Clipping
8.13 Sutherland-Hodgman Algorithm
8.14 3D Clipping
8.15 Multiple Windowing
8.16 Character Clipping
8.17 Applications of Clipping
Exercises
Objective Questions
Answers
Chapter 9 Generation of a 3D Model
9.1 Introduction
9.2 Wireframe Modeling
9.3 Surface Modeling
9.4 Solid Modeling
9.4.1 Primitive Creation Functions
9.4.2 Constructive Solid Geometry
9.4.3 Boundary Representation
9.4.4 Sweeping
9.5 Advantages of Solid Modeling
9.6 Applications of Solid Modeling
9.7 Rendering
9.7.1 Scanline Rendering
9.7.2 Ray Trace Rendering
9.7.3 Radiocity Rendering
Exercises
Objective Questions
Answers
Chapter 10 Projections
10.1 Introduction
10.2 Projections
10.2.1 Perspective Projection
10.2.2 Parallel Projection
10.2.3 Differentials Between Parallel Projection and Perspective Projection
10.3 Solved Problems
Exercises
Objective Questions
Answers
Chapter 11 Graphics Programs in C Language
11.1 Program-1
11.2 Program-2
11.3 Program-3
11.4 Program-4
11.5 Program-5
11.6 Program-6
11.7 Program-7
11.8 Program-8
11.9 Program-9
11.10 Program-10
Chapter 12 OpenGL with Computer Graphics
12.1 Introduction
12.1.1 Graphical Functions of OpenGL
Exercises
Objective Questions
Answers
Chapter 13 Programming Graphics Using OpenGL
13.1 Application of Computer-Generated Images
13.1.1 Computer-Aided Design
13.1.2 Image Processing
13.1.3 Process Monitoring
13.1.4 Entertainment and Publishing
13.1.5 Simulation
13.2 Drawing Figures Using OpenGL
13.2.1 Getting Started With Making Pictures
13.2.2 Device-Independent Programming and OpenGL
13.2.3 Event-Driven Programming
13.2.4 Opening a Window for Drawing
13.2.5 Drawing Basic Graphics Primitives
13.2.6 Data Types and “States” in OpenGL
13.2.7 Establishing a Coordinate System
13.2.8 Making a Line Drawing
13.2.9 Other Graphics Primitives in OpenGL
13.2.10 Simple Interaction with Mouse and Keyboard
13.3 Drawing Tools
13.3.1 World Coordinates, World Windows, and Viewports
13.3.2 Mapping Between Window and Viewport
13.3.3 Line Clipping
13.3.4 Drawing Polygons, Circles, and Arcs Using OpenGL
13.3.5 Drawing Circles and Arcs
13.4 Transformation of Objects
13.4.1 Transformation
13.4.2 Affine Transformation
13.4.3 Drawing 3D Scenes Using OpenGL
13.5 Curve and Surface Design
13.5.1 Description of Curves
13.5.2 Designing Bezier Curves
13.5.3 The B-Spline Basis Function
13.5.4 Interpolation Technique
Summary
Exercises
Objective Questions
Answers
PREFACE
In this world of fierce competition, it is absolutely necessary for technocrats to keep updated and upgraded with ever-changing technology. As engineers, it’s our duty to adapt to these changing scenarios and pay back to society and the nation. This scenario of ever-changing technology has motivated us to write this book and help others keep up with the pace. This book is written keeping in mind the requirements of engineering students and industry professionals.
Features of the Book
Concepts are explained with relevant mathematical derivations
Unsolved examples and multiple choice questions are included at the end of the chapters for practice and self-evaluation
C programs based on various algorithms
Numerous solved examples in each chapter
Computer graphics is an interdisciplinary subject which is used by undergraduate and postgraduate students of mechanical engineering, aeronautical engineering, production engineering, computer science, and information technology. Most of the current titles, however, do not cover the mathematical concepts related to these topics. As a result, students often have difficulty understanding these mathematical concepts and their analytical treatment. This book aims to help readers understand all of the major topics of the subject. It focuses on the mathematical concepts involved in computer graphics and computer aided design currently taught or used in industry.
—The Authors
Chapter 1
INTRODUCTION TO COMPUTER GRAPHICS
1.1 DEFINITION OF COMPUTER GRAPHICS
Computer graphics involves the display, manipulation, and storage of picture and experiential data for proper visualization using a computer. Typical graphics systems comprise a host computer with the support of a fast processor, large memory, frame buffer, and display devices; output devices as color monitors, liquid crystal display, laser printers, plotters, etc.; and input devices (mouse, keyboard, joystick, touch screen, trackball, etc.).
Computer graphics have many applications:
Computer graphics are used in developing the components of a Graphic User Interface (GUI). These GUI components are used to communicate between the software and the user. Examples of GUI components are menus, icons, cursors, dialog boxes, scroll bars, etc.
Computer graphics are used in the corporate sector for representing the sales data and economic data using pi-charts, histogram, graphs, etc.
Office automation software use GUI components for a researcher’s report or thesis.
Computer graphics are used in the publication of books, magazines, journals, etc.
Computer graphics are used in the advertising field to provide graphic features that make advertisements more impactful.
Computer graphics are essential in the entertainment and communication industries worldwide, appearing everwhere from TV monitors to mobile phones.
Computer graphics are vital to simulation—the imitation of real world processes in a model over time, such as aircraft and car racing simulations. Aircraft simulations train budding pilots before they get hands-on experience in real aircraft.
Computer graphics are used in audiovisual teaching aids in education. They improve teaching outcomes in school and help employees develop skills in profession training.
Computer graphics are used in the industry for computer-aided design and computer-aided manufacturing (CAD-CAM).
1.1.1 Definition of Computer Aided Design (CAD)
Computer Aided Design is defined as any use of a computer to assist in the creation, modification, analysis, or optimization of 2-dimensional (2D) and 3-dimensional (3D) designs. Examples of 2D CAD include plan or layout designs, and 3D CAD includes solid and 3D modeling. Some of the common applications of 2D CAD are architectural building plans, layout plans, machine part drawing, electrical circuitry drawing, etc. Animated movies and video games are applications of 3D CAD. Vector representations/ parametric representations of 2D entities (such as lines, circles, conics), 3D entities, and surfaces are used to develop computer based CAD software. CAD is extensively used throughout the engineering process, as shown in Fig. 1.1. Engineering processes begin as early as conceptual design and layout of product to component modeling, assembly modeling, strength and dynamic analysis of assemblies, to definition of manufacturing methods of components. CAD has become especially important within the scope of Computer Aided Technologies. Benefits of CAD include a greatly shortened design cycle and lower product design and development costs. CAD enables designers to simulate a working model on screen, edit or manipulate the model, maintain the record by saving the files, and generate reports.
Fig. 1.1 Steps in the engineering process
1.2 IMAGE GENERATION ON SCREEN
In computer graphics, an image is generated on a display device. Underlying technologies for full-area two-dimensional displays include: cathode ray tube display (CRT), light-emitting diode display (LED), electroluminescent display (ELD), electronic paper, electronic ink, plasma display panel (PDP), liquid crystal display (LCD), organic light-emitting diode display (OLED), laser TV, etc. The multiplexed display technique is used to drive most modern display devices. Earlier cathode ray tube (CRT) based display devices are used in the following display devices:
Direct view storage tube (DVST)
Calligraphic or random scan display system
Raster scan display system
Before moving on to the display device, let us first see the working of the cathode ray tube (CRT).
1.2.1 Working of Cathode Ray Tubes (CRT)
A cathode is a (negatively charged) electron gun that contains a filament. When the filament is heated, the electrons are emitted in a straight beam. When the beam hits a phosphorus-coated CRT screen at a certain velocity, it emits light and a bright spot appears on the screen (Fig. 1.2). The different components of a CRT are:
Cathode: A cathode is made up of a filament which generates electrons on heating. This is also called an electron gun. These negatively charged electrons are directed towards the screen.
Fig. 1.2 The cathode ray tube
Control Grid: The intensity or brightness of any point on the screen depends upon the intensity of the electron beam coming out from the electron gun. A control grid is used to control the intensity of the electrons emerging from the electron gun according to the intensity of the point required on the screen. The control grid is negatively charged with varying intensity. The intensity of the negative charge is achieved by providing negative voltage to the control grid. If high negative voltage is provided, then a strong negative field is developed, which in turn repels the amount of electrons coming out from the electron gun. On the other hand, if low voltage is supplied to the control grid, this produces a low negative charged field, and that increases the intensity of electrons coming out from the electron gun. In other words, by changing the voltage of the control grid, the brightness of a point on the screen can be changed.
Focusing Anode: The focusing anode is a positively charged field which focuses the electron beam on a particular point on the screen.
Accelerating Anode: The accelerating anode accelerates the velocity of the electrons in an electron beam so that they hit the screen at a high velocity. This ensures that light is emitted and a bright spot appears on the screen.
1.2.2 Design of Deflection Mechanism of CRT
The deflection mechanism deflects the electron beam so that it strikes the screen at the desired location. There are two types of deflection plates: the horizontal deflection plate and the vertical deflection plate. Horizontal deflection plates are basically vertically placed but deflect the electron beam in a horizontal direction, whereas vertical deflection plates are horizontally placed but deflect the electron beam in a vertical direction. These deflection plates are provided with an electric field which deflects the electron beam from its straight path. The deflection mechanism is shown in Fig. 1.3. There are two methods of providing an electric field to the two deflector plates:
Electromagnetic field
Electrostatic field
Fig 1.3 Deflection mechanism of CRT
An electromagnetic field is most commonly used in modern display devices such as TV monitors, etc. In this method, a magnetic field is generated in the deflector plates. An electrostatic field is most commonly used in applications such as cathode ray oscilloscopes (CRO). In this method, a static capacitive field is generated in the deflector plates.
1.3 IMAGE GENERATING TECHNIQUES
Image generation techniques are classified on the basis of the use of cathode ray tubes (CRT) in display devices. Devices that use CRT for image generation on screen are called CRT-based display devices. Examples: direct view storage tube (DVST), random scan display devices, and raster scan display devices.
Similarly, display devices that do not use CRT for image generation on the screen are termed non-CRT-based display devices. All modern display devices come under this category. The size of the display device is reduced considerably and it is flatter than a CRT based display device. Non-CRT-based display devices are liquid crystal displays (LCD), light emitting diodes (LED), plasma monitors, etc.
1.3.1 CRT Based Display Devices
As we have discussed earlier, there are three CRT based display devices: direct view storage tubes, calligraphic or random scan display systems and raster scan display systems. These CRT based display devices are further classified into two categories: a line-based system and point-based system as shown in Fig. 1.4. Direct view storage tube and calligraphic or random scan display systems, are examples of line-based system, whereas raster scan display systems are examples of point-based systems. In line-based display devices, any geometric entity on the screen is made up of small lines. Even a curve or circle is also made up of small lines, whereas in point-based systems, it is made up of points. The phosphor coating in CRT is of two types: long persistent phosphor coating and short persistent phosphor coating. In long persistent phosphor coating, the bright spot appears for a long period of time whereas in short persistent phosphor coating it appears for a few milliseconds and then diminishes. When the screen gets refreshed, the bright spot again appears on the screen. This cycle is continued and the phenomenon is called the refresh rate. Due to these cycles of screen refresh, flickering appears on the screen. Flicker is a visible fading between the cycles, especially when the refresh rate or refresh frequency is low. A low refresh rate allows the brightness to drop for time intervals sufficiently long to be noticed by the human eye.
Fig. 1.4 Classification of CRT based display devices
1.3.1.1 Direct View Storage Tube (DVST)
In DVST, the CRT screen is coated with permanent phosphorescence. This permanent phosphorescence coating on the screen ensures the entity drawn on the screen will remain there for long time, say 1 to 2 hours. Because of this permanent phosphorescence, the figure appears on the screen for a long time and changing the entity on the screen becomes difficult. For erasing the entity, the screen must be flooded with a particular voltage. So, if we have to make changes, we have to erase the entire screen by supplying voltage to the screen and then redraw the new entity on the screen. A line in DVST can be drawn from any point to any point on the screen. This property is not shared by other display devices. This is the reason why it is called a line-based system. Any image on the screen of DVST is drawn by using small lines. DVST is a flicker free display device.
The disadvantages of DVST:
The process of drawing any entity is slow.
No animation is possible.
Erasing an entity is difficult.
1.3.1.2 Calligraphic or Random Scan Display System
This is also a line-based system like the DVST, which means we can draw a line from any point to any point on the screen. The drawback of DVST, is that an image appears for a very long time (1 to 2 hours), is eliminated in random scan display systems. Here the picture is refreshed or reappears on the screen about 40 to 50 times in a second. But due to this high frequency of refresh, the refreshing process is not observed by the human eye, but a slight flickering appears on the screen. The main components of random scan display systems are screen, buffer (memory), and controller.
Fig. 1.5 Working of a random scan display system
Buffer is memory which stores the information on the entities of the screen. As shown in Fig. 1.5, there are four lines on the screen and the information of these lines is stored in the buffer. The controller controls the flow of data from the buffer to the screen and vice-versa. In every cycle of refresh, it reads the data from the buffer and displays it on the screen. This refresh process is repeated for 40 to 50 times in a second. Erasing the line on the screen means erasing the line from the buffer. This makes changes to the image much easier. The disadvantage of this system is that complex curves are difficult to draw.
1.3.1.3 Raster Scan Display System
In this display system, the entire screen is divided into an array or matrix of points, as shown in Fig. 1.6. These small points are called pixels; hence it is called a point-based system. But a line cannot be drawn from any point to any point on the screen. For monochrome monitors, each pixel can be either black or white. The line on the screen appears by making a particular line of pixels glow. This also uses a refresh display system like a random scan display system, in which the entity on the screen is redisplayed 40 to 50 times in a second. The frame buffer is a memory storage device to store the location of pixels on the screen. The controller’s function is to control the display of pixels as per information stored in the frame buffer (this whole cycle is repeated 40 to 50 times in a second).
Fig. 1.6. Rasterization
Fig. 1.7 Zigzag strokes of an electron beam
Fig. 1.8 N-bit-plane gray level frame buffers
Fig. 1.9 N-bit-plane gray level frame buffer with a W-bit-wide lookup table
Fig. 1.10 A simple color frame buffer
Advantages
It is possible to add chrominance information to each pixel.
Position on screen is predefined by the scan progress.
Less expensive than vector display.
The DSP (digital signal processor) and graphic processor are cheap and very powerful.
Very efficient to represent full images.
Disadvantages
Slow screen update rate, normally 25-120 screen/sec.
At low resolution, pixels are quite big.
Non-real time display.
Improper interpolation of digital samples can produce visual artifacts (aliasing).
1.3.2 Non-CRT based Display Devices
Non-CRT based display devices are also called flat panel displays. CRT based display devices are bulky, heavy, and fragile but flat panel display devices are light and easy to handle. As a result, they have greater demand than CRT based DD. Examples of flat panel display devices are plasma, LCD, LED, etc.
1.3.2.1 Plasma Display
Plasma display consists of a matrix of pixels. Each pixel contains a mechanism which is actuated by voltage. The current emits light and is supplied to the pixel by using a switching device transistor, resistor, etc. The basic technique in plasma is a display consisting of a matrix of cells in a glass envelope, and each cell is filled with gas, like neon. Plasma displays can have an AC dielectric layer placed in between the conductance and the gas, which is bi-stable or DC, or a combined AC/DC hybrid. Large-size plasma has high resolution. Phosphorescent material emits light when excited by either an AC or DC electric field. The material is zinc sulphite doped with manganese. Electroluminescent display has a yellow color. An AC/DC excited thin film electron is mostly used in computer graphics applications. The basic structure is shown in Fig. 1.11.
Fig. 1.11 The basic structure of gas discharge plasma display (AC/DC activated)
1.3.2.2 Liquid Crystal Display (LCD)
Liquid crystal display is an example of passive technology. It either transmits or reflects incident which is modified with polarization. The basic principle of polarized light is that transmitted light is passed through the first polarizer and polarized in the xyplane, since the polarized axis of the second polarizer aligns with first one, and vice versa. The ceramic which exists in the mesophase is stable at a temperature between solid and liquid, hence the name liquid crystal. Picture clarity is shown in Fig. 1.12.
Fig. 1.12 Liquid crystal display
1.4 GRAPHIC USER INTERFACE (GUI)
The graphic user interface is used to control the system or a specific application running on the system. Computer systems may have multiple interactive devices to interact with the outside world. Typical examples of interaction with the outside world are visual representation of position, valuator, button, and pick functions. Elements that are used to construct GUI are cursor, radio button, valuators, scroll bars, dialog boxes, menus, icons, etc.
Cursors
Cursors are a very important element of GUI. They are mainly used to indicate location on the screen. Another use of the cursor is the indication of an available operation by clicking the mouse. Cursors come in various types, as shown in Fig. 1.13.
Fig. 1.13 Types of cursors
Radio Buttons
Radio buttons are used to visually implement the choice or button function. Alternatively, the buttons can be used to indicate an on/off status for a particular feature. Fig. 1.14 shows various radio buttons.
Fig. 1.14 Radio buttons
Valuators
Valuators, shown in Fig. 1.15, are implemented as either fixed length slider bars or dial pointers. This feature is also available as a numerical value shown under an arrow as additional feedback.
Fig. 1.15 Valuators
Scroll bars
Scroll bars are used to indicate and/or move to a position within a document or other entity as shown in Fig. 1.16. The arrow indicates the direction of motion.
Fig. 1.16 Scroll bars
Dialog boxes
Dialog boxes, shown in Fig. 1.17, are used when multiple inputs are required to specify the desired action in a system. They contain a number of different interactive tools, i.e., radio buttons, valuators, types of boxes, etc.
Fig. 1.17 Dialog boxes
Menus
Menus are used to perform functions such as selecting from a set of choices as seen in Fig. 1.18. The most common menus are:
Pull up
Pull down
Pull out
Pop up
Tear off, etc.
Fig. 1.18 Menus
Icons
Fig. 1.19 shows icons, which provide a pictorial representation of a concept, object, or action.
Fig 1.19 Icons
1.5 REFRESH RATE
A refresh rate depends upon a monitor’s horizontal scanning frequency and the number of horizontal lines displayed. The horizontal scanning frequency is the number of lines the electron beam sweeps in one second. It is also known as frame rate, horizontal scan rate, vertical frequency, or frequency. Refresh rate is a CRT monitor measurement in Hz that indicates how many times per second a monitor screen image is renewed. For example, a monitor with a refresh rate of 75 Hz means the screen is going to redraw 75 times per second. Refresh rates below 75 Hz can produce an often-imperceptible flicker that can cause eyestrain after long viewing. While some cards can support as high as 120 Hz, sometimes even higher, it is recommended you run 85-90 Hz; rates beyond 90 Hz add an unnecessary processing burden to the eyes. Finally, LCD does not have a refresh rate. Hence, LCD is a flicker free device.
Problems on refresh rate/monitors
Problem 1
Calculate the different colors obtained with three sets of 8 bit frame buffers.
Solution Different colors obtained can be calculated as follows:
[2n]m
Where,
here
Hence, three sets of 8 bit frame buffers can generate 16,777, 216 different colors.
Problem 2
Calculate the refresh rate for a raster screen of 512 × 512 pixels with average access time for each pixel of 200 nanoseconds.
Raster screen of 512 × 512 pixels
For one frame to get refreshed, it takes 0.0524 sec. So in 1 sec, the refresh rate would be
Problem 3
Calculate the time required to access each pixel, when the refresh rate of 30 frames/second of 4096 × 4096 raster.
Refresh rate is 30 frames in one second. Hence, time required to access each pixel is calculated as
Problem 4
Calculate maximum RAM size for 32 bit and 64 bit operating systems and 1920 × 1080raster screen.
Solution 32 bit operating system means, for each pixel on the screen, there are 32 frame buffers in the memory.
(It may be noted that to convert bytes to kilobytes, we have to divide by 1024)
RAM sizes required for a given raster screen using 32 bit and 64 bit operating system are 7.91 MB and 15.82 MB respectively.
Problem 5
For a 21.5 inch monitor having a screen resolution of 1920 × 1080, calculate pixels per inch (ppi)
Solution Pixels per inch (ppi) is the number of pixels per square inch
where,
Here,
Problem 6
Calculate pixels per inch (ppi) for Nokia N 90 mobile having screen resolution 352 × 416 and 2.1 inch monitor.
Solution
Here,
1.6 WORKING OF LASER PRINTERS
Laser printing is an electrostatic digital printing process that rapidly produces high quality text and graphics by passing a laser beam over a charged drum to define a differentially charged image. The drum then selectively collects charged toner and transfers the image to paper, which is then heated to permanently fix the image. As with digital photocopiers and multifunction printers (MFPs), laser printers employ a xerographic printing process, but differ from analog photocopiers in that the image is produced by the direct scanning of the medium across the printer’s photoreceptor. Hence, it proves to be a much faster process compared to the latter. There are typically seven steps involved in the laser printing process.
Raster image processing
Each horizontal strip of dots across the page is known as a raster line or scan line. Creating the image to be printed is done by a raster image processor (RIP), typically built into the laser printer. The raster image processor generates a bitmap of the final page in the raster memory. For fully graphical output using a page description language, a minimum of 1 megabyte of memory is needed to store an entire monochrome letter/A4 sized page of dots at 300 dpi. At 300 dpi, there are 90,000 dots per square inch (300 dots per linear inch). In a color printer, each of the four CYMK toner layers is stored as a separate bitmap, and all four layers are typically preprocessed before printing begins, so a minimum of 4 megabytes is needed for a full-color letter-size page at 300 dpi. Memory requirements increase with the square of the dpi, so 600 dpi requires a minimum of 4 megabytes for monochrome, and 16 megabytes for color at 600 dpi. Printers capable of tabloid and larger size may include memory expansion slots.
Charging
In older printers, a corona wire positioned parallel to the drum, or in more recent printers, a primary charge roller, projects an electrostatic charge onto the photoreceptor (otherwise called the photo conductor unit), a revolving photosensitive drum or belt, which is capable of holding an electrostatic charge on its surface while it is in the dark, as shown in Fig. 1.20.
Fig 1.20 Applying a negative charge to the photosensitive drum
An AC bias is applied to the primary charge roller to remove any residual charges left by previous images. The roller will also apply a DC bias on the drum surface to ensure a uniform negative potential. Numerous documents describe the photosensitive drum coating as a silicon sandwich with a photo charging layer, a charge leakage barrier layer, as well as a surface layer. One version uses amorphous silicon containing hydrogen as the light receiving layer, boron nitride as a charge leakage barrier layer, as well as a surface layer of doped silicon, notably silicon with oxygen or nitrogen which at sufficient concentration resembles machining silicon nitride.
Exposing
The laser is aimed at a rotating polygonal mirror, which directs the laser beam through a system of lenses and mirrors onto the photoreceptor. The cylinder continues to rotate during the sweep and the angle of sweep compensates for this motion. The stream of rasterized data held in memory turns the laser on and off to form the dots on the cylinder. Lasers are used because they generate a narrow beam over great distances. The laser beam neutralizes (or reverses) the charge on the black parts of the image, leaving a static electric negative image on the photoreceptor surface to lift the toner particles, as shown in Fig. 1.21.
Fig 1.21 The laser neutralizes the negative charge
Fig 1.22 An actual laser unit from a Dell P1500
Some non-laser printers expose by an array of light emitting diodes spanning the width of the page, rather than by a laser (“exposing” is also known as “writing” in some documentation). Fig. 1.22 shows the laser unit of a Dell P 1500.
Developing
The surface with the latent image is exposed to toner, fine particles of dry plastic powder mixed with carbon black or coloring agents. The toner particles are given a negative charge and are electrostatically attracted to the photoreceptor’s latent image, the areas touched by the laser. Because like charges repel, the negatively charged toner will not touch the drum where the negative charge remains.
Transferring
The photoreceptor is pressed or rolled over paper, transferring the image. Higherend machines use a positively charged transfer roller on the back side of the paper to pull the toner from the photoreceptor to the paper.
Fusing
The paper passes through rollers in the fuser assembly where heat of up to 200°C (392°F) and pressure bond the plastic powder to the paper as shown in Fig. 1.23. One roller is usually a hollow tube (heat roller) and the other is a rubber backing roller (pressure roller). A radiant heat lamp is suspended in the center of the hollow tube, and its infrared energy uniformly heats the roller from the inside. For proper bonding of the toner, the fuser roller must be uniformly hot.
Fig 1.23 Melting toner on paper using heat and pressure
Some printers use a very thin flexible metal fuser roller, so there is less mass to be heated and the fuser can more quickly reach operating temperature. If paper moves through the fuser more slowly, there is more roller contact time for the toner to melt, and the fuser can operate at a lower temperature. Smaller, inexpensive laser printers typically print slowly, due to this energy-saving design, compared to large high speed printers where paper moves more rapidly through a high-temperature fuser with a very short contact time.
Cleaning
When the print is complete, an electrically neutral soft plastic blade cleans any excess toner from the photoreceptor and deposits it into a waste reservoir, and a discharge lamp removes the remaining charge from the photoreceptor. Toner may occasionally be left on the photoreceptor when an unexpected event, such as a paper jam, occurs. The toner is on the photoconductor ready to apply, but the operation failed before it could be applied. The toner must be wiped off and the process restarted. Fig. 1.24 shows a magnified image of color laser printer output, showing individual toner particles comprising 4 dots of an image with a bluish background.
Fig 1.24 A magnified image printed from a color laser printer
Problems on Printers
Problem 7
Assume a computer with 16 bit per word and a transfer rate of 1 million instructions per second. How long would it take to fill the frame buffer for a 600 dpi (dots per inch) laser printer with a page size of by 14″ inch.
Solution
∴
Transfer rate of 1 × 107 bits in 1 sec. So, to transfer 42840000 dots or bits, it takes X sec
Problem 8
Suppose a printer of 300 × 300 dpi resolution producing inch printed area on an × 11 inch page. Calculate no. of pages printed per minute, if a sustained data rate tothe laser print engine of 1 megabit/sec.
Solution
Data rate of 1 megabit in one sec, so to print 7087500 it takes
EXERCISES
Explain the various applications of computer graphics.
What are the benefits of CAD from manufacturing considerations?
What are the various hardware requirements in setting up the CAD system?
Write short notes on (
i
) icons (
ii
) GUI.
Explain the working of random scan display. Why is this not used in modern CAD?
Explain any two output devices in a CAD system.
Explain the difference between time based systems and point based systems, with examples.
What is flickering in display devices?
Explain the components of raster scan display devices.
Explain the refresh rate.
What is a pixel and a frame buffer?
What is a bit plane? How are bit planes used to get different color and B and W gray levels?
Explain the working of laser printers.
How is an image generated on a screen?
What are the different parameters for comparing graphic display devices? Compare various display devices on these parameters.
OBJECTIVE QUESTIONS
1.1In CRT, the control grid is used to control the intensity of electrons coming out from an electron gun, and is charged with(a) negative voltage(b) positive voltage(c) neutral(d) none of the above
1.2The phenomenon of having a continuous glow on the screen even after it is removed is called(a) fluorescence(b) persistence(c) phosphorescence(d) incandescence
1.3Aspect ratio is generally defined as the ratio of(a) vertical to horizontal points(b) horizontal to vertical points(c) vertical to (horizontal + vertical) points(d) either (a) or (b) depending on the convention followed
1.4