Computer Graphics Chapter 2 Graphics Systems Development of

  • Slides: 46
Download presentation
Computer Graphics Chapter 2 Graphics Systems

Computer Graphics Chapter 2 Graphics Systems

Development of Hardware evolution had a greater influence in the development of Computer Graphics

Development of Hardware evolution had a greater influence in the development of Computer Graphics than software. In the early years interactive graphics was beyond the recourses of most organizations because of: the high cost of computer graphics hardware – a car cost a few thousand pounds whereas a computer cost several million pounds, the need for expensive computing recourses to support massive design databases, interactive picture manipulation, the difficulty of writing large, interactive programs at a time when both graphics and interaction where new to predominantly batch-oriented FORTRAN programmers, non-portable software – written for a particular display device without software-engineering principles and structured systems. Moving to new display devices necessitates expensive and timeconsuming rewriting of working programs. After the development of graphics-based personal computers (Apple Macintosh, IBM PC) hardware and software cost was driven down, and millions of graphics computers where sold for office and home use. 2

Video Display Devices w The primary output device in a graphical system is the

Video Display Devices w The primary output device in a graphical system is the video monitor. 3

Cathode-ray tubes (CRT) Focusing System Y deflect Base Phosphor x deflect Connector Pins Electron

Cathode-ray tubes (CRT) Focusing System Y deflect Base Phosphor x deflect Connector Pins Electron Gun Control grid voltage 4

Basic operations of a CRT Steps 1. The electron gun emits a beam of

Basic operations of a CRT Steps 1. The electron gun emits a beam of electrons (cathode rays). 2. The electron beam passes through focusing and deflection systems that direct it towards specified positions on the phosphor-coated screen. 3. When the beam hits the screen, the phosphor emits a small spot of light at each position contacted by the electron beam. Because the light emitted by the phosphor fades very quickly some method is needed for maintaining the screen picture. 4. Redraw the picture by quickly directing the electron beam back over the same screen points. 5

Phosphor Persistence Definition: The time from the initial light output to the moment when

Phosphor Persistence Definition: The time from the initial light output to the moment when has decayed to its 10%. There are different kind of phosphors for use in a CRT. Besides color, a major difference is their persistence – how long they continue to emit light after the CRT beam is removed. A phosphor with low-persistence is useful in animation. A high-persistence phosphor is useful for displaying highly complex, static pictures. Graphics monitors are usually constructed with a persistence in the range from 10 to 60 microseconds. 6

Brightness (Intensity) distribution of a phosphor spot on the screen The intensity is greater

Brightness (Intensity) distribution of a phosphor spot on the screen The intensity is greater at the center of the spot, and it decreases with Gaussian distribution out to the edges of the spot. Two illuminated phosphor spots are distinguishable when their separation is greater than the diameter at which a spot intensity has fallen to 60% of maximum (at the center of the spot). 7

Raster Scan Displays Developed in the early seventies. It is today's dominant hardware technology.

Raster Scan Displays Developed in the early seventies. It is today's dominant hardware technology. Almost all graphics systems are raster-based. A picture is produced as an array – the raster – of picture elements. This elements are called Pixels or Pels (Picture Elements). A pixel corresponds to a location, or small area, in the image. Collectively, the pixels are stored in a part of memory called the refresh buffer or frame buffer 8

9

9

Zooming Effects 10

Zooming Effects 10

Resolution The maximum number of points (pixels) that can be displayed without overlap on

Resolution The maximum number of points (pixels) that can be displayed without overlap on a screen is referred to as the resolution, and determines the detail that can be seen in an image. A more precise definition is the number of points per centimeter that can be plotted horizontally and vertically, although it is often simply stated as the total number of points in each direction (i. e. 1280 1024). The physical size of a graphics monitor, on the other hand, is given as the length (in inches) of the screen diagonal. 11

w The aspect ratio gives the ratio of vertical points to horizontal points necessary

w The aspect ratio gives the ratio of vertical points to horizontal points necessary to produce equallength lines in both directions on the screen. So 4: 3 (most common) means that a vertical line plotted with 4 points has the same length as a horizontal line plotted with 3 points. 12

Refresh Rate w Definition: The number of times per second the image is redrawn.

Refresh Rate w Definition: The number of times per second the image is redrawn. w The entire contents of the frame buffer are displayed on the CRT at a rate high enough to avoid flicker. This rate is called the refresh rate w For a human to see a steady image on most CRT displays, the same path must be retraced, or refreshed, by the beam at least 60 times per second. w Current raster-scan displays perform refreshing at the rate of 60 to 80 frames per second, although some systems now have refresh rates of up to 120 frames per second. w Refresh rates are described in units of cycles per second, or Hertz (Hz), where a cycle corresponds to one frame (i. e. a refresh rate of 60 frames per second = 60 Hz). 13

