0% found this document useful (0 votes)
4 views33 pages

CHAPTER 2 - Graphics Hardware

Chapter 2 discusses graphics hardware, detailing components like graphics cards and GPUs that enable the generation and display of computer graphics. It covers various display systems, including random-scan and raster-scan displays, and introduces the 3D graphics pipeline, which transforms 3D objects into 2D images. The chapter also explains the Z-buffer technique for hidden surface removal, ensuring that only visible surfaces are rendered in a 3D scene.

Uploaded by

kaleb teshome
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views33 pages

CHAPTER 2 - Graphics Hardware

Chapter 2 discusses graphics hardware, detailing components like graphics cards and GPUs that enable the generation and display of computer graphics. It covers various display systems, including random-scan and raster-scan displays, and introduces the 3D graphics pipeline, which transforms 3D objects into 2D images. The chapter also explains the Z-buffer technique for hidden surface removal, ensuring that only visible surfaces are rendered in a 3D scene.

Uploaded by

kaleb teshome
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER 2

Graphics Hardware
Sub section
• 2.1 Graphics Hardware
• 2.2 Raster Display Systems
• 2.3 Introduction To The 3D Graphics Pipeline
• 2.4 The Z Buffer For Hidden Surface Removal
Graphics Hardware
• Graphics hardware is computer hardware that enables
computers to produce and show computer graphics.
• Graphics hardware - is computer hardware that generates
computer graphics and allows them to be shown on a display,
usually using a graphics card with a device driver to create
the images on the screen.
• The expected output of the graphics is done with the help
of Graphics hardware and software
• It works in conjunction with graphics software. Examples of
graphics hardware are display devices, graphics processing
units, graphics cards and motion capture hardware.
• A graphics processing unit (GPU) is a specialized electronic
circuit initially designed to accelerate computer graphics
and image processing (either on a video card or embedded on
motherboards, mobile phones, personal computers,
workstations, and game consoles).
• A graphics card (also called a video card, display card, graphics
adapter, VGA card/VGA, video adapter, display adapter, or
colloquially GPU) is a computer expansion card that generates a
feed of graphics output to a display device such as a monitor.
• Graphics cards are sometimes called discrete or dedicated
graphics cards to emphasize their distinction to integrated
graphics processor on the motherboard or the CPU.
• A graphics processing unit (GPU) that performs the necessary
computations is the main component in a graphics card, but the
acronym "GPU" is sometimes also used to erroneously refer to
the graphics card as a whole.
CRT(Cathode Ray Tube)
Electron Gun
• Electron gun consisting of a series of elements, primarily a
heating filament (heater) and a cathode.
• With the help of heater and a cathode, it generates
negatively charged electrons and accelerated toward
phosphors screen then you will be able to see the image.
• The electron gun creates a source of electrons which are
focused into a narrow beam directed at the face of the
CRT.
Focusing system
• It is used to create a clear picture by focusing the
electrons into a narrow beam.
• Used to force the electron beam to converge to small spot
on screen. This focusing can be either by a means of electric
or magnetic field.
Deflection Yoke
•It is used to control the direction of the electron beam.
•It creates an electric or magnetic field which will bend the
electron beam as it passes through the area.
Phosphorus-coated screen:
• The inside front surface of every CRT is coated with
phosphors.
• Phosphors glow when a high-energy electron beam hits them.
• Phosphorescence is the term used to characterize the light
given off by a phosphor after it has been exposed to an
electron beam
Display Systems
random-scan display (Vector)
• Random-scan monitors draw a picture one line at a time.
• It uses an electron beam which operates like a pencil to create a
line image on the CRT screen.
• Refresh rate on a random-scan system depends on the number of
lines to be displayed.
• vector displays generally have higher resolution than raster
systems.
• produce smooth line drawings because the CRT beam directly
follows the line path.
• The picture is constructed out of a sequence of straight-
line segments.
• Each line segment is drawn on the screen by directing the
beam to move from one point on the screen to the next,
where its x & y coordinates define each point.
• After drawing the picture, the system cycles back to the
first line and design all the lines of the image 30 to 60 time
each second
Random-scan monitors are also known as vector displays or
stroke- writing displays or calligraphic displays
Advantages
•A CRT has the electron beam directed only to the parts of
the screen where an image is to be drawn.
•Produce smooth line drawings.
•High Resolution
Disadvantages
•Random-Scan monitors cannot display realistic shades
scenes
Raster Scan Display
• A Raster Scan Display is based on intensity control of pixels
in the form of a rectangular box called Raster on the
screen.
• Here, 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 turned on and off to create a pattern of
illuminated spots.
• Picture definition is stored in a memory area called Refresh
Buffer or Frame Buffer
• This memory area holds intensity values for all screen
points.
• Stored intensity values are restored from frame buffer and
painted on screen taking one row at a time.
• Each screen point is referred to as pixels
• Refresh: the Electron gun needs to come
back to hit the pixel again before it fades out
• An appropriate refresh rate depends on the
property of phosphor coating
• Typical refresh rate: 60-80 times per
second(Hz)
Frame Buffer
• Frame buffer: the memory to hold the pixel intensity values
• The properties of a frame buffer that affect the graphics
performance:
• Size: screen resolution
• Depth: color level
• 1 bit/pixel: black and white
• 8 bits/pixel: 256 levels of gray
• 24 bits/pixel: 16 million colors (true color)
• Speed: refresh speed
• Size of Frame Buffer depends on the 'depth' for each
pixel
• The more color you want, the more bits you will need for
each pixel
• Exercise: 1024 x 1280 screen with 24 bits per pixel, how
large is the frame buffer?
• 1024 x 1280 x 24 / 8 = 3.9M Byte
Types of Scanning in Raster Scan
• Interlaced scanning, each horizontal line of the screen is
traced from top to bottom, due to which fading of display of
object may occur.
• In this system odd numbered lines are traced or visited by
an electron beam, then in the next cycle, even number of
lines are located.
• For interlaced display refresh rate of 60 frames per second
is used.
Non-interlaced Scanning(Prograssive)
-It does the whole job in one pass, tracing each row consecutively.
•Refresh rate of 30 frames per second used. But it gives flickers.
3D Graphics Pipeline
• The 3D Viewing Pipeline is the sequence of steps used to
convert a 3D object in a scene into the final 2D image that
appears on your screen.
It is sometimes called the Viewing Transformation Pipeline
or the Rendering Pipeline (Geometry part).
• It explains how a point moves through different coordinate
systems:
Model → World → Eye → Clip → NDC → Screen
• Note: NDC: Normalized Device Coordinate
3D Graphics Pipeline

