Sunteți pe pagina 1din 3

C2 .. Explain the principle of DVST system. Ans.

The Direct View Storage Tube (DVST) behaves like a CRT with highly persistent phosphor. Pictures drawn on this screen will be seen for several minutes (4 0 -5 0 minutes) before fading. It is similar to a CRT as far as the electronic gun and phosphor-coated mechanisms are concerned. However, instead of the electron beam directly writing the pictures on the phosphor coated CRT screen, the writing is done with the help of a fine-mesh wire grid. The grid made of very thin, high quality wire is located with a dielectric and is mounted just before the screen on the path of the electron beam from the gun. A pattern of positive charges is deposited on the grid and this pattern is transferred to the phosphor coated CRT by a continuous flood of electrons. This flood of electrons is mounted by a "flood gun", which is separate from the electron gun that produces the main electron beam.1 . C2 .Compare the merits and demerits of raster and random scanning system. Ans. In raster scan display, the electron beam is swept across the screen, one row at a time from top to bottom. Random scan monitors draw a picture one line at a time and so they are also referred to as vector displays. <p>Refreshing on raster scan display is carried out at the rate of 6 0 to 8 0 -frames per second. Refresh rate on a random scan system depends on the number of lines to be displayed. <p>The picture definition is stored in a memory area called refresh buffer or frame buffer in case of a raster scan display. In case of random scan display, picture definition is stored as a set of line-drawing commands in an area of memory referred to as the refresh display file. Refresh display file is also called the display list, display program, or the refresh buffer C2 . Define pixel, resolution, and aspect ratio. Ans. Pixel can be defined as the smallest size object or color spot that can be displayed and addressed on a monitor. <p>Image resolution refers to pixel spacing that is the distance from one pixel to the next pixel. <p>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 for PCs is 4 : 3 and some use 5 : 4 . C2 . Explain the working of Light pen along with a diagram. Ans. Light pen has a very simple working. Every pixel on the screen that is a part of the picture emits light. All that the light pen does is to make use of this light signal to indicate the position. A small aperture is held against the portion of the picture to be modified and the light from the pixels falls on a photocell, after passing through the aperture. This photocell converts the light signal received from the screen to an electrical pulse to be sent as a signal sent to the computer. Since the electrical signal is rather weak, an amplifier amplifies it before being sent to the computer. <p>A "tracking software" keeps track of the position of the light pen always. Through the use of the tracking software, a signal received by the light pen at any point indicates the portion of the picture that needs to be modified. <p>Note that, when the pen is being moved to its position, to the position where the modification is required, it will encounter various other light sources on the way. These light sources should not trigger the computer to accept the signal. So the aperture of the light pen is normally kept closed till the final position is reached, and then it can be opened by a switch.

C3 . Develop a C program to draw a structure of a fish and give animation. Ans. #include<graphics.h> #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<dos.h> void main() { int gdriver=DETECT,gmode; int i; initgraph(&gdriver,&gmode,"e:\\tc\\bgi"); int max_y=getmaxy()/2 ; i=0 ; setcolor(BLUE); while(!kbhit()) { line(0 +i,max_y+3 0 , 0 +i,max_y-3 0 ); /*triangle*/ line(0 +i,max_y+3 0 , 3 0 +i,max_y); line(0 +i,max_y3 0 , 3 0 +i,max_y); ellipse(9 0 +i,max_y,0 , 3 6 0 , 6 0 , 3 5 ); circle(1 2 0 +i,max_y-5 , 5 ); i=i+3 ; if(i>=6 3 5 ) i=0 ; delay(1 0 0 ); cleardevice(); } getch(); closegraph(); } Inform the students that the path e:\\tc\\bgi should be changed according to the machine settings. The code given here has been tested on Turbo C 3 . 0 . C4 . What is multimedia? Ans. Multimedia can be defined as presentation of information with integration of multiple media elements that can be used on and manipulated by computer. This media includes graphic software, video, audio, animation software, and computer hardware such as CD players, scanners and cameras.

