Likes

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.

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 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. 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). 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. Example: textbackground(2); Or //changes background color to blue text background(BLUE);
v). text color (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();
}

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


Assignment: TB (Compulsory)

1. What is the need for computer graphics?
Ans:-Computers have become a powerful tool for the rapid and economical production of pictures. Computer Graphics remains one of the most exciting and rapidly growing fields. Old Chinese saying “ One picture is worth of thousand words” can be modified in this computer era into “ One picture is worth of many kilobytes of data”. It is natural to expect that graphical communication, which is an older and more popular method of exchanging information than verbal communication, will often be more convenient when computers are utilized for this purpose. This is true because one must represent objects in two-dimensional and three-dimensional spaces. Computer Graphics has revolutionized almost every computer-based application in science and technology.

2. What is graphics processor? Why it is needed?
Ans:-To provide visual interface, additional processing capability is to be provided to the existing CPU. The solution is to provide dedicated graphic processor. This helps in managing the screen faster with an equivalent software algorithm executed on the CPU and certain amount of parallelism can be achieved for completing the graphic command. Several manufacturers of personal computers use a proprietary graphic processor. For example, Intel 82786 is essentially a line drawing processor; Texas Instruments 43010 is a high performance general-purpose processor.


3. What is a pixel? Pixel (picture element): 
Ans:-Pixel may be defined as the smallest size object or color spot that can be displayed and addressed on a monitor. Any image that is displayed on the monitor is made up of thousands of such small pixels. The closely spaced pixels divide the image area into a compact and uniform two-dimensional grid of pixel lines and columns.

4. Why C language is popular for graphics programming?
Ans:-Turbo C++ is for C++ and C programmers. It is also compatible with ANSI C standard and fully supports Kernighan and Ritchie definitions. It includes C++ class libraries, mouse support, multiple overlapping windows, Multi file editor, hypertext help, far objects and error analysis. Turbo C++ comes with a complete set of graphics functions to facilitate preparation of charts and diagrams. It supports the same graphics adapters as turbo Pascal. The Graphics library consists of over 70 graphics functions ranging from high level support like facility to set view port, draw 3-D bar charts, draw polygons to bitoriented functions like get image and put image. The graphics library supports numerous objects, line styles and provides several text fonts to enable one to justify and orient text, horizontally and vertically. It may be noted that graphics functions use far pointers and it is not supported in the tiny memory model.


5. Define resolution.
Resolution: Image resolution refers as the pixel spacing i.e. the distance from one pixel to the next pixel. A typical PC monitor displays screen images with a resolution somewhere between 25 pixels per inch and 80 pixels per inch. Pixel is the smallest element of a displayed image, and dots (red, green and blue) are the smallest elements of a display surface (monitor screen). The dot pitch is the measure of screen resolution. The smaller the dot pitch, the higher the resolution, sharpness and detail of the image displayed.

6. Define aspect ratio.
Aspect ratio: The aspect ratio of the image is the ratio of the number of X pixels to the number of Y pixels. The standard aspect ratio PCs is 4:3, and some use 5:4. Monitors are calibrated to this standard so that when you draw a circle it appears to be a circle and not an ellipse.


7. Why refreshing is required in CRT?
Ans:-When the electron beam strikes a dot of phosphor material, it glows for a fraction of a second and then fades. As brightness of the dots begins to reduce, the screen-image becomes unstable and gradually fades out. In order to maintain a stable image, the electron beam must sweep the entire surface of the screen and then return to redraw it number of times per second. This process is called refreshing the screen. If the electron beam takes too long to return and redraw a pixel, the pixel begins to fade results in flicker in the image. In order to avoid flicker the screen image must be redrawn sufficiently quickly that the eye cannot tell that refresh is going on. The refresh rate is the number of times per second that the screen is refreshed. Some monitor uses a technique called interlacing for refreshing every line of the screen. In the first pass, odd-numbered lines are refreshed, and in the second pass, even –numbered lines are refreshed. This allows the refresh rate to be doubled because only half the screen is redrawn at a time.


