You are on page 1of 3

BSC-IT 5TH SEM ASSIGNMENT BSIT (TA) 51 (GRAPHICS & MULTIMEDIA)

Assignment: TA (Compulsory)
Subject: Graphics and multimedia
1.What is the meaning of interactive computer graphics? List the various applications of the
computer graphics.
The term interactive graphics refers to devices and systems that facilitate the man-machine graphic
communication, in a way, which is more convenient than the writing convention. For example, to draw a
straight line between two points, one has to input the coordinates of the two end points. In interactive
graphics with the help of graphical input technique by indicating two end points on the display screen
draws the line.
Various applications of the computer graphics are listed below :i). Building Design and Construction ii). Electronics Design iii). Mechanical Design iv). Entertainment
and Animation v). Aerospace Industry vi). Medical Technology vii). Cartography viii). Art and
Commerce.
2. Explain in detail the Hardware required for effective graphics on the computer system.
The hardware components required to generate interactive graphics are the input device, the outputdevice
(usually display) and the computer system. The human operator is also an integral part of the interactive
system. The text and graphics displayed act as an input to the human vision system and, therefore, the
reaction of the human being will depend on how quickly one can see and appreciate the graphics present
on the display.
3. Compare Raster scan system with random scan system.
Raster scan 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. The picture definition is stored in a memory area called the refresh buffer
or frame buffer. Each point on the screen is called pixel. On a black and system with one bit per pixel, the
frame buffer is called bitmap. For systems with multiple bits per pixel, the frame buffer is referred to as a
pix map.Refreshing on raster scan display is carried out at the rate of 60 to 80 frames per second.
Random scan display When operated as a random-scan display unit, a CRT has the electron beam directed
only to the parts of the screen where a picture is to be drawn. Random scan monitors draw a picture one
line at a time and for this reason they are also referred as vector displays (or stroke-writing or calligraphic
displays). The component lines of a picture can be drawn and refreshed by a random-scan system in any
specified order. A pen plotter operates in a similar way and is an example of a random-scan.
4. How many colors are possible if a. 24 bits / pixel is used b. 8 bits / pixel is used Justify your
answer?
a). 24 bit color provides 16.7 million colors per pixels, That 24 bits are divided into 3 bytes; one each for
the read, green, and blue components of a pixel.
b). 256, 8 bits per pixel = 2^8 colours.
Widely accepted industry standard uses 3 bytes, or 24 bits, per pixel, with one byte for each primary color
results in 256 different intensity levels for each primary color. Thus a pixel can take on a color from 256 X
256 X 256 or 16.7 million possible choices. In Bi-level image representation one bit per pixel is used to
represent black-and white images. In gray level image 8 bits per pixel to allow a total of 256 intensity or
gray levels. Image representation using lookup table can be viewed as a compromise between our desire to
have a lower storage requirement and our need to support a reasonably sufficient number of simultaneous
colors.
5. List and explain different text mode built-in functions of C Programming language.
The different text mode built-in functions of C Programming language are listed below :-

i). textmode( int mode); This function sets the number of rows and columns of the screen, mode variable
can take the values 0, 1, 1, or 3. 0: represents 40 column black and white 1: represents 40 column color 2:
represents 80 column black and white 3: represents 80 column color
ii). clrscr(); This function clears the entire screen and locates the cursor on the top left corner(1,1)
iii). gotoxy(int x, int y); This function positions the cursor to the location specified by x and y. x
represents the row number and y represents the column number.
iv). text background (int color); This function changes the background color of the text mode. Valid colors
for the CGA are from 0 to 6 namely BLACK, BLUE, GREEN, CYAN, RED, MAGENTA and BROWN.
v). text color (int color); This function sets the subsequent text color numbered between 0 to 15 and 128
for blinking.
vi). delline (); It is possible to delete a line of text and after the deletion all the subsequent lines will be
pushed up by one line
vii). insline() Inserts a blank line at the current cursor position
6. Write a C program to create Indian national flag.
#includegraphics.h
#includeconio.h
void main()
{
int gd=DETECT,gm,x,y;
initgraph(&gd,&gm,c:\\tc\\bgi);
x=getmaxx();
y=getmaxy();
clearviewport();
setfillstyle(LINE_FILL,BLUE);
bar(0,0,639,479);
setcolor(6);
rectangle(50,50,300,200);
setfillstyle(SOLID_FILL,6);
bar(50,50,300,100);
setfillstyle(SOLID_FILL,WHITE);
bar(50,100,300,150);
setfillstyle(SOLID_FILL,GREEN);
bar(50,150,300,200);
setcolor(BLUE);
rectangle(45,45,50,300);
setfillpattern(020,MAGENTA);
bar(45,45,50,400);
setcolor(BLUE);
circle(175,125,25);
line(175,125,200,125);
line(175,125,175,150);
line(175,125,150,125);
line(175,125,175,100);
line(175,125,159,107);
line(175,125,193,143);
line(175,125,159,143);

line(175,125,193,107);
setcolor(YELLOW);
rectangle(0,0,640,43);
setfillstyle(SOLID_FILL,YELLOW);
bar(0,0,640,43);
setcolor(BLACK);
settextstyle(1,HORIZ_DIR,5);
outtextxy(150,0,INDIAN FLAG);
getch();
}

You might also like