C3 List the different graphics functions along with example. Ans. C supports various graphics functions, such as: line(int x1 , int y1 , int x2 , int y2 ): This draws a line from position (x1 , y1 ) to (x2 , y2 ) Example: line(1 0 , 5 0 , 1 0 , 1 0 0 ); bar(int x1 , int y1 , int x2 , int y2 ): This draws a filled rectangle with diagonal from (x1 , y1 ) to (x2 ,y2 ) bar(1 0 , 2 5 , 1 0 0 , 7 5 ) circle(int x, int y, int r): This draws a circle with center at (x, y) and radius of r. Example: circle(5 0 , 5 0 , 1 0 ) arc(int x, int y, int start, int end, int r): This draws an arc of circle with the center at (x,y), radius r and start and end specified in degrees to mention the portion of the circle that forms the arc. Example: arc(1 0 0 , 1 0 0 , 0 , 9 0 , 2 0 ) draws the first quarter of the circle, arc with center (1 0 0 , 1 0 0 ) and radius 2 0 . C4 . Explain the meaning of the following terms: Morphing, Rendering, Wrapping. Ans. Morphing: It is the process of transformation of one image to another by the transformation and distortion of corresponding points in both the images. The best example will be Kawasaki advertisement where the motorbike changes into a cheetah. Rendering: The process of converting your designed objects with texturing and animation into an image or a series of images is called rendering. Wrapping: It is the process where certain parts of the image could be marked for a change and made to change to different one for example legs of cheetah to be morphed with the wheels and head with head lights. Head can alone be marked and wrapped.

C3 . Explain the use of getimage() and putimage() with examples? Ans. The getimage() function captures the image inside the rectangle whose diagonal is defined by (x1 , y1 ), and (x2 ,y2 ),where x1 , y1 , x2 , and y2 are the first four parameters of getimage(). The captured image is stored in an array, which is specified as the last parameter of getimage(). <p>For example, to capture a rectangle whose diagonal is defined by (1 0 , 5 0 ) and (5 0 , 1 2 5 ), you can use the getimage() function as: int area = imagesize(1 0 , 5 0 , 5 0 , 1 2 5 ); unsigned char * buf = malloc(arear); getimage(1 0 , 5 0 , 5 0 , 1 2 5 , buf); The putimage() function copies the image captured using getimage(), starting at location (x, y), where x and y are the first two parameters of this function. The image to be captured is specified as the third parameter. The fourth parameter of this function specifies how the image has to be copied and takes any of the following values: COPY_PUT or 0 , which copies the image as it is XOR_PUT or 1 , which performs an exclusive OR between the background pixels and the image pixels OR_PUT or 2 , which performs an inclusive OR between the background pixels and the image pixels AND_PUT or 3 , which performs an AND between the background pixels and the image pixels NOT_PUT or 4 , which inverts the pixels of the image. <p>For example, animate a rectangle as it is you can use the COPY_PUT option in putimage: putimage(1 0 , 5 0 , buf, COPY_PUT);

C4 . What is animation? Explain different types of animation techniques. Ans. Animation is the process in which each frame of a film or movie is produced individually and viewed in rapid succession to give an illusion of continuous movement. On PCs the two main types of animation techniques are as follows: Object animation: Is the moment of unchanged text and object around the screen Cell animation/Frame animation: Is made of different frames on screen where they are rapidly displayed to simulate motion. C5 . What are editing Tools? Ans. Editing tools are used to fine-tune or modify graphic elements. Photoshop delivers high-powered image editing, photo retouching, and composition tools. It also supports features, such as Making Color Adjustments, Auto Color Command, Adjustment Layers and Fill Layers, and Masking Layers to help you get professional-quality results.C5 . What is File Format? Name the different image file formats? Ans. The method by which the software organizes the data in the saved file is called the file format. The file name extension or suffixes indicate the format or usage of a file and a brief description of that format. Several different types of file format are used by various kind of software to save files. For example, the GIF file format used for Web page images are standard formats that can be opened by any program that supports it. <p>The various image file format are as follows: Tagged-Image File Format (TIFF) Graphics Interchange Format (GIF) Joint Photographic Experts Group (JEPG) Encapsulated PostScript (EPS) Portable Document Format (PDF) Portable Network Graphics (PNG) TGA- Targa

C5 . Give the steps to use rubber stamp tool. Ans. To use the rubber stamp tool (Clone tool), perform the following steps: 1 )Open the image that you want to clone. 2 )Select rubber stamp tool. 3 )Select an appropriate brush size and style from the Brush drop down in the options bar at the top. Also set values for other options such as blending mode, opacity, and flow. Determine how you want to align the sampled pixels. If you select Aligned, you can release the mouse button without losing the current sampling point. As a result, the sampled pixels are applied continuously, no matter how many times you stop and resume painting. If you deselect Aligned, the sampled pixels are applied from the initial sampling point each time you stop and resume painting. Select Use All Layers to sample data from all visible layers; deselect Use All Layers to sample only from the active layer. 4 )Press Alt and click the image that you want to clone, to select the source point for cloning. 5 )Use the brush to clone the image by dragging the mouse on another area. The image will be cloned in that area. 1 2 . What is 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.

C2 Explain the working of Light pen along with a diagram. Ans. Light pen has a very simple working. Every pixel on the screen that is a part of the picture emits light. All that the light pen does is to make use of this light signal to indicate the position. A small aperture is held against the portion of the picture to be modified and the light from the pixels falls on a photocell, after passing through the aperture. This photocell converts the light signal received from the screen to an electrical pulse to be sent as a signal sent to the computer. Since the electrical signal is rather weak, an amplifier amplifies it before being sent to the computer. <p>A "tracking software" keeps track of the position of the light pen always. Through the use of the tracking software, a signal received by the light pen at any point indicates the portion of the picture that needs to be modified. <p>Note that, when the pen is being moved to its position, to the position where the modification is required, it will encounter various other light sources on the way. These light sources should not trigger the computer to accept the signal. So the aperture of the light pen is normally kept closed till the final position is reached, and then it can be opened by a switch.

C2 . Explain briefly the working principle of Shadow mask CRT. Ans. The Shadow Mask CRT is based on the principle of combining the basic colors - red, green and blue. The shadow mask CRT, instead of using one electron gun, uses three different guns placed adjacent to each other to form a triangle or a "Delta". Each pixel point on the screen is made up of three types of phosphors to produce red, blue, and green colors. Just in front of the phosphor screen, is a metal screen, called a "shadow mask". This plate has holes placed strategically, so that the beams from the three electron guns are focused on particular colorproducing pixel only. <p>Now, unlike the beam penetration CRTs, the acceleration of the electron beam was being monitored, one can manipulate the intensity of the three beams simultaneously. If the red beam is made more intense, we get more of red color in the final combination etc. Since fine-tuning of the beam intensities is comparatively simple, we can get much more combination of colors than the beam penetration case.
6 . What are the different graphical input interactive techniques? Ans. Following are the various graphical input interactive techniques: 1 )Positioning 2 )Constraints 3 )Grids 4 )Gravity Field 5 )Rubber band methods 6 )Dragging

C3 . 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 , 6 3 9 , 4 7 9 ); setcolor(6 );rectangle(5 0 , 5 0 , 3 0 0 , 2 0 0 ); setfillstyle(SOLID_FILL,6 ); bar(5 0 , 5 0 , 3 0 0 , 1 0 0 );setfillstyle(SOLID_FILL,WHITE); bar(5 0 , 1 0 0 , 3 0 0 , 1 5 0 );setfillstyle(SOLID_FILL,GREEN); bar(5 0 , 1 5 0 , 3 0 0 , 2 0 0 ); setcolor(BLUE); rectangle(4 5 , 4 5 , 5 0 , 3 0 0 );setfillpattern(0 x2 0 ,MAGENTA); bar(4 5 , 4 5 , 5 0 , 4 0 0 ); setcolor(BLUE); circle(1 7 5 , 1 2 5 , 2 5 );line(1 7 5 , 1 2 5 , 2 0 0 , 1 2 5 ); line(1 7 5 , 1 2 5 , 1 7 5 , 1 5 0 ); line(1 7 5 , 1 2 5 , 1 5 0 , 1 2 5 ); line(1 7 5 , 1 2 5 , 1 7 5 , 1 0 0 ); line(1 7 5 , 1 2 5 , 1 5 9 , 1 0 7 ); line(1 7 5 , 1 2 5 , 1 9 3 , 1 4 3 ); line(1 7 5 , 1 2 5 , 1 5 9 , 1 4 3 ); line(1 7 5 , 1 2 5 , 1 9 3 , 1 0 7 ); setcolor(YELLOW); rectangle(0 , 0 , 6 4 0 , 4 3 ); setfillstyle(SOLID_FILL,YELLOW); bar(0 , 0 , 6 4 0 , 4 3 ); setcolor(BLACK); settextstyle(1 ,HORIZ_DIR,5 ); outtextxy(1 5 0 , 0 ,"INDIAN FLAG"); getch(); }

1.

What is the need for computer graphics?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 threedimensional spaces. Computer Graphics has revolutionized almost every computer-based application in science and technology.

C1 .Define resolution.Ans: 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 2 5 pixels per inch and 8 0 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.

Why C language is popular for graphics programming? 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 7 0 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.C3 . How can you make an object animate infinitely till you press the Enter key to exit? Ans: You can make an object animate till you hit a key using the kbhit() function. When this function is called it returns true if an input character is available in the read buffer for reading. If there is nothing to be read, it returns false. You can use this function as: int continue =1 ; while(continue) { if(kbhit()) { ch = getch(); if(ch ==2 7 ) break; } else { //animation code } }

4.

Give the steps to use the image printing utility of Photoshop? Ans. In Photoshop, you can print a complete image, selected area of an image, or even one or more layers. <p>To print a complete image, select File --> Print from the main menu (or press Ctrl + P). <p>Ensure that the All radio button is selected. You can also set the print resolution by selecting it from the Print Quality drop-down. After making the desired print settings click OK to print. <p>To print a selected area, make a selection in the image using the Rectangular Marquee tool and select File >Print. Select the Selection option button in the Print dialog box and click OK. <p>Note that by default, Photoshop prints all visible layers and channels. If you want to print just certain layers or channels, make them the only ones that are visible and then print. <p>You can also choose to print the filename, along with crop marks, registration marks and a caption along with the image. To set such options, select File >Page Setup in Photoshop 6 . <p>You can select the checkboxes if you want to include the corresponding options in the printed image: Caption: Selecting this checkbox will print a caption with the image. This caption can be set in the File Info dialog box. To open the File Info dialog box select File > File Info, and choose Caption from the Section drop-down list. Type a caption in the Caption text area and click OK . Calibration Bars: Select this checkbox to print the calibration and color bars for your image. A calibration bar is a row of 1 1 gray squares of different values. A color bar is a row of 1 1 colors. These bars can be helpful when trying to calibrate to a specific printer. This option is available only for a PostScript printer. Registration Marks: Select this checkbox to print a registration mark such as bull's eyes around the image. These marks can be helpful for aligning color separations. Corner Crop Marks: Select this checkbox to view horizontal and vertical lines around the corners of the image, defining where the image should be trimmed. Center Crop Marks: Select this checkbox to view the exact center of the image defined by two crossed lines. Labels: Select this checkbox to print the file name next to the image. You can also print the name of the appropriate color channel if you are using color separations. Negative: Select this checkbox to print an image that appears like a negative of the original image. With this option selected, the colors are reversed. Emulsion Down: Select this checkbox to print the image as a horizontal mirror image of the original image. Interpolation: Interpolation refers to a printer's ability to resample an image as they print it to improve its resolution. This option is useful in case of low-resolution images. <p>The buttons on the left side also present some useful options such as printing a border around the image and printing a background with the image.

9.

S-ar putea să vă placă și