8. Name the different positioning devices.
Ans:-The devices discussed so far, the mousethe tabletthe joystick are called “positioning devices”. They are able to position the curser at any point on the screen. (We can operate at that point or the chain of points) Often, one needs devices that can “point” to a given position on the screen. This becomes essential when a diagram is already there on the screen, but some changes are to be made. So, instead of trying to know its coordinates, it is advisable to simply “point” to that portion of the picture and asks for changes. The simplest of such devices is the “light pen”. Its principle is extremely simple.

9. What are pointing devices?
Ans:-A pointing device is an input interface (specifically a human interface device) that allows a user to input spatial (i.e., continuous and multi-dimensional) data to a computer. CAD systems and graphical user interfaces (GUI) allow the user to control and provide data to the computer using physical gestures — point, click, and drag — for example, by moving a hand-held mouse across the surface of the physical desktop and activating switches on the mouse. Movements of the pointing device are echoed on the screen by movements of the pointer (or cursor) and other visual changes.

10. What is multimedia?
Ans:-The word ‘Multimedia’ seems to be everywhere nowadays. The word multimedia is a compound
of the Latin prefix ‘multi’ meaning many, and the Latin-derived work ‘media’, which is the plural
of the world medium. So multimedia simply means ‘using more than one kind of medium’.
Multimedia is the mixture of two or more media effects-Hypertext, Still Images, sound, Animation and Video to be interacted on a computer terminal.

11. What are sound cards?
Sound cards: The first sound blaster was an 8-bit card with 22 KHz sampling, besides being equipped with a number of drives and utilities. This became a king of model for the other sound cards. Next came the Sound Blaster Pro, again 8-bit sound but with a higher sampling rate of 44 KHz, which supports a wider frequency range. Then there was Yamaha OPL3 chipset with more voices. Another development was built-in CD ROM interface through which huge files could be played directly via the sound card.

12. What is sampling?
Sampling: Sampling is like breaking a sound into tiny piece and storing each piece as a small, digital sample of sound. The rate at which a sound is “Sampled” can affect its quality. The higher the sampling rate (the more pieces of sound that are stored) the better the quality of sound. Higher quality of sound will occupy a lot of space in hard disk because of more samples.

13. What is morphing?
Morphing: The best example would be the Kawasaki advertisement, where the motorbike changes into a cheetah, the muscle of MRF to a real muscle etc.. Morphing is making an image change into another by identifying key points so that the key point’s displacement, etc. are taken into consideration for the change.

14. What is rendering?
 Rendering: The process of converting your designed objects with texturing and animation into an image or a series of images is called rendering. Here various parameters are available like resolution, colors type of render, etc.

15. What is warping?
Warping: Certain parts of the image could be marked for a change and made to change to different one. For examples, the eyes of the owl had to morph into the eyes of cat, the eyes can alone be marked and warped.

16. Why we use scanner?
Photographs, illustrations, and paintings continue to be made the old fashioned way, even by visual artists who are otherwise immersed in digital imaging technology. Traditional photographs, illustrations, and paintings are easily imported into computers through the use of a device called a scanner. A Scanner “scans’” over an image such as photo, drawing, logo, etc, converting it into an image and it can be seen on the screen. Using a good paint programme, Image Editor we can do adding, removing colors, filtering, Masking color etc.


17. What is ganut in Photoshop?
Write yourself…


18. What is a layer?
The concept of layering is similar to that of compositing as we make the different layers by keying out the uniform color and making it transparent so that layer beneath becomes visible. In case of future modifications we will be able to work with individual layers and need not work with the image as a whole.


19. What are editing tools? Why it is needed?
You can use the editing tools to draw on a layer, and you can copy and paste selections to a layer.
Many types of editing tools are:-
i).Eraser tool: The eraser tool changes pixels in the image as you drag through them. You can choose to change the color and transparency of the affected pixels, or to revert the affected area to its previously saved version.
ii).Smudge tool: The smudge tool simulates the actions of dragging a finger through wet paint. The tool picks up color from where the stroke begins and pushes it in the direction in which you drag.

20. What is file format?
File Format: When you create an image-either through scanning into your computer or drawing it from scratch on your monitor or captured through a camera, recorded voice or music from the two-in-one or recorded connecting a music instrument it must be saved to your disk. Otherwise it would become an ethereal artifact that could never again be seen or listened. Once the computer’s power is turned off, it’s gone forever unless it is saved. The method by which the software organizes the data in the saved file is called the file format.


No comments: