`GRAPHICS
`
`baLOPE
`
`Align EX1045
`Align v. 3Shape
`
`Align EX1045
`Align v. 3Shape
`IPR2022-00145
`
`
`
`COMPUTER
`GRAPHICS
`
`Second Edition
`
`DONALD HEARN
`M. PAULINE BAKER
`
`ISBN 0-13-161530-0
`
`90000
`
`9 80131615304
`
`
`
`SECON D EDIT ION
`
`~ omputer
`Graphics:
`
`Donald Hearn
`Department of Computer Science and
`Nation'al Center for Supercompµting Applications
`University of Illinois
`
`M. Pauline Baker
`National Center for Supercomputing Applications
`University of fllhzois
`
`PRENTICE HALL
`Englewood Cliffs, New Jersey 07632
`
`
`
`Library of Congress Cataloging-in-Publication Data
`
`Hearn, Donald.
`Computer graphics / Donald Hearn, M. Pauline Baker. - 2nd ed.
`p.cm.
`Includes bibliographical references and index.
`ISBN 0-13-161530-0
`1. Computer graphics.
`T385.H381994
`006.6-dc20
`
`l. Baker, M. Pauline. Il. Title.
`
`93-33698
`CIP
`
`Acquisitions Editor: Bill Zobrist
`Editor-in-Chief: Marcia Horton
`Production Editor: Bayani MendoZJI de Leo11
`Copy Editor: Peter Zurita
`Marketing Manager: Tom McE/wee
`Design Director: Anne Bonanno Nieglos
`Designers: Jules Perlmutter/A111y Rosen
`Cover Designer: Amy Rosen
`Buyer: Linda Behrens
`Editorial Assistant: Phyllis Morgan
`Cover Computer Art: Jerry Farm
`
`It © 1994, 1986 by D011ald Hearn and M. Pauline Baker
`
`Published by Prentice Hall, Inc.
`A Paramount Communications Company
`Englewood Oiffs, New Jersey 07632
`
`The author and publisher of this book have used their best efforts in preparing this book. These
`efforts include the development, research, and testing of the theories and programs to determine their
`effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with
`regard to these programs or the documentation contained in this book. The author and publisher
`shall not be liable in any event for incidental or consequential dan1ages in connection with, or arising
`out of, the furnishing, performance, or use of these programs.
`
`All rights reserved. No part of this book may be
`reproduced, in any form or by any means,
`without permission in writing from the publisher.
`
`Printed in the United States of America
`
`10 9 8 7 6 5 4 3 2 1
`
`ISBN 0-13 - 161530-0
`
`Prentice-Hall International (UK) Limited, London
`Pre11tice-Hall of Australia Pty. Limited, Sydney
`Prentice-Hall Canada Inc., Toronto
`Prentice-Hall Hispanoamericana, S.A., Mexico
`Prentice-Hall of India Private Limited, Ne:w Delhi
`Prentice-Hall of Japan, Inc., Tokyo
`Simon & Sclrnster Asia Pte. Ltd., Singapore
`Editora Prentice-Hall do Brasil, Ltda., Rio de faneiro
`
`
`
`Contents
`
`PREFACE
`
`1 A Su rvey of Computer
`
`Graph ics
`
`1-1 Computer-Aided Design
`1-2 Presentation Graphics
`·1-3 Computer Art
`1-4 Entertainment
`1-5 Education and Training
`1-6 Visualization
`1-7
`Image Processing
`1-8 Graphical User Interfaces
`
`2 O verview of Graphics
`
`Systems
`
`2-1 Video Display Devices
`Refresh Cathode-Ray Tubes
`Raster-Scan Displays
`Random-Scan Displays
`Color CRT Monitors
`Direct-View Storage Tubes
`Flat-Panel Displays
`Three-Dimensional Viewing Devices
`
`xvii
`
`2
`
`Stereoscopic and Virtual-Reality
`Systems
`2-2 Raster-Scan Systems
`Video Controller
`Raster-Scan Display Processor
`4 2-3 Random-Scan Systems
`11
`2-4 Graphics Monitors and Workstations
`13 2-5
`Input Devices
`18
`Keyboards
`21
`Mouse
`Trackball and Spaceball
`25
`Joysticks
`32
`Data Glove
`34
`Digitizers
`Image Scanners
`Touch Panels
`Light Pens
`Voice Systems
`2-6 Hard-Copy Devices
`36 2-7 Graphics Software
`Coordinate Representations
`37
`Graphics Functions
`40
`Software Standards
`41
`PHIGS Workstations
`42
`Summary
`45
`45
`References
`Exercises
`49
`
`35
`
`50
`53
`53
`55
`56
`57
`60
`61
`61
`63
`63
`64
`64
`67
`68
`70
`70
`72
`75
`76
`77
`78
`79
`79
`81
`81
`
`
`
`Contents
`
`3
`
`Output Primitives
`
`83
`
`Summary
`Applications
`References
`Exercises
`
`84
`86
`87
`88
`
`3-1
`Points and Lines
`3-2 Line-Drawing Algorithms
`DDA Algorithm
`Bresenham's Line Algorithm
`Parallel Line Algorithms
`3-3 Loading the Frame Buffer
`3-4 Line Function
`3-5 Circle-Generating Algorithms
`Properties of Circles
`Midpoint Circle Algorithm
`3-6 Ellipse-Generating Algorithms
`Properties of Ellipses
`Midpoint Ellipse Algorithm
`3-7 Other Curves
`Conic Sections
`Polynomials and Spline Curves
`3-8 Parallel Curve Algorithms
`3-9 Curve Functions
`3-10 Pixel Addressing
`and Object Geometry
`Screen Grid Coordinates
`Maintaining Geometric Properties
`of Displayed Objects
`3-11 Filled-Area Primitives
`Scan-Line Polygon Fill Algorithm
`Inside-Outside Tests
`Scan-Line Fill of Curved Boundary
`Areas
`Boundary-Fill Algorithm
`Flood-Fill Algorithm
`3-12 Fill-Area Functions
`3-13 Cell Array
`3-14 Character Generation
`
`viii
`
`92 4 Attributes of Output
`
`Primitives
`
`94
`95
`97 4-1
`Line Attributes
`97
`Line Type
`98
`Line Width
`102
`Pen and Brush Options
`102
`Line Color
`103 4-2 Curve Attributes
`110 4-3 Color and Grayscale Levels
`110
`Color Tables
`112
`Grayscale
`112 4-4 Area-Fi II Attributes
`113
`Fill Styles
`Pattern Fill
`114
`Soft Fill
`114 4-5 Character Attributes
`Text Attributes
`114
`Marker Attributes
`117 4-6 Bundled Attributes
`117
`Bundled Line Attributes
`125
`Bundled Area-Fill Attributes
`Bundled Text Attributes
`Bundled Marker Attributes
`4-7
`Inquiry Functions
`4-8 Antialiasing
`Supersampling Straight Line
`Segments
`Pixel-Weighting Masks
`
`126
`127
`130
`131
`131
`131
`
`134
`136
`140
`140
`
`143
`
`144
`144
`146
`149
`149
`152
`154
`155
`157
`158
`158
`159
`162
`163
`163
`167
`168
`168
`169
`169
`170
`170
`171
`
`172
`174
`
`
`
`Area Sampling Straight Line
`Segments
`Filtering Techniques
`Pixel Phasing
`Compensating for Line Intensity
`Differences
`Antialiasing Area Boundaries
`Summary
`References
`Exercises
`
`Transformations
`
`5-1 Basic Transformations
`Translation
`Rotation
`Scaling
`5-2 Matrix Representations
`and Homogeneous Coordinates
`5-3 Composite Transformations
`Translations
`Rotations
`Scalings
`General Pivot-Point Rotation
`General Fixed-Point Scaling
`General Scaling Directions
`Concatenation Properties
`General Composite Transformations
`and Computational Efficiency
`5-4 Other Transformations
`Reflection
`Shear
`5-5 Transformations Between Coordinate
`Systems
`
`205
`
`180 6 Two-Dimensional
`5 Two-Dimensional Geometric 6-2 Viewing Coordinate Reference Frame
`183 6-3 Window-to-Viewport Coordinate
`Transformation
`6-4 Two-Dimensional Viewing Functions
`184
`184 6-5 Clipping Operations
`186 6-6 Point Clipping
`187 6-7 Line Clipping
`Cohen-Sutherland Line Clipping
`Liang-Barsky Line Clipping
`188
`Nicholl-Lee-Nicholl Line Clipping
`191
`Line Clipping Using Nonrectangular
`191
`Clip Windows
`191
`Splitting Concave Polygons
`192
`192 6-8 Polygon Clipping
`Sutherland-Hodgeman Polygon
`193
`Clipping
`193
`Weiler-Atherton Polygon Clipping
`194
`Other Polygon-Clipping Algorithms
`195 6-9 Curve Clipping
`201 6-10 Text Clipping
`201 6-11 Exterior Clipping
`Summary
`203
`References
`Exercises
`
`Contents
`
`5-6 Affine Transformations
`174 5-7 Transformation Functions
`174 5-8 Raster Methods for Transformations
`175
`Summary
`References
`Exercises
`
`175
`176
`178
`
`180
`
`View ing
`
`6-1 The Viewing Pipeli ne
`
`208
`208
`210
`212
`213
`213
`
`216
`
`217
`219
`
`220
`222
`224
`225
`225
`226
`230
`233
`
`235
`235
`237
`
`238
`242
`243
`244
`244
`245
`245
`248
`248
`
`ix
`
`
`
`Contents
`
`7 Structures and Hierarchical
`
`Modeling
`
`250
`
`7-1 Structure Concepts
`Basic Structure Functions
`Setting Structure Attributes
`7-2 Editing Structures
`Structure Lists and the Element
`Pointer
`Setting the Edit Mode
`Inserting Structure Elements
`Replacing Structure Elements
`Deleting Structure Elements
`Labeling Structure Elements
`Copying Elements from One Structure
`to Another
`7-3 Basic Modeling Concepts
`Model Representations
`Symbol Hierarchies
`Modeling Packages
`7-4 Hierarchical Modeling
`with Structures
`Local Coordinates and Modeling
`Tra nsfonnations
`Modeling Transformations
`Structure Hierarchies
`Summary
`References
`Exercises
`
`250
`250
`253
`254 8-2
`
`255
`256
`256
`257
`257
`258
`
`260 8-3
`260
`261
`262
`263
`
`265
`
`265
`266
`266
`268
`269 8-4
`269
`
`8-5
`
`Graphical User Interfaces
`
`271
`
`272
`273
`
`8 and Interactive Input
`
`Methods
`
`8-1 The User Dialogue
`Windows and Icons
`
`X
`
`Accommodating Multiple
`Skill Levels
`Consistency
`Minimizing Memorization
`Backup and Error Handling
`Feedback
`Input of Graphical Data
`Logical Classification of Input
`Devices
`Locator Devices
`Stroke Devices
`String Devices
`Valuator Devices
`Choice Devices
`Pick Devices
`Input Functions
`Input Modes
`Request Mode
`Locator and Stroke Input
`in Request Mode
`String Input in Request Mode
`Valuator Input in Request Mode
`Choice Input in Request Mode
`Pick Input in Request Mode
`Sample Mode
`Event Mode
`Concurrent Use of Input Modes
`Initial Values for Input-Device
`Parameters
`Interactive Picture-Construction
`Techniques
`Basic Positioning Methods
`Constraints
`Grids
`Gravity Field
`Rubber-Band Methods
`Dragging
`Painting and Drawing
`
`273
`274
`274
`274
`275
`276
`
`276
`277
`277
`277
`277
`279
`279
`281
`281
`282
`
`282
`283
`284
`284
`284
`285
`285
`287
`
`287
`
`288
`288
`288
`289
`290
`290
`291
`291
`
`
`
`8-6 Virtual-Reality Environments
`Summary
`References
`Exercises
`
`292 10-4
`293
`294
`294 10-5
`10-6
`
`9
`
`Three-Dimensional
`Concepts
`
`296
`
`9-1 Three-Dimensional Display Methods
`Parallel Projection
`Perspective Projection
`Depth Cueing
`Visible Line and Surface
`Identification
`Surface Rendering
`Exploded and Cutaway Views
`Three-Dimensional and Stereoscopic
`Views
`9-2 Three-Dimensional Graphics
`Packages
`
`297
`298
`299 10-7
`299
`
`300
`300
`300
`
`300
`
`302
`
`10-8
`
`Three-Dimensional
`
`10 Object
`
`Representations
`
`10-1
`
`10-2
`10-3
`
`Polygon Surfaces
`Polygon Tables
`Plane Equations
`Polygon Meshes
`Curved Lines and Surfaces
`Quadric Surfaces
`Sphere
`Ellipsoid
`Torus
`
`10-9
`
`304
`
`305
`306
`307
`309 10-10
`310
`310
`311
`311
`311
`
`10-11
`
`Contents
`
`Superquadrics
`Superellipse
`Superellipsoid
`Blobby Objects
`Spline Representations
`Interpolation and Approximation
`Splines
`Parametric Continuity
`Conditions
`Geometric Continuity
`Conditions
`Spline Specifications
`Cubic Spline Interpolation
`Methods
`Nahual Cubic Splines
`Hermite Interpolation
`Cardinal Splines
`Kochanek-Bartels Splines
`Bezier Curves and Surfaces
`Bezier Curves
`Properties of Bezier Curves
`Design Techniques Using Bezier
`Curves
`Cubic Bezier Curves
`Bezier Surfaces
`B-Spline Curves and Surfaces
`B-Spline Curves
`Uniform, Periodic 8-Splines
`Cubic, Periodic B-Splines
`Open, Uniform B-Splines
`Nonuniform B-Splines
`B-Spline Surfaces
`Beta-Splines
`Beta-Spline Continuity
`Conditions
`Cubic, Periodic Beta-Spline
`Matrix Representation
`Rational Splines
`
`312
`312
`313
`314
`315
`
`316
`
`317
`
`318
`319
`
`320
`321
`322
`323
`325
`327
`327
`329
`
`330
`331
`333
`334
`335
`336
`339
`341
`344
`344
`345
`
`345
`
`346
`347
`
`xi
`
`
`
`I I
`
`Contents
`
`10-12
`
`10-13
`
`10-14
`10-15
`
`10-16
`10-17
`10-18
`
`10-19
`
`10-20
`10-21
`10-22
`
`xii
`
`349
`
`356
`359
`362
`11 -1
`362 11-2
`363
`364
`364
`
`367
`
`11 -3
`11 -4
`
`369
`
`11 -5
`372 11 -6
`
`11 -7
`
`373
`376
`378
`385
`
`11 Geometric and Modeling
`
`Visual Representations
`for Multivariate Data Fields
`Summary
`References
`Exercises
`
`402
`404
`404
`404
`
`Three-Dimensional
`
`Transformations
`
`407
`
`Translation
`Rotation
`Coordinate-Axes Rotations
`General Three-Dimensional
`Rotations
`Rotations with Quaternions
`Scaling
`Other Transformations
`Reflections
`Shears
`Composite Transformations
`Three-Dimensional Transformation
`Functions
`Modeling and Coordinate
`Tra nsfo rmations
`Summary
`References
`Exercises
`
`408
`409
`409
`
`413
`419
`420
`422
`422
`423
`423
`
`425
`
`426
`429
`429
`430
`
`Three-D imensional
`Viewing
`
`431
`
`432
`433
`433
`
`437
`
`395 12-1
`12-2
`
`400
`
`401
`
`Viewing Pipe line
`Viewing Coordinates
`Specifying the View Plane
`Transformation from World
`to Viewing Coordinates
`
`Conversion Between Spline
`Representations
`Displaying Spline Curves
`351
`and Surfaces
`351
`Horner' s Rule
`Forward-Difference Calculations 351
`353
`Subdivision Methods
`355
`Sweep Representations
`Constructive Sol id-Geometry
`Methods
`Octrees
`BSP Trees
`Fractal-Geometry Methods
`Fractal-Generation Procedures
`Classification of Fractals
`Fractal Dimension
`Geometric Construction
`of Deterministic Self-Similar
`Fractals
`Geometric Construction
`of Statistically Self-Similar
`Fractals
`Affine Fractal-Construction
`Methods
`Random Mid point-Displacement
`Methods
`Controlling Terrain Topography
`Self-Squaring Fractals
`Self-Inverse Fractals
`Shape Grammars and Other
`Procedural Methods
`Particle Systems
`Physically Based Modeling
`Visualization of Data Sets
`Visual Representations
`for Scalar Fields
`Visual Representations
`for Vector Fields
`Visual Representations
`for Tensor Fields
`
`387
`390
`
`395
`
`393 12
`
`
`
`12-3
`
`12-4
`
`12-5
`
`12-6
`12-7
`
`Projections
`Parallel Projections
`Perspective Projections
`View Volumes and General
`Projection Transformations
`General Parallel-Projection
`Transformations
`General Perspective-Projection
`Transformations
`Clipping
`Normalized View Volumes
`Viewport Clipping
`Clipping in Homogeneous
`Coordinates
`Hardware Implementations
`Three-Dimensional Viewing
`Functions
`Summary
`References
`Exercises
`
`454
`
`458
`460
`
`14-1
`461 14-2
`463
`
`464
`467
`468
`468
`
`13 Visible-Surface Detection
`
`Methods
`
`469
`
`13-1
`
`13-2
`13-3
`13-4
`13-5
`13-6
`13-7
`13-8
`13-9
`13-10
`13-11
`
`Classification of Visible-Surface
`Detection Algorithms
`Back-Face Detection
`Depth-Buffer Method
`A-Buffer Method
`Scan-Line Method
`Depth-Sorting Method
`BSP-Tree Method
`Area-Subdivision Method
`Octree Methods
`Ray-Casting Method
`Curved Surfaces
`Curved-Surface Representations
`Surface Contour Plots
`
`470 14-3
`471
`472
`475
`476
`478 14-4
`481
`482
`485
`487 14-5
`488
`488
`489
`
`Contents
`
`438 13-12 Wireframe Methods
`439 13-13
`Visibility-Detection Functions
`443
`Summary
`References
`Exercises
`
`447
`
`490
`490
`491
`492
`492
`
`452
`
`Illumination Models
`
`456 14 and Surface-Rendering
`
`Methods
`
`494
`
`Light Sources
`Basic Illumination Models
`Ambient Light
`Diffuse Reflection
`Specular Reflection
`and the Phong Model
`Combined Diffuse and Specular
`Reflections ~ith Multiple Light
`Sources
`Warn Model
`Intensity Attenuation
`Color Considerations
`Transparency
`Shadows
`Display ing Light Intensities
`Assigning Intensity Levels
`Gamma Correction and Video
`Lookup Tables
`Displaying Continuous-Tone
`Images
`Halftone Patterns and Dithering
`Techniques
`Halftone Approximations
`Dithedng Techniques
`Polygon-Rendering Methods
`Constant-Intensity Shading
`Gouraud Shading
`Phong Shading
`
`496
`497
`497
`497
`
`500
`
`504
`504
`505
`507
`508
`511
`511
`512
`
`513
`
`515
`
`516
`516
`519
`522
`522
`523
`525
`
`xiii
`
`
`
`14-6
`
`14-7
`
`14-8
`14-9
`
`Contents
`
`Fast Phong Shading
`Ray-Tracing Methods
`Basic Ray-Tracing Algorithm
`R~y-Surface Intersection
`Calculations
`Reducing Object-Intersection
`Calculations
`Space-Subdivision Methods
`Antialiased Ray Tracing
`Distributed Ray Tracing
`Radiosity Lighting Model
`Basic Radiosity Model
`Progressive Refinement
`Radiosity Method
`Environment Mapping
`Adding Surface Detail
`Modeling Surface Detail
`with Polygons
`Texture Mapping
`Procedural Texturing
`Methods
`Bump Mapping
`Frame Mapping
`Summary
`References
`Exercises
`
`526 15-6
`527 15-7
`528 15-8
`
`531 15-9
`15-10
`
`535
`535
`538
`540
`544
`544
`
`549
`552
`553 16-1
`16-2
`
`553
`554 16-3
`16-4
`16-5
`
`556
`558
`559
`560 16-6
`561
`562
`
`15 Color Models and Color
`
`Applications
`
`564
`
`Properties of Light
`Standard Primaries and the
`Chromaticity Diagram
`XYZ Color Model
`CIE Chromaticity Diagram
`Intuitive Color Concepts
`RG B Color Model
`YIQ Color Model
`
`565
`
`568
`569
`569
`571
`572
`574
`
`15-1
`15-2
`
`15-3
`15-4
`15-5
`
`xiv
`
`16 Computer
`
`Animation
`
`CM Y Color Model
`HSV Color Model
`Conversion Between HSV
`and RGB Models
`HLS Color Model
`Color Selection
`and Applications
`Summary
`References
`Exercises
`
`Design of Animation Sequences
`General Computer-Animation
`Functions
`Raster Animations
`Computer-Animation Languages
`Key-Frame Systems
`Morphing
`Simulating Accelerations
`Motion Specifications
`Direct Motion Specification
`Goal-Directed Systems
`Kinematics and Dynamics
`Summary
`References
`Exercises
`
`574
`575
`
`578
`579
`
`580
`581
`581
`582
`
`583
`
`584
`
`586
`586
`587
`588
`588
`591
`594
`594
`595
`595
`596
`597
`597
`
`A Mathematics for Computer
`
`Graphics
`
`599
`
`A-1
`
`Coordinate-Reference Frames
`Two-Dimensional Cartesian
`Reference Frames
`Polar Coordinates in the xy Plane
`
`600
`
`600
`601
`
`
`
`Three-Dimensional Cartesian
`Reference Frames
`Three-Dimensional Curvilinear
`602 A-5
`Coordinate Systems
`604
`Solid Angle
`A-6
`Points and Vectors
`605
`A-7
`Vector Addition and Scalar
`607 A -8
`Multiplication
`607 A-9
`Scalar Product of Two Vectors
`608
`Vector Product of Two Vectors
`Basis Vectors and the Metric Tensor 609
`609
`Orthonormal Basis
`610
`Metric Tensor
`Matrices
`611
`Scalar Multiplication and Matrix
`Addition
`Matrix Multiplication
`
`602
`
`612
`612
`
`Contents
`
`Matrix Transpose
`Determinant of a Matrix
`Matrix Inverse
`Complex Nu mbers
`Quaternions
`Nonparametric Representations
`Parametric Representations
`Numerical Methods
`Solving Sets of Linear Equations
`Finding Roots of Nonlinear
`Equations
`Evaluating Integrals
`Fitting Curves to Data Sets
`
`BIBLIOGRAPHY
`
`INDEX
`
`A-2
`
`A-3
`
`A-4
`
`613
`613
`614
`615
`617
`618
`619
`620
`620
`
`621
`622
`625
`
`626
`
`639
`
`xv
`
`
`
`CH APTER. - - - - - - - - - - - -
`Overview of Graphics
`Systems
`
`35
`
`
`
`D ue to the widespread recognition of the power and utility of computer
`
`graphks in virtually all fields, a broad range of graphics hardware and
`software systems is now available. Graphics capabilities for both two-dimen(cid:173)
`sional and three-dimensional applications are now common on general-purpose
`computers, including many hand-held calculators. With personal computers, we
`can use a wide variety of interactive input devices and graphics software pack(cid:173)
`ages. For higher-quality applications, we can choose from a number of sophisti(cid:173)
`cated special-purpose graphics hardware systems and technologies. In this chap(cid:173)
`ter, we explore the basic features of graphics hardware components and graphics
`software packages.
`
`2-1
`VIDEO DISPLAY DEVICES
`
`Typically, the primary output device in a graphics system is a video monitor (Fig.
`2-1). The operation of most video monitors is based on the standard cathode-ray
`tube (CRT) design, but several other technologies exist and solid-state monitors
`may eventually predominate.
`
`36
`
`Figure 2-1
`A computer graphics workstation. (Courtesy of Tektronix, lnc.)
`
`
`
`Section 2-1
`Video Display Devices
`
`Refresh Cathode-Ray Tubes
`
`Figure 2-2 illustrates the basic operation of a CRT. A beam of electrons (cathode
`rays), emitted by an electron gun, passes through focusing and deflection systems
`that direct the beam toward specified positions on the phosphor-coated screen.
`The phosphor then emits a small spot of light at each position contacted by the
`electron beam. Because the light emitted by the phosphor fades very rapidly,
`some method is needed for maintaining the screen picture. One way to keep the
`phosphor glowing is to redraw the picture repeatedly by quickly directing the
`electron beam back over the same points. This type of display is called a refresh
`CRT.
`The primary components of an electron gun in a CRT are the heated metal
`cathode and a control grid (Fig. 2-3). Heat is supplied to the cathode by directing
`a current through a coil of wire, called the filament,' inside the cylindrical cathode
`structure. This causes electrons to be "boiled off" the hot cathode surface. In the
`vacuum inside the CRT envelope, the free, negatively charged electrons are then
`accelerated toward the phosphor coating by a high positive voltage. The acceler-
`
`Focusing
`System
`
`Phosphor(cid:173)
`Coated
`Screen
`
`Connector
`Pins
`
`Electron
`Gun
`
`Figure 2-2
`Basic design of a magnetic-deflection CRT.
`
`Cathode
`
`Focusing
`Anode
`
`Electron
`Beam
`Path
`
`Heating
`Filament
`
`Control
`Grid
`
`Accelerating
`Anod e
`
`Figure 2-3
`Operation of an electron gun with an accelerating anode.
`
`37
`
`
`
`_____ ___ c_h_a_p,_c,_2 ating voltage can be generated with a positively charged metal coati11g on the in(cid:173)
`side of the CRT envelope near the phosphor screen, or an accelerating anode can
`Overview of Graphics Systems
`be used, as in Fig. 2-3. Sometimes the electron gun is built to contain the acceler(cid:173)
`ating anode and focusing system within the same unit.
`Intensity of the electron beam is con trolled by setting voltage levels on the
`control grid, which is a metal cylinder that .fits over the cathode. A high negative
`voltage applied to the control grid will shut off the beam by repelling electrons
`and stopping them from passing th.rough the small hole at the end of the control
`grid structure. A smaller negative voltage on the control grid simply decreases
`the number of electrons passing through. Since the amow,t of light emitted by
`the phosphor coating depends on the number of electrons striking the screen, we
`control the brightness of a display by varying the voltage on the control grid. We
`specify the intensity level for individual screen positions with graphics software
`commands, as discussed in Chapter 3.
`The focusing system in a CRT is needed to force the electron beam to con(cid:173)
`verge into a small spot as it strikes the phosphor. Otherwise, the electrons would
`repel each other, and the beam would spread out as it approaches the screen. Fo(cid:173)
`cusing is accomplished with either electric or magnetic fields. Electrostatic focus(cid:173)
`ing is commonly used in television and computer graphics monitors. With elec(cid:173)
`trostatic focusing, the electron beam passes through a positively charged metal
`cylinder that forms an electrostatic lens, as shown in Fig. 2-3. The action, of the
`electrostatic lens focuses the electron beam at the center of the screen, in exactly
`the same way that an optical lens focuses a beam of light at a particular focal dis(cid:173)
`tance. Similar lens focusing effects can be accomplished with a magnetic field set
`up by a coil mounted around the outside of the CRT envelope. Magnetic lens fo(cid:173)
`cusing produces the smallest spot size on the screen and is used in special(cid:173)
`purpose devices.
`Additional focusing hardware is used in high-precision systems to keep the
`beam in focus at all screen positions. The distance that the electron beam must
`travel to different points on the screen varies because the radius of curvature for
`most CRTs is greater than the distance from the focusing system to the screen
`center. Therefore, the electron beam will be focused properly only at the center of
`the screen. As the beam moves to the outer edges of the screen, displayed images
`become blurred. To compensate for this, the system can adjust the focusing ac(cid:173)
`cording to the screen position of the beam.
`As with focusing, deflection of the electron beam can be controlled either
`with electric fields or with magnetic fields. Cathode-ray tubes are now coml]lonly
`constructed with magnetic deflection coils mounted on the outside of the CRT
`envelope, as illustrated in Fig. 2-2. Two pairs of coils are used, with the coils in
`each pair mounted on opposite sides of the neck of the CRT envelope. One pair is
`mounted on the top and bottom of the neck, and the other pair is mounted on
`opposite sides of the neck. The magnetic field produced by each pair of coils re(cid:173)
`sults in a transverse deflection force that is perpendicular both to the direction of
`the magnetic field and to the direction of travel of the electron beam. Horizontal
`deflection is accomplished with one pair of coils, and vertical deflection by the
`other pair. The proper deflection amounts are attained by adjusting the current
`through the coils. When electrostatic deflection is used, two pairs of parallel
`plates are mounted inside the CRT envelope. One pair of plates is mounted hori(cid:173)
`zontally to control the vertical deflection, and the other pair is mounted vertically
`to control horizontal deflection (fig. 2-4).
`Spots of light are produced on the screen by the transfer of the CRT beam
`energy to the phosphor. When U1e electrons in the beam collide wiU, the phos-
`
`38
`
`
`
`Focusing
`System
`
`Vertical
`Deflection
`Plates
`
`Phosphor(cid:173)
`Coated
`Screen
`
`Connector
`Pins
`
`Electron
`Gun
`
`Horizontal
`Deflection
`Plates
`
`Figure 2-4
`Electrostatic deflection of the electron beam in a CRT.
`
`phor coating, they are stopped and their kinetic energy is absorbed by the phos(cid:173)
`phor. Part of the beam energy is converted by friction into heat energy, and the
`remainder causes electrons in the phosphor atoms to move up to higher quan(cid:173)
`tum-energy levels. After a short time, the "excited" phosphor electrons begin
`dropping back to their stable ground state, giving up their extra energy as small
`quantums of light energy. What we see on the screen is the combined effect of all
`the electron light emissions: a glowing spot that quickly fades after all the excited
`phosphor electrons have retmned to their grom1d energy level. The frequency (or
`color) of the light emitted by the phosphor is proportional to the energy differ(cid:173)
`ence between the excited quantum state and the grow1d state.
`Different kinds of phosphors are available for use in a CRT. Besides color/ a
`major difference between phosphors is their persistence: how long they continue
`to emit light (that is, have excited electrons returning to the ground state) after
`the CRT beam is removed. Persistence is defined as the time it takes the emitted
`light from the screen to decay to one-tenth of its original intensity. Lower(cid:173)
`persjstence phosphors require higher refresh rates to maintain a picture on the
`screen mthout flicker. A phosphor with low persistence is useful for animation; a
`high-persistence p hosphor is useful for displaying highly complex, static pic(cid:173)
`tures. Although some phosphors have a persistence greater than 1 second, graph(cid:173)
`ics monitors are usually constructed with a persistence in the range from 10 to 60
`microseconds.
`Figure 2-5 shows the intensity distribution of a spot on the screen. The in(cid:173)
`tensity is greatest at the center of the spot, and decreases with a Gaussian distrib(cid:173)
`ution out to the edges of the spot. This distribution corresponds to the cross(cid:173)
`sectional electron density distribution of the CRT beam.
`The maximum nwnber of points that can be displayed mthout overlap on a
`CRT is referred to as the resolution. A more precise definition of resolution is the
`number of points per centimeter that can be plotted horizontally a11d vertically,
`although it is often simply stated as the total number of points in each direction.
`Spot intensity has a Gaussian distribution (Fig. 2-5), so two adjacent spots mll
`appear distinct as long as their separation is greater than the diameter at which
`each spot has an intensity of about 60 percent of that at the center of the spot.
`This overlap position is illustrated in Fig. 2-6. Spot size also depends on intensity.
`As more electrons a1·e accelerated toward the phospher per second, the CRT
`beam diameter and the illuminated spot increase. In addition, the increased exci(cid:173)
`tation energy tends to spread to neighboring phosphor atoms not directly in the
`
`Fig,mt 2-5
`Intensity distribution of an
`illuminated phosphor spot on
`a CRT screen.
`
`39
`
`
`
`Chapter 2
`Overview of Graphics Systems
`
`Figure 2-6
`Two illuminated phosphor
`spots are distinguishable
`when their separation is
`greater than the diameter at
`which a spot intensity has
`fallen to 60 percent of
`maximum.
`
`40
`
`path of the beam, which further increases the spot diameter. Thus, resolution of a
`CRT is dependent on the type of phosphor, the intensity to be displayed, and the
`focusing and deflection systems. Typical resolution on high-quality systems is
`1280 by 1024, with higher resolutions available on many systems. High(cid:173)
`resolution systems are often referred to as high-definition systems. The physical
`size of a graphics monitor is given as the length of the screen diagonal, with sizes
`varying from about 12 inches to 27 inches or more. A CRT monitor can be at(cid:173)
`tached to a variety of computer systems, so the number of screen points that can
`actually be plotted depends on the capabilities of the system to which it is at(cid:173)
`tached.
`Another property of video monitors is aspect ratio. This number gives the
`ratio of vertical points to horizontal points necessary to produce equal-length
`lines in both directions on the screen. (Sometimes aspect ratio is stated in terms of
`the ratio of horizontal to vertical points.) An aspect ratio of 3/4 means that aver(cid:173)
`tical line plotted with three points has the same length as a horizontal line plot(cid:173)
`ted with four points.
`
`Raster-Scan Displays
`The most common type of graphics monitor employing a CRT is the raster-scan
`display, based on television technology. In a raster-scan system, the electron
`beam is swept across the screen, one row at a time from top to bottom .. As the
`electron beam moves across each row, the beam intensity is tumed on and off to
`create a pattern of illuminated spots. Picture definition is stored in a memory
`area called the refresh buffer or frame b uffer. This memory area holds the set of
`intensity values for all the screen points. Stored intensity values are then re(cid:173)
`trieved from the refresh buffer and "painted" on the screen one row (scan line) at
`a time (Fig. 2-7). Each screen point is referred to as a pixel or pel (shortened
`forms of picture element). The capability of a raster-scan system to store inten(cid:173)
`sity information for each screen point makes it well suited for the realistic display
`of scenes containing subtle shading and color patterns. Home television sets and
`printers are examples of other systems using raster-scan methods.
`Intensity range for pixel positions depends on the capability of the raster
`system. In a simple black-and-white system, each screen point is either on or off,
`so only one bit per pixel is needed to control the intensity of screen positions. For
`a bilevel system, a bit value of 1 indicates that the electron beam is to be turned
`on at that position, and a value of 0 indicates that the beam intensity is to be off.
`Additional bits are needed when color and intensity variations can be displayed.
`Up to 24 bits per pixel are included in high-quality systems, which can require
`several megabytes of storage for the frame buffer, depending on the resolution of
`the system. A system with 24 bits per pixel and a screen resolution of 1024 by
`1024 requires 3 megabytes of storage for the frame buffer. On a black-and-white
`system with one bit per pixel, the frame buffer is commonly called a bitmap. For
`systems with multiple bits per pixel, the frame buffer is often referred to as a
`pixm ap.
`Refreshing on raster-scan displays is carried out at the rate of 60 to 80
`frames per second, although some systems are designed for higher refresh rates.
`Sometimes, refresh rates are described in units of cycles per second, or Hertz
`(Hz), where a cycle corresponds to one frame. Using these units, we would de(cid:173)
`scribe a refresh rate of 60 frames per second as simply 60 Hz. At the end of each
`scan line, the electron beam returns to the left side of the screen to begin display(cid:173)
`ing the next scan line. The return to the left of the screen, after refreshing each
`
`
`
`fa
`~e
`is
`h-
`:al
`es
`it-
`an
`l.t-
`
`he
`~h
`of
`~r-
`)t-
`
`an
`on
`he
`[O
`ry
`of
`
`at
`Je(1
`!!\(cid:173)
`t.1y
`c.,:i
`
`,
`:I.
`~-
`
`(a)
`
`(c)
`
`(b)
`
`(d)
`
`Fig ure 2-7
`A raster-scan system displays an object as a set of discrete points across
`each scan line.
`
`scan line, is called the horizontal retrace of the electron beam. And at the end of
`each frame (displayed in 1/80th to 1/60th of a second), the electron beam r~tums
`(vertical retrace) to the top left comer of the screen to begin the next frame.
`On some raster-scan systems (and in TV sets), each frame is displayed in
`two passes using an interlaced refresh procedure. In the first pass, the beam
`sweeps across every other scan line from top to bottom. Then after the vertical re(cid:173)
`trace, the beam sweeps out the remaining scan lines (Fig. 2-8). Interlacing of the
`scan lines in this way allows us to see the entire screen displayed in one-half the
`time it would have taken to sweep across all the lines at once fro