You are on page 1of 6

Kuvempu University Assignments for B.Sc.(IT) & M.Sc.

(IT) Courses Subject: Graphics & Multimedia Subject Code: BSIT 51 Assignment: TA (Compulsory) 1. What is the meaning of interactive computer graphics? List the various applications of the computer graphics. Ans: 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 theinteractive 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 thegraphics present on the display.

3. Compare Raster scan system with random scan system.

In raster scan display, 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 refresh buffer or frame buffer. In 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. It draws a picture one line at a time and so it is

referred to as vector displays. Raster scan The Most common type of graphics monitor employing a CRT is the rasterscan 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. Some displays use interlaced refresh procedure. First, all points on the even numbered scan lines are displayed then all the points along odd numbered lines are displayed. This is an effective technique for avoiding flickering. 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, hard-copy device. Refresh rate on a random-scan system depends on the number of lines to be displayed. Picture definition is now stored as a set of line- drawing commands in an area of memory referred to as the refresh display file. Sometimes the refresh display file is called the display list, display program, or simply the refresh buffer.

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 Example: textmode(2); // sets the screen to 80 column black and white ii). clrscr(); This function clears the entire screen and locates the cursor on the top left corner(1,1) Example clrscr(); // clears the screen 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. Example: gotoxy(10,20) // cursor is placed in 20th column of 10th row iv). textbackground (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. Example: textbackground(2); Or //changes background color to blue textbackground(BLUE); v). textcolor (int color); This function sets the subsequent text color numbered between 0 to 15 and 128 for blinking. Example : textcolor(3); // set the next text color to Green 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 Example : /* deletes the 5th line*/ gotoxy (5,4); delline ( ); vii). insline() Inserts a blank line at the current cursor position Example: /* inserts line at the 3rd row */ gotoxy (3,5); insline ( );

6. Write a C program to create Indian national flag. #include"graphics.h" #include"conio.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(0x20,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(); }

Assignment: TB (Compulsory)

PART - A
1. What is the need for computer graphics? 2. What is graphics processor? Why it is needed? 3. What is a pixel ? 4. Why C language is popular for graphics programming? 5. Define resolution. 6. Define aspect ratio. 7. Why refreshing is required in CRT ? 8. Name the different positioning devices. 9. What are pointing devices? 10. What is multimedia? 11. What are sound cards? 12. What is sampling? 13. What is morphing ? 14. What is rendering? 15. What is warping? 16. Why we use scanner? 17. What is ganut in Photoshop ? 18. What is a layer? 19. What are editing tools? Why it is needed? 20. What is file format? Fill in the blanks: 21. _____________constitutes an integration of multiple media such as text, graphics, audio, video and animation elements. 22. _____________files are the micro son standard file format for storing waveform audio data. 23. The amount of data that can be transmitted from one computer to another in a given time frame is called_____________ 24. Computer graphics can be classified into_____________ and_____________. 25. _____________method is used to assign colors values to any new pixel, at the time of resampling. PART - B Answer any FIVE: 1. a) Briefly narrate the history of graphics hardware technology. b) What are the strengths of UNIX operating system? Explain. c) Give the different applications of computer graphics. 2. a) Compare the merits and demerits of raster and random scanning system. b) With neat diagram explain the working principle of shadow mark CRT. c) Explain the principle of DVST system. 3. a) What are the different graphical input interactive techniques? Explain. b) Explain the working principle of mouse. c) With neat diagram explain the working principle of light pen. 4. a) Compare the features of text and graphics mode.

b) With the help of an illustration explain how initgraph ( ) function works. c) Develop a c program to draw the structure of fish and give animation functions. 5. a) Develop a c program to draw the car shape and move the car using animation functions. b) List the different graphics functions along with example. c) Explain the use of getimage ( ) and putimage ( ) functions with example. 6. a) With illustration briefly narrate the origin and development of multimedia technology. b) Give different application of multimedia. c) How graphics helps in digital imaging ? Explain. 7. a) Explain how moving images are recorded in the hard disk. b) Explain how sound helps in multimedia. What are the major types of sound files? c) Explain different types of animation techniques. 8. a) Explain the significance of file extensions and file formats. b) Give the steps to use rubber stamp tool. c) Give the steps to use the image printing utility of Photoshop.

You might also like