Model Viewing
Transformation Transformation
Model 3D World 3D Eye
Coordinates Coordinates Coordinates

3D Clipping

Windows to
Viewport
Mapping Projection
2D Screen 2D Eye Clipped Eye
Coordinates Coordinates Coordinates
1. 3D Model Coordinates → Model Transformation
• Model Coordinates
These are coordinates defined in the object’s own local space.
Example: A cube model is defined around (0,0,0) in its own
coordinate system.
• Model Transformation
This step moves the object from its local space into the world:
• Translate (move)
• Rotate
• Scale
Output: 3D World Coordinates
The object is now positioned correctly in the scene.
2. 3D World Coordinates → Viewing Transformation
• World Coordinates
This describes all objects placed in the shared 3D world.
• Viewing Transformation (also called Camera Transformation)
This transforms the world so that the camera becomes the origin of the
coordinate system.
It applies:
• Camera position
• Camera orientation
• It uses the View Matrix.
Output: 3D Eye Coordinates (or View Coordinates)
Now everything is expressed relative to the camera.
3. 3D Eye Coordinates → 3D Clipping
• Eye Coordinates
Points relative to the camera.
• Clipping
Only the part of the scene inside the viewing volume (frustum) is
kept.
• Anything outside the camera frustum is removed
• Saves performance and avoids drawing invisible objects
Output: Clipped Eye Coordinates
4. 3D Eye Coordinates → Projection
• Projection transforms the 3D scene into a 2D representation.
• Two types:
• Perspective Projection
• Far objects appear smaller
• Mimics human vision
• Orthographic Projection
• No perspective distortion
• Used in CAD and engineering drawings
• This uses the Projection Matrix.
• Output: 2D Eye Coordinates (Normalized Device Coordinates)
Depth (z) is kept for depth testing.
5. 2D Eye Coordinates → Window-to-Viewport Mapping
• This step converts normalized 2D positions into actual pixel
positions on your screen.
• Maps from normalized space (–1 to +1)
• To the viewport rectangle (e.g., 800×600 pixels)
• Applies scaling to screen size
• Handles aspect ratio
• Output: 2D Screen Coordinates
• This is where pixels are finally drawn.
Stage Input Process Output

Model Transformation Object coordinates Translate/rotate/scale World coordinates


Viewing
World coordinates Apply camera Eye coordinates
Transformation
Clipping Eye coordinates Remove invisible parts Clipped coordinates

Projection Eye coordinates Perspective/orthographic NDC

Viewport Mapping NDC Convert to pixels Screen coordinates


The Z Buffer For Hidden Surface Removal

• The Z-Buffer (also called Depth Buffer) is a computer


graphics technique used to determine which surfaces or
objects are visible in a 3D scene and which ones are hidden
behind others.
• It ensures that the pixel closest to the camera is the one
that appears on the screen.
• In a 3D scene:
• Many objects overlap
• Some triangles lie behind others
• We must draw only the visible parts
• Without hidden-surface removal, the image would look wrong
because farther objects might be drawn over closer ones.
• The Z-buffer solves this problem automatically and
efficiently.
• When object description is converted to projection
coordinates (x, y, z). Each pixel position in view plan is
specified by x and y coordinates and z value gives the depth
information.
• Thus the object depth can be compared by comparing the z-
values.
• Z-buffer algorithm is usually implemented in the normalized
coordinates. So that the z value range from 0 at back
clipping plane to 1 at front clipping plane
• This implementation needed another buffer memory called
Z-buffer along with the frame buffer for raster display
devices.
• •Z-buffer is used to store depth values for each pixel place
in (x, y) position as surfaces are processed.
• •Frame buffer stores the intensity value of each pixel
How it Works
• At the beginning Z-buffer is initialized to infinite and frame
buffer is initialized to the back ground color.
• •Calculating the depth value (z) at each (x, y) pixel position
at the scan time and calculated depth value is compared to
previously stored in the z-buffer at that position.
• •If the calculated depth value is lesser than the value
stored in the z- buffer then the calculated z-value is stored
to the z-buffer to determine the visible surface
Pseudocode
Initialize Z-buffer to +infinity
Initialize Framebuffer to background color
For each polygon P:
Determine pixels (x, y) inside P
For each pixel (x, y):
Compute depth value z at (x, y)
If z < Z-buffer[x, y] then
Z-buffer[x, y] = z
Framebuffer[x, y] = color(P)
End If
End For
End Of Chapter

You might also like