Professional Documents
Culture Documents
PD303 L3
PD303 L3
2
3.2 Hardware for Computer Graphics
• Display devices
• Hardcopy devices
• Interface devices
Display devices
Cathode Ray Tube (CRT) of the raster-scan type.
(Vector display devices [random scan] were popular only
up to 1980’s).
→ Raster scan principle is based on controlling intensity of
each pixel on the screen of the display device, like in TV.
→ The display receive information on the status of pixels
from a display memory or frame buffer
→ In the case of monochrome, each pixel can be
represented by a single bit with 0 black and 1 white or
vice versa.
3
Hardware for Computer Graphics (continuation)
• modern TV monitors
• calculators
• pocket video games
• laptop computers
• wrist watches etc.
5
Hardware for Computer Graphics (continuation)
9
→ Joystick
• A Joystick is a vertical level mounted on a base that is
used to steer the screen cursor around.
• Most joysticks select screen positions with actual
movement of the stick, but others respond to the
pressure on the stick
→ Digitizer
• A device for drawing, painting or interactively select
coordinate positions on an object.
• Can be used to input coordinate values in 2D or 3D
space.
• Typically a digitizer is used to scan over a drawing or
object and input a set of discrete coordinate positions.
• One type of digitizer is the graphics tablet which is used
to input 2D coordinates by activating a hand cursor or
stylus at selected positions on a flat surface.
• A hand cursor contains a cross hair for sighting
positions, while a stylus is a pencil shaped device that is
10
pointed at positions on the tablet.
3.3 Image generation in 2D computer graphics
11
Vector generation
→Many graphic systems display graphics
images as a collection of lines on the
screen
→Vector representation allows the display of
any geometric entity and simplifies image
manipulation
→The aim is to use a sufficient number of
lines so that the curve appears smooth.
The number of lines is controlled by
display tolerance
12
13
Mapping/Transformation
→Next step is to map or transform the vectors
from the model coordinates to the screen
coordinates of the display device. This is
accomplished using the concepts of windows
and viewports.
→Display control commands such as Zoom, Pan
etc may be selected to display only part of the
model
→A window may be defined as an imaginary
rectangular frame/boundary through which the
user looks into the model. Viewport is the area
on the screen which the contents of the window
are to be displayed as an image
14
Mapping/Transformation (Continuation)
→The task of generating a model is that of viewing
transformation or mapping from model
coordinate system to the screen coordinate
system
→A general case of transformation may also
involve some kind of rotation.
15
window
16
Viewport
17
• We can write expressions for the transformation of
point (Xw,Yw) in model coordinates to (Xs,Ys) in
screen coordinates as follows:
18
Values of a, b, c and d may be computed when the
window and viewport are defined, i.e.
19
Clipping:
When a window shows only part of the model,
vectors outside the window have to be
discarded. This is done by an operation called
clipping. Many algorithms for clipping have been
developed.
Drawing lines:
At this stage, the program has a collection of
streams of clipped transformed vectors to form
the image. All that remain is to draw them on the
display device.
• Line drawing on raster scan devices is done by
setting appropriate bits in the display memory
20