Refresh-rate for films and TV w The display technology on a monitor is different

Refresh-rate for films and TV w The display technology on a monitor is different from that of film. – A film projector can maintain the continues display of a film frame until the next frame is brought into view. – On a video monitor a phosphor spot begins to decay as soon as it is illuminated. w On films, below 24 frames per second, we can perceive a gap between successive screen images. – Old silent films show flicker because they where photographed at a rate of 16 frames per second. – When sound systems were developed in the 1920 s, motion picture film rates increased to 24 frames per second removing flickering. – Today TV refresh rate is 25 frames per second in Europe and 30 frames per second in the USA. 14

The depth (or intensity) of the frame buffer, defined as the number of bits

The depth (or intensity) of the frame buffer, defined as the number of bits that are used for each pixel, determines properties such as how many colors can be represented on a given system. 1 -bit-deep frame buffer allows 21 colors (black and white) 8 -bit-deep frame buffer allows 28 (=256) colors In full color systems (also called RGB-color systems), there are 24 (or more) bits per pixel in order to display sufficient colors to represent most images realistically. 15

Raster Scan Displays They are based on TV technology Refresh rate = 60 to

Raster Scan Displays They are based on TV technology Refresh rate = 60 to 80 frames per second. Note: Below 24 frames/second, eye detects flicker. Each screen point is visited every refresh cycle. Their capability to store intensity information for each screen point makes them well suited for the realistic display of scenes containing shading and color patterns. The frame-buffer with 1 -bit intensity is called a bitmap. The frame-buffer with multiple-bits intensity is called a pixmap. 16

Random-Scan (Vector) displays Vector stands for line. Developed in the mid-sixties and in common

Random-Scan (Vector) displays Vector stands for line. Developed in the mid-sixties and in common use until the mid-eighties. The electron beam is directed only to parts of the screen where the picture is to be drawn. Move. To (300, 800) Line. To (700, 800) Line. To (500, 300) Line. To (300, 800) 17

Random Scan Displays Picture is stored as a set of point- and line-drawing commands

Random Scan Displays Picture is stored as a set of point- and line-drawing commands with (x, y) or (x, y, z) endpoint coordinates, as well as character-plotting commands. Refresh rate depends on the number of lines to be displayed. To avoid flicker it must be at least 30 times per second (30 Hz). They are designed to draw all the component lines of a picture 30 to 60 times per second – more than 60 could burn the phosphor. High quality vector systems are capable of handling approximately 100, 000 lines at this refresh rate. They are designed for line drawing applications and cannot display realistic shaded images. 18

Raster Scan Vs Random Scan Ideal line drawing Raster scan Random scan 19

Raster Scan Vs Random Scan Ideal line drawing Raster scan Random scan 19

The Bit-map 1 -bit-deep frame-buffer 1 1 1 0 0 0 1 1 0

The Bit-map 1 -bit-deep frame-buffer 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 Frame buffer Pixels 20

Gray Level images n-bits per pixel produce 2 n gray levels. Many images use

Gray Level images n-bits per pixel produce 2 n gray levels. Many images use 8 -bits per pixel, i. e. 256 gray levels since it gives acceptable quality. 00 01 10 11 2 -bit per pixel 4 gray level Color image 8 -bit per pixel 256 gray level 1 -bit per pixel 2 gray levels Black & White 21

Color Images w Produce realistic images. w Cost of high-quality color displays has decreased.

Color Images w Produce realistic images. w Cost of high-quality color displays has decreased. w Cost of scanners that digitize color photos has decreased. Each pixel in a color image has a “color value” which is a combination of amounts of red, green and blue. Each pixel value is an ordered triple, such as (23, 14, 51), that prescribes the densities of the red, green and blue. Each value in the triple (RGB) has a certain number of bits, and color depth is the sum of 22 these values.

The Color Depth Many images have a color depth of eight (one byte), 3

The Color Depth Many images have a color depth of eight (one byte), 3 bits for the red and the green and 2 bits for the blue. Each pixel has one of 256 colors. In highest quality (true-color) images, have a color depth of 24, one byte for each component. This achieves the best color production the eye can perceive: More bits do not improve an image. However, such images require a lot of memory. A true-color image of 1, 080 1, 024 pixels requires over 3 million bytes. x pixel value y Color depth = 6 bits 26 (= 64) colors 23

Common Colors Color depth of three One bit for each component Color Value (triple)

Common Colors Color depth of three One bit for each component Color Value (triple) 0, 0, 0, 1, 0 0, 1, 1 1, 0, 0 1, 0, 1 1, 1, 0 1, 1, 1 Value Black Blue Green Cyan Red Magenta Yellow White 24

Flat Panel Displays All flat panel displays are raster refresh displays. Divided into two

Flat Panel Displays All flat panel displays are raster refresh displays. Divided into two categories: Active – light emitting discharge (e. g. Flat CRTs, Plasma-gas) Passive – light modulating (e. g. Liquid crystal) 25

Flat CRT Initially projecting the electron beam parallel to the screen and then reflecting

Flat CRT Initially projecting the electron beam parallel to the screen and then reflecting it through 90º. It has all the performance advantages of the conventional CRT. Available only in small sizes. 26

Liquid-Crystal Display (LCD) It is a flat panel display. It is a thin, lightweight

Liquid-Crystal Display (LCD) It is a flat panel display. It is a thin, lightweight display device. It has no moving parts. It consists of an electrically-controlled lightpolarising liquid trapped in cells between two transparent polarising sheets. An electric current passed through the liquid causes the crystals to align or not so that light can/cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass through or blocking the light. 27

CRT vs LCD w Physical Size, Weight – An LCD has one third the

CRT vs LCD w Physical Size, Weight – An LCD has one third the size of a CRT, and it is much lighter. w Display Size – LCDs are sized by their actual viewable diagonal measurement, but CRTs are not. E. g. the viewable area on a 17" LCD monitor will measure 17" diagonally, but the viewable area on a CRT monitor will only measure 16" diagonally. w Colours – Most CRT monitors are capable of displaying unlimited colours. Some LCD monitors are only capable of hundreds or thousands of colours, but many of the newer LCD's are capable of unlimited colours. w Resolution – CRT monitors are usually capable of displaying multiple video resolutions, each with the same quality. LCD monitors, however, usually have what is called a Native resolution, or the resolution that it displays best. The native resolution is generally the highest resolution that the LCD can display. 28

CRT vs LCD Viewing Angle –A CRT screen can be looked at from a

CRT vs LCD Viewing Angle –A CRT screen can be looked at from a very wide angle, practically from the side, but an LCD monitor typically has a smaller viewing angle. From the side, the image on an LCD screen can seem to disappear, or invert colours. Newer displays that are coming out have wider viewing angles. Brightness is not a concern with CRT monitors. LCD monitors have different levels of brightness. The brightness rating for an LCD monitor is commonly referred to as 'nits', and commonly range from 70 to 300 nits. The higher the nits, the brighter the display. Power Consumption and Radiation Emission – LCD monitors consume much less energy than CRT monitors. Secondly, CRT monitors are known to emit harmful radiation, whereas LCD monitors do not. Price – CRT monitors are more affordable than LCD monitors. However the LCD’s cost have come down quite a lot in the last 1 -2 years. An LCD monitor will cost more but will conserve energy in the long run. The energy savings may not be much for an individual user, but with a 29 corporation the energy savings might be more of an issue.

Thin Film Transistor (TFT) A type of LCD flat-panel display screen, in which each

Thin Film Transistor (TFT) A type of LCD flat-panel display screen, in which each pixel is controlled by from one to four transistors. The TFT technology provides the best resolution of all the flat-panel techniques. It is the most expensive display. TFT screens are active-matrix LCDs. 30

Animation is the process of creating images that appear to move. The illusion of

Animation is the process of creating images that appear to move. The illusion of movement is created by displaying a sequence of still images faster than a certain rate, which is around 24 images per second. This happens because when a single image is flashed at the eye, it is retained by the brain longer than it is actually registered on the retina. Thus, if the second image is flashed within a certain minimum time, the brain still retains the last image, and the two images are combined. When a series of images is flashed in rapid succession, the brain blends the images together and, if these images are slightly changed from one to the next, it results in the effect of continuous motion. The process of animation is very complex. In order to produce an animated film, 24 frames per second are required. This is equivalent to 1, 440 frames in one minute. A typical two hour animation film would then need 31 172, 800 individual frames.

Hand Animation Before computers were put to work as animation machines, each of these

