You are on page 1of 9

JOMO KENYATTA UNIVERSITY OF AGRICULTURE AND TECHNOLOGY

NAKURU CAMPUS.

NAME: WAGUMA LETICIA

REGNO: SCT221-COO7-0609-2016

UNIT NAME: COMPUTER GRAPHICS

UNIT CODE: ICS 2311

LECTURER NAME: JAIRUS OUNZA

CAT 1
(1) List the operating characteristics for the following (display technologies: raster
refresh systems, vector refresh systems, plasma panels, and .CDs.
Raster Refresh systems:
 The most common type of graphics monitor employing a CRT is the raster-scan
display, based on television technology.
 In raster-scan the electron beam is swept across the screen, one row at a time from
top to bottom. No of scan line per second is called horizontal scan rate.
 As 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 called frame buffer or refresh buffer.
Frame buffer holds all the intensity value for screen points.
 Stored intensity values are then retrieved from the frame buffer and “painted” on
the screen one row (scan line) at a time.
 Each screen point is referred to as a pixel or pel (picture element).
 Availability of frame buffer makes raster-scan display well suited for the realistic
display.
 Example: Monitors, Home television, printers.
Vector Refresh Systems:
 In random scan system, the CRT has the electron beam that is directed only to the
parts of the screen where the picture is to be drawn. It draws a picture one line at a
time, so it is also called vector display (or stroke writing or calligraphic display).
The component lines of a picture are drawn and refreshed by random scan system
in any specified order.
 The refresh rate of vector display depends upon the no of lines to be displayed for
any image.
 Picture definition is stored as a set of line drawing instructions in an area of
memory called the refresh display file (Display list or display file).
 To display a picture, the system cycles through the set of commands (line
drawing) in the display file. After all commands have been processed, the system
cycles back to the first line command in the list.
 Random scan systems are designed for drawing all component lines 30 to 60
times per second. Such systems are designed for line-drawing applications and
cannot display realistic shaded scenes. Since CRT beam directly follows the line
path, the vector display system produce smooth line.

Plasma Panels:
 Constructed by filling the region between two glass panels with a mixture of
gases that usually includes neon, a series of vertical conducting ribbons is placed
on one gas panel and a set of horizontal conducting ribbons is built into the other
glass panel.
 Picture definition is stored as a set of line drawing instructions in an area of memory
called the refresh display file (Display list or display file).
 To display a picture, the system cycles through the set of commands (line drawing) in the
display file. After all commands have been processed, the system cycles back to the first
line command in the list.

LCDs:
 Operating by producing a picture by passing polarized light from the surroundings
or from an internal light source through a liquid-crystal material that can be
aligned to either block or transmit the light.
 The surface of the CD contains one long spiral track of data. Along the track,
there are flat reflective areas and non-reflective bumps.
 A flat reflective area represents a binary 1, while a non-reflective bump represents
a binary 0. The CD drive shines a laser at the surface of the CD and can detect the
reflective areas and the bumps by the amount of laser light they reflect.
 The drive converts the reflections into 1s and 0s to read digital data from the disc.

(2) Suppose an RGB raster system is to be designed using an 8-inch? By 10-inch screen
with a resolution of 100 pixels per inch in each direction. If we want to store 6 bits
per pixel in the frame buffer, how much storage (in bytes) do we need for the frame
buffer?
Storage needed for the frame buffer is;
(8 inch x 100 pixels/inch) =800
×
(10 inch x 100 pixels/inch)=1000
800000 × 6 bits ÷ 8 bits per byte = 486 KB
(3) Implement the line-type function with a midpoint line algorithm to display either
solid, dashed, or dotted lines.

#include<stdio.h>
#include<graphics.h>
#include<math.h>
void main()
{
int gd=DETECT,gm,x,y,x1,y1,x2,y2,dx,dy,i,e;
float xinc,yinc;
initgraph(&gd,&gm,"");
cleardevice();
printf("Enter x1,y1,x2,y2:\n");
scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
dx=x2-x1;
dy=y2-y1;
if(x1<x2)
xinc=1;
else
xinc=-1;
if(y1<y2)
yinc=1;
else
yinc=-1;
x=x1;
y=y1;
if(dx>=dy)
{
e=(2*dy)-dx;
while(x!=x2)
{
if(e<0)
e=e+(2*dy);
else
{
e=e+(2*(dy-dx));
y=y+yinc;
y=y+yinc;
}
x=x+xinc;
x=x+xinc;
putpixel(x,y,WHITE);
}
}
else
{
e=(2*dx)-dy;
while(y!=y2)
{
if(e<0)
e=e+(2*dx);
else
{
e=e+(2*(dx-dy));
x=x+xinc;
x=x+xinc;
}
y=y+yinc;
y=y+yinc;
putpixel(x,y,WHITE);
}
}
getch();
closegraph();
restorecrtmode();
}

(4) Differentiate between Random and Raster Scan Display:

Random Scan Raster Scan

1. It has high Resolution 1. Its resolution is low.

2. It is more expensive 2. It is less expensive

3. Any modification if needed is easy 3.Modification is tough

4. Solid pattern is tough to fill 4.Solid pattern is easy to fill

5. Refresh rate depends or resolution 5. Refresh rate does not depend on the

6. Only screen with view on an area is displayed. 6. Whole screen is scanned.

7. Beam Penetration technology come under it. 7. Shadow mark technology came unde
8. It does not use interlacing method. 8. It uses interlacing

9. It is restricted to line drawing applications 9. It is suitable for realistic display.

(5) Prove that the multiplication and transformation matrices for each of the following
sequence of operations is commutative:

 Two successive rotations.

x' cos θ −sinθ 0 x


y' = sinθ cosθ 0 y
1 0 0 1 z

P’ = R1 *R2 *P

x' cos θ −sinθ 0 cos θ −sinθ 0 x'


y' = sinθ cosθ 0 sinθ cosθ 0 y'
1 0 0 1 0 0 1 1

x' cos θ −sinθ 0 xcos θ ysinθ 0


y' = sinθ cosθ 0 xsinθ ycosθ 0
1 0 0 1 0 0 1

cos θ −sinθ 0
= sinθ cosθ 0 xcos θ − ysinθ ¿ xsinθ ycosθ ¿ 0 1 ¿
0 0 1

x'
y' = cos θ (xcosθ− ysinθ)+¿ [ −sinθ (xsinθ+cosθ) ] +¿ 0 0 ¿ 0 ¿ 0 ¿ 1¿
1 ¿

x'
cos ⁡(θ+θ) −sin ⁡(θ+θ)
y' =
sin ⁡(θ+θ) cos ⁡(θ+ θ)
1
 Two successive translations.

x' 1 0 tx x
y' = 0 1 ty y
1 0 0 1 z

P’ = T1 * T2 * P

x' 1 0 tx 1 0 tx x'
y' = 0 1 ty 0 1 ty y'
1 0 0 1 0 0 1 1

x' 1 0 tx x 0 tx
y' = 0 1 ty 0 y ty
1 0 0 1 0 0 1

1 0 tx
x tx
= 0 1 ty
y ty
0 0 1

x tx tx
=
y ty ty

 Two successive scaling


P’ = S1 * S2 * P

x' Sx 0 0 x
y' = 0 Sy 1 y
1 0 0 1 z
x' Sx 0 0 Sx 0 0 x
y' = 0 Sy 1 0 Sy 1 y
1 0 0 1 0 0 1 z

x' Sx 0 0 X . Sx 0 0
y' = 0 Sy 1 0 Y . Sy 1
1 0 0 1 0 0 1

x' Sx 0 0 x . Sx
y' = 0 Sy 1 y . Sy
1 0 0 1 1

x . sx . sx
y . sy . sy
1

(6) Show that two successive reflections about either of the coordinate axes is equivalent to
a single rotation about the coordinate origin.

Two successive reflections about a single axis yields the identity matrix; i.e., the object is
returned to its original position. A reflection about one axis followed by a reflection about
the other axis is equivalent to a rotation of 180°, assuming that the reflection parameters
are either 1 or -1.

NB: These questions have been drawn from the computer graphics book that I gave you.

You might also like