Hand Animation Before computers were put to work as animation machines, each of these frames had to be drawn by hand, painted and photographed. Since animation is such a laborious task, it can be appreciated how computers have opened the door to a world of animation possibilities. In hand animation, characters are drawn on transparent "cells" that are laid on top of each painted background. It requires a different cell for each frame. The backgrounds, on the other hand, remain constant over many frames and need be drawn only once. This separation of character and background is fundamental to the economic production of animated cartoons. The characters are redrawn for every frame. If the background had to be redrawn as well, the cost would be astronomical. For this reason camera motion is limited to following the characters in the plane of the background or, occasionally, zooming into the background. A skilful zoom, combined with the correct reduction of scale for the character, can create the impression that the character is being followed into the background. A little more flexibility can be obtained by having several background layers laid on parallel glass plates. Thus, a layer of trees can move relative to a layer of sky and mountains 32 to give the effect of motion as the camera pans.

Computer Animation All the techniques of hand animation can, of course, be simulated in

Computer Animation All the techniques of hand animation can, of course, be simulated in a computer-assisted animation system. Many "paint" systems do exactly that. But if this is done, the system also inherits many of the limitations of the traditional method. More advanced systems use three-dimensional "models" within the computer and in this case backgrounds are not needed. The whole scene, including background objects such as trees and hills, is viewed by a "virtual camera" that can be moved anywhere and even rotated as it moves. Once the models have been created, every aspect of every scene can be redrawn, automatically, for every frame. This is still expensive, but the cost is one of machine time rather than human labor. As computers get faster and cheaper, the benefits of this approach will remain but the cost will disappear. The costs, therefore, are transferred from the creation of the image to the creation of the model and it is important that improved tools continue to 33 be provided to support this part of the process.

Light in Computer Graphics We do not deal with the wave nature of light.

Light in Computer Graphics We do not deal with the wave nature of light. Light sources have a fixed rate of intensity. Light travels in straight lines. A point source emits energy from a single location at one or more frequencies equally in all directions. More complex sources, such as a light bulb, can be characterized as emitting light 34 over an area.

Objects An object is a self-contained “thing” that has a structure (properties) and behavior

Objects An object is a self-contained “thing” that has a structure (properties) and behavior (methods and/or functions). Object primitives Points, lines, polygons, free-form surfaces, etc. that define the shape of the components of the object. Object attributes Line style, color or surface texture. Connectivity relationships and positioning data that describe how the components fit together. 35

Actors and Virtual Reality An actor is a special set of objects that can

Actors and Virtual Reality An actor is a special set of objects that can initiate an interaction with another object or actor through information exchange. A participant (human operator) has a visual representation within the environment and controls the behavior of one of the actors. Virtual Reality The participant “lives” in the virtual environment, sees with the “eyes” of the actor and “feels” as being the actor itself. The participant’s movements are captured 36 by a tracking system.

Input Devices Each device is more suitable for certain tasks than for others w

Input Devices Each device is more suitable for certain tasks than for others w Keyboard – Entering non-graphical data (i. e. text) 37

w Mouse • Used to select a location to the screen. • The motion

w Mouse • Used to select a location to the screen. • The motion of the roller at the bottom of the mouse is converted into signals sent back to the computer. w Optical Detector Mouse • Measure distance traveled by counting lines on a special pad. 38

w Trackball • Similar in use to the mouse. • Popular with portable computers

w Trackball • Similar in use to the mouse. • Popular with portable computers because they can be incorporated directly into the keyboard. • There exist various pressure-sensitive devices in keyboards that perform similar functions to the mouse and trackball. 39

w Light pen – If it is positioned on the face of the CRT

w Light pen – If it is positioned on the face of the CRT at a location, a signal is sent to the computer. – Not very popular as other devices. 40

w Joystick – The motion of the screen in two orthogonal directions is encoded

w Joystick – The motion of the screen in two orthogonal directions is encoded and integrated to identify a screen location. – Variable sensitive device – well suited for flight simulators and games. 41

w Spaceball – 3 D input device – Stick does not move but it

w Spaceball – 3 D input device – Stick does not move but it has pressure sensors (rotations). – 3 independent twists (translations). 42

w Z-mouse – 3 D input device – It has three buttons, a thumbwheel

w Z-mouse – 3 D input device – It has three buttons, a thumbwheel on the sided, a trackball on the top, and a standard mouse ball underneath. 43

w Data Glove – Used to grasp a “virtual” object. – Sensors detect hand

w Data Glove – Used to grasp a “virtual” object. – Sensors detect hand finger motions. 44

w Digitizers – 2 D or 3 D input devices. – Interactive selection of

w Digitizers – 2 D or 3 D input devices. – Interactive selection of coordinate positions on an object. – Wireframe models – rectangular grid 45

14, 05, 38, 02, , 25, 40, 13, 21, 45, 17, 1 1, 36,

14, 05, 38, 02, , 25, 40, 13, 21, 45, 17, 1 1, 36, 33, 31, 44, 35, 20, 10, 07, 43, 46