Professional Documents
Culture Documents
Get more stuff like.. Assignments, Documents, PC tips and tricks, Widescreen wallpapers,Learning videos,Open source software,Latest cool icons
packs,Important web links and whatever you want...
Follow
Welcome to..www.sslifehacker.blogspot.in
Home
Blog Archive
January (2)
December (7)
November (2)
October (1)
August (3)
May (4)
Question1-: Define computer Graphics? With illustration give meaning to the term
Interactive in computer Graphics.
April (9)
MENU ITEMS
4th sem
6 Sem KU Lab
Practical
Assignments
Answer-: MS-DOS has improved graphical interface in the form of MS-DOS shell. The
shell allows one to manage programs and switch between them, view the directory
structure of any disk, view the contents of several directories and navigate through files and
directories quickly.
Windows 3.x has a variety of factors: easy-to-use GUI, Multitasking, capability to access a
large amount of memory, integrated application environment, networking, extensive
hardware support, device independence, and DOS compatibility. These factors are
significant for users and developers.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
Cracking Pass
(2)
Documents
Downloads
GNIIT Sem C E
(1)
ibps
Icons Pack
Notification
PRACTICAL
solved Answer
-51 (1)
1/24
8/21/2014
UNIX has adopted to the new hardware architecture and application requirement by
incorporating new functionalities like distributed file system, X11 based GUIs,
Multithreading, distributability etc.
PASCAL and C are structured language, rich in expressive power and applicable to a wide
variety of users. Because of the rich set of graphical functions available in these languages
help in design of graphical applications .The code is small, fast, portable and flexible. C
has become a choice for todays professional, developers and also for Graphic
programming.
Mouse is a small handled box used to position the screen cursor. It has two wheels at right
angles to each other. Each of these wheels is connected to the shaft encode. For every
incremental rotation of the wheel, an electrical signal is produced by the shaft encode.
Track Ball Two orthogonal wheels controlling the potentiometers are given b y the tracker
ball. If the ball is moved at right angles to the direction of the wheels then that wheel is not
affected.
solved Answer
-52 (1)
solved Answer
-53 (1)
solved Answer
-54 (1)
solved Answer
-61 (1)
solved Answer
-62 (1)
solved Answer
-63 (1)
solved Answer
-64 (1)
RECENT POSTS
NIIT
How to Recove
Window s 7 Pas
Question3-: With the help of example the working principle of Cathode Ray Tube.
Answer-: Cathode ray tube is based on the simple concept that an electronic beam, when
hit a phosphorescent surface, produces a beam of light .Further, the beam of light itself
can be focused to any point on the screen by using suitable electronic/magnetic fields. The
direction and intensity of the fields will allow one to determine the extent of the deflection of
the beam. Further these electronic/magnetic fields can be easily manipulated by using
suitable electric fields with this background. The electron gun produces a stream of
electrons. The beam itself can be switched on/off easily by switching on/off the heating
system. The beam itself is focused towards the phosphor-coated screen. The point where
the beam hits the screen becomes phosphorescent and produces a speck of light.
explained how
recover the los
passw ord
usingBacktrack
Passw ord
Here i am going
introduce a new
named as Wind
Passw ord Kille.
Tw itter
Follow by Em ail
Email address..
Total Pageview s
1 2
Function
setpalatte()
putpixel ()
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
Syntax
setpalatte(int index,int color)
putpixel(int x,y,int color)
2/24
8/21/2014
getpixel()
moveto()
lineto()
line()
circle()
setcolor()
getpixel(int x,int y)
moveto(int x, y)
lineto(int x,int y)
lineto(int x1,int y1,int x2,inty2)
circle(int x, int y,radius)
setcolor(int color)
#include<std.h>
#include<conc.h>
#include<math.h>
#include<graphics.h>
void main()
{
int gd,gm;
char *buf;
gd=DETECT;
gm=4;
init graph(&gd,&gm, c:\\tc\\bgi);
cleardevice();
rectangle(320,20,320,160);
line(320,20,320,160);
setfillstyle(SOLID_FILL,LIGHTRED);
floodfill(280,90,getmaxcolor());
setfillstyle(SOLID_FILL,BLUE);
floodfill(360,90,getmaxcolor());
setcolor(WHITE);
circle(320,90,20);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(360,90,getmaxcolor());
restorecrtmode();
getch();
}
3/24
8/21/2014
restorecrtmode();
getch();
}
----------------------------------------------------------------Solutions to Chapter One Questions
8. What is the need for computer graphics?
Ans.
Graphical communication is an old and more popular method of exchanging information than verbal communication and is more
convenient when computers are utilized for this purpose.
As the volume of information increases, problem of storage arises. Also, in the 21st century people do not have time to read huge
number of pages. This problem was solved by computer graphics. This can be clearly understood with the help of an example
where twe want to present the performance of a factory since 1980. For this,we require a number of pages to render this large
volume of information related with financial, numerical and statistical information. It will take a lot of time to analyze such a long
report. We can easily represent this data in a pictorial form thus making it simple to understand. Pictures can represent a huge
database in the form of bar charts, pie charts, and so on.
Two other prominent applications of graphics are in the field of Computer Aided Design (CAD) and Computer Aided Manufacturing
(CAM). In CAD, graphics techniques are used to produce the drawings of certain parts of a machine from any viewing angle. In
CAM computer graphics techniques, one may display the manufacturing layout for a given part and trace the path taken by machine
tools for a given manufacturing process.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
4/24
8/21/2014
b.
Electronic Design
c.
Mechanical Design
d.
e.
Aerospace industry
f.
Medical Technology
g.
Cartography
h.
FORTRAN
b.
BASIC
c.
PASCAL
d.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
5/24
8/21/2014
Positioning
b.
Constraints
c.
Grids
d.
Gravity Field
e.
f.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
6/24
8/21/2014
35. If we use 3 bits for primary colors how many different colors are possible?
Ans.
8 colors are possible.
36. How many different choices are possible if we use 24 bits per pixel?
Ans.
16.7 million (224) colors.
FAQ
37. Some portable computers have high quality, evenly colored, perfectly flat displays. Are these LCD displays?
Ans:
These could be flat panel displays called Gas Plasma displays, which use neon bulbs.
38. What is SVG?
Ans:
Scalable Vector Graphics (SVG)is an XML based language for describing 2D vector graphics. It is being viewed as the standard for
describing vector graphics on the web in the future. However, currently many browsers do not support it.
39. Should the resolution of an image be changed as per the monitor resolution?
Ans:
When you create images you can set their resolution. The resolution of an image should ideally be between 72 and 96 ppi.
However, the exact value should be decided based on the monitor resolution. For example, for a 14 inches monitor with 800 X 600
resolution an image resolution of 76-78 is acceptable. However, for a 21 inches monitor with 1280 X 960 resolution, an image
resolution of around 96 is acceptable.
40. What is an appropriate refresh rate, when multiple refresh rates are available for a given resolution?
Ans:
The most appropriate refresh rate is considered to be 72 and 85 Hz.
----------------------------------------------------------------------------------------------------------Solutions to Chapter Three Questions
41. Compare the features of text and graphics mode?
Ans.
The following table compares the text and graphics modes:
Text mode
You can only handle text.
You can display in 16 colors on a
color monitor.
Text mode display is in two forms,
25 rows of 40 columns or 25 rows of
80 columns.
Graphics mode
You can display, capture, and animate
figures.
You can display various colors.
The resolution of the graphics mode
depends on the adapter.
42. With the help of an illustration, explain how initgraph() function works.
Ans.
The initgraph() function is used to initialize the graphics system to load appropriate graphics drive and video mode used by the
graphics functions. The syntax of this function is:
initgraph(int *driver, int *mode, char *path)
As its parameters, you must specify the graphics mode such as EGA, or VGA (depends on the graphics adapter being used), the
graphics driver (a program that interfaced between the hardware and your C program), and path of the graphics driver.
For example, to initialize graphics mode in CGA high resolution mode:
int gdriver = 1, gmode=4;
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
For example, to select the best driver and mode possible on a computer:
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
43. Use graphics function to draw concentric circles?
Ans.
#include<conio.h>
#include<graphics.h>
# include<stdio.h>
main() {
int gdriver = DETECT, gmode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
circle(100,100,90);
circle(100,100,50);
circle(100,100,30);
getch();
restorecrtmode();
}
Inform the students that the path d:\\tc\\bgi should be changed according to the machine settings. The code given here has been
tested on Turbo C 3.0.
44. Develop a C program to draw a structure of a fish and give animation.
Ans.
#include<graphics.h>
#include<stdio.h>
#include<stdlib.h>
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
7/24
8/21/2014
45. Develop a C program to draw a car shape and move the car using animation functions.
Ans.
#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
void car_wheel(int x,int y) {
setcolor(WHITE);
setfillstyle(SOLID_FILL,WHITE);
circle(x,y,10);
floodfill(x,y,WHITE);
circle(x,y,25);
}
void car_body() {
car_wheel(50,200);
car_wheel(200,200);
setcolor(RED);
line(25,200,0,210);
line(40,160,70,130);
bar(105,110,125,130);
line(0,160,40,160);
line(70,130,170,130);
line(170,130,200,160);
line(175,200,75,200);
line(200,160,260,160);
line(260,160,260,200);
line(260,200,225,200);
arc(50,200,0,180,25);
arc(200,200,0,180,25);
setfillstyle(SOLID_FILL,RED);
floodfill(150,170,RED);
}
void main() {
int gdriver = DETECT,gmode;
int i;
void *buff;
initgraph(&gdriver,&gmode,"e:\\tc\\bgi ");
car_body();
buff=malloc(imagesize(0,100,270,230));
getimage(0,100,270,230,buff);
putimage(0,100,buff,XOR_PUT);
i=0;
while(!kbhit()) {
if(i>500) i=0;
putimage(i,100,buff,OR_PUT);
delay(75);
putimage(i,100,buff,XOR_PUT);
putimage(i+5,100,buff,OR_PUT);
delay(75);
putimage(i+5,100,buff,XOR_PUT);
i =i+10
}
closegraph();
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
8/24
8/21/2014
Value
0
1
2
3
4
5
6
7
8
9
Description
Background color fill
Solid fill
------/////
///// (thick lines)
\\\\ (thick lines)
\\\\
Hatch fill (light)
Cross hatch fill (heavy)
Interleaving line fill
10
11
12
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
9/24
8/21/2014
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
10/24
8/21/2014
63. Explain how moving images are recorded on the hard disk.
Ans.
Moving images can be captured or copied on the hard disk with the help of a capture board.
Digital cameras RF or audio and video ports are connected to the corresponding RF of Audio video ports available in the capture
board. With the help of any Video studio software live images can be captured and stored on the hard disk.
64. Explain how sound helps in multimedia. What are the major types of sound files?
Ans.
Sound in multimedia can include speech, special effect sounds, and music. Sound is an essential component of a multimedia
production, such as video or animation, and presentations. It helps to make a multimedia application, entertaining, easy to
understand, and more presentable. For example, a presentation used for computer-based training can be more effective for
students, if the text is also read out as it is displayed.
The major types of sound file formats include Wave files and MIDI files.
65. What is sampling?
Ans.
The process of transfer of information from analog to digital is called sampling.
66. 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:
n Object animation: Is the moment of unchanged text and object around the screen
n Cell animation/Frame animation: Is made of different frames on screen where they are rapidly displayed to simulate motion.
67. Explain the meaning of the following terms: Morphing, Rendering, Wrapping.
Ans.
n 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.
n Rendering: The process of converting your designed objects with texturing and animation into an image or a series of images is
called rendering.
n 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.
68. What is the meaning of file format?
Ans.
The method by which 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 the file. Several different types of file formats are used by various kinds of software. For example: the
GIF file format used for Web page images is a standard format that can be opened by any program that supports that standard
format.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
11/24
8/21/2014
CPU
Mouse
Keyboard
Microphone
CD drive and disc
Speaker
Digital camera
Joystick
Scanner
Printer
Web camera
FAQ
72. What is a decibel?
Ans:
Decibel is a relative measure of the loudness/intensity of sound. It is actually measured as a ratio. A sound of 0dB is hardly audible
to the human ear. Hearing a sound above 80-85 dB can be painful and damaging for the human ear.
73. Can you attach your home stereo speakers directly to your computer for better sound quality?
Ans:
The speakers are powered by the sound card and essentially the quality of sound produced by them would depend on the sound
card itself. It is not advisable to attach your home stereo speakers to your computer because the quality of sound may still be bad.
This is because the power that these speakers need is much more than what the sound card's amplifier can provide. Moreover,
home stereo speakers do have magnetic shield protection and can damage your monitor or data in disks such as hard disk or
floppy.
74. Do scanner characteristics such as bit depth also apply to digital cameras?
Ans:Yes, in most cases it does apply because they mostly work on similar principles.
75. What is an audio codec?
Ans: A codec is software that implements a compression/decompression technique. It is used for compressing/decompressing
audio data to a file format or a streaming audio format. Specific audio -codecs act as interfaces to audio players such as Winamp,
and Windows Media players. Like audio codecs, video codecs are used to compress/decompress video. To see a list of codecs,
visit ttp://en.wikipedia.org/wiki/List_of_codecs#Video_codecs. To view the list of codecs installed on your system, open the Control
Panel and select Sound and Multimedia (or Sound in some systems). The Sound and Multimedia Properties dialog box opens.
Navigate to the Hardware tab and select Audio Codecs in the list. Next, click the Properties button, a dialog box showing the
codecs installed will open.
-----------------------------------------------------------------------------------------------------------Solutions to Chapter Five Questions
76. Fill in the blanks:
a. Computer Graphics can be classified into _____________ and _______________.
Ans.
Bitmap
Images
b. A Photoshop file can contain vector & raster data.
Ans.
True
c. __________ is defined as the number of pixel along the height & width of bitmap.
Ans.
Resolution
d. _____________ Method is used to assign color values to any new pixel, at the time of re-sampling.
Ans.
Interpolation
e. Vectors graphics are made of ____ and ______ defined by mathematical objects, which are called vectors.
Ans.
Line
Curves
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
12/24
8/21/2014
84. 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.
To print a complete image, select File --> Print from the main menu (or press Ctrl + P). The Print dialog box opens up as shown in
the following figure:
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
13/24
8/21/2014
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.
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.
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.
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. The Page Setup dialog box opens as shown in the following figure:
You can select the checkboxes if you want to include the corresponding options in the printed image:
n 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.
n Calibration Bars: Select this checkbox to print the calibration and color bars for your image. A calibration bar is a row of 11 gray
squares of different values. A color bar is a row of 11 colors. These bars can be helpful when trying to calibrate to a specific printer.
This option is available only for a PostScript printer.
n 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.
n 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.
n Center Crop Marks: Select this checkbox to view the exact center of the image defined by two crossed lines.
n 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.
n 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.
n Emulsion Down: Select this checkbox to print the image as a horizontal mirror image of the original image.
n 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.
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.
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
14/24
8/21/2014
FAQ
85. Why are options under the Filter menu grayed or not available sometimes?
Ans:
The most common reason for this, assuming that an image is open, is that the Color mode of the image is not supported by the
Filter commands. For examples, filters cannot be applied to Index images.
86. Can you open a Photoshop 6.0 file in Photoshop CS?
Ans:
Yes, a Photoshop 6.0 file can be opened in Photoshop CS. However, the new features of Photoshop CS may not be available to
that file. In addition, the file may not appear exactly as created in Photoshop 6.0.
87. Can you apply a gradient on an existing image?
Ans:
Yes, a gradient on an existing image can be applied using Quick Masking. To do this, open the image and copy the area (or the
whole image) to which you want to apply a gradient. Now open a new image and click the Edit in Quick Mask Mode button in the
toolbox. Next, select the Gradient tool and apply a gradient in the new image. Click the Edit in Standard Mode button. A selection
will be formed on the new image. Select Edit>Paste Into from the main menu. The image opened first will be pasted in the selection
and a gradient will be applied to it.
88. Can you delete the path created as an outline of an illustration using the Pen tool?
Ans:
Yes, the path created as an outline of an illustration using the Pen tool can be deleted. To do this, open the Paths palate, rightclick Work Path, and select Delete Path from the shortcut menu.
89. An image has been created using multiple layers. Can you merge all layers into one layer before saving the image?
Ans:
Yes, it is possible to merge all layers by selecting Layer>Flatten Image from the main menu.
-----------------------------------------------------------------------------------------------------------9 0 . Wh a t i s th e n e e d fo r co m p u te r g ra p h i cs?
Ans. Graphical communication is an old and more popular method of exchanging information than verbal communication and is more
convenient when computers are utilized for this purpose.
As the volume of information increases, problem of storage arises. Also, in the 21st century people do not have time to read huge number
of pages. This problem was solved by computer graphics. This can be clearly understood with the help of an example where we want to
present the performance of a factory since 1980. For this, we require a number of pages to render this large volume of information related
with financial, numerical and statistical information. It will take a lot of time to analyze such a long report. We can easily represent this data
in a pictorial form thus making it simple to understand. Pictures can represent a huge database in the form of bar charts, pie charts, and so
on.
Two other prominent applications of graphics are in the field of Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM).
In CAD, graphics techniques are used to produce the drawings of certain parts of a machine from any viewing angle. In CAM computer
graphics techniques, one may display the manufacturing layout for a given part and trace the path taken by machine tools for a given
manufacturing process.
9 1 . D e fi n e co m p u te r g ra p h i cs a n d In te ra cti ve co m p u te r g ra p h i cs?
Ans. Computer graphics can be defined as the use of computers to define, store, manipulate, interrogate, and present pictorial output of the
data.
Interactive computer graphics refers to devices and systems that facilitate the man-machine graphic communication.
9 2 . Bri e fl y, n a rra te th e h i sto ry o f g ra p h i cs h a rd w a re te ch n o l o g y?
Ans. In early days, the high cost of the hardware for computer graphics remained the obstacle, which prevented their widespread use.
Computers have been getting progressively more inexpensive and it has become a household article these days. The microelectronics
revolution and the subsequent reduction in the price of the digital hardware have completely changed the situation. Due to this price
reduction, it is now realistic to expect that all computers with graphic display hardware capability will be making extensive use of computer
graphics.
The announcement of the IBM personal computer using 16-bit Intel 8088 microprocessor on August 12, 1981, can be regarded as a
historic event, which had a profound effect in the world of computers. These computers significantly improved the state of display
technology in the world of computers.
TFhe next major change in PC display technology was announced by Apple Company in 1984, when it introduced the Macintosh PC. It was
the first PC that did not include a text-based display but provided only a graphic display. The application programs developed for the
Macintosh advocated WYSIWYG (What You See Is What You Get) style of interface. This concept has become a basic requirement in the
area of desktop publishing (DTP). The PowerPC's from IBM, Apple, and other vendors created a new standard for DTP computers. With
such a development, computer graphics and multimedia has become a necessity for all types of users.
9 3 . H o w to m a ke g ra p h i cs p ro ce ssi n g fa ste r?
Ans. Video/Graphic processing can be made faster in two ways: by using a graphic co-processor and a graphic accelerator. The graphic coprocessor boosts video performance by assuming tasks normally handled by the CPU. An accelerator takes control of graphic task, which
are otherwise performed by the CPU. However, an accelerator is not programmable. It is a functioned processor, which caries out specific
tasks hard-coded into the chip.
9 4 . Wh a t i s g ra p h i cs p ro ce sso r? Wh y i t i s n e e d e d ?
Ans. Graphics processor helps in managing the screen faster with an equivalent software algorithm executed on the CPU. Through the use
of these processors certain amount of parallelism can be achieved for executing graphic commands. Several manufacturers of personal
computers use a proprietary graphics processor.
9 5 . N a m e so m e g ra p h i cs p ro ce sso rs.
Ans. Some graphics processors are:
n Intel 82786
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
15/24
8/21/2014
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
16/24
8/21/2014
n Mouse
n Tablet
n Joystick
n Digitizer
n Light pen
n Track ball
1 1 2 . Wh a t a re p o i n ti n g d e vi ce s? Gi ve e xa m p l e s.
Ans. A pointing device is a hardware peripheral that allows user to point to objects on the screen and perform operations on them, such as
selecting, clicking, moving, and dragging. Mouse is an example of pointing device.
1 1 3 . Exp l a i n th e w o rki n g p ri n ci p l e o f M o u se .
Ans. A mouse is a small handled box used to position the screen cursor. It has two wheels at right angles to each other. Each of these
wheels is connected to the shaft encode. For every incremental rotation of the wheel, an electrical signal is produced by the shaft encode.
As the device is moved on a flat surface, the movement is coded in the x and y directions by counting the number of pulses received from
the shaft encoder. These values are held in separate registers and the computer can sample them at a suitable rate. The device can,
therefore, be used for a moving cursor around the display screen.
1 1 4 . If w e u se 3 b i ts fo r p ri m a ry co l o rs h o w m a n y d i ffe re n t co l o rs a re p o ssi b l e ?
Ans. 8 colors are possible.
1 1 5 . Exp l a i n th e w o rki n g o f L i g h t p e n a l o n g w i th a d i a g ra m .
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.
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.
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.
1 1 6 . Co m p a re th e fe a tu re s o f te xt a n d g ra p h i cs m o d e ?
Ans. The following table compares the text and graphics modes:
Text mode
Graphics mode
1 1 7 . Wi th th e h e l p o f a n i l l u stra ti o n , e xp l a i n h o w
You can only handle text.
You can display, capture, and
i n i tg ra p h () fu n cti o n w o rks.
animate figures.
You can display in 16 colors
You can display various colors. Ans. The initgraph() function is used to initialize the graphics system
to load appropriate graphics drive and video mode used by the
on a color monitor.
graphics functions. The syntax of this function is:
Text mode display is in two
The resolution of the graphics
initgraph(int *driver, int *mode, char *path)
forms, 25 rows of 40
mode depends on the
As its parameters, you must specify the graphics mode such as EGA,
columns or 25 rows of 80
adapter.
or VGA (depends on the graphics adapter being used), the graphics
columns.
driver (a program that interfaced between the hardware and your C
program), and path of the graphics driver.
For example, to initialize graphics mode in CGA high resolution mode:
int gdriver = 1, gmode=4;
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
For example, to select the best driver and mode possible on a computer:
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
1 1 8 . U se g ra p h i cs fu n cti o n to d ra w co n ce n tri c ci rcl e s?
Ans. #include<conio.h>
#include<graphics.h>
# include<stdio.h>
main() {
int gdriver = DETECT, gmode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
circle(100,100,90);
circle(100,100,50);
circle(100,100,30);
getch();
restorecrtmode();
}
Inform the students that the path d:\\tc\\bgi should be changed according to the machine settings. The code given here has been tested on
Turbo C 3.0.
1 1 9 . D e ve l o p a C p ro g ra m to d ra w a stru ctu re o f a fi sh a n d g i ve a n i m a ti o n .
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);
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
17/24
8/21/2014
1 2 1 . D e ve l o p a C p ro g ra m to d ra w a ca r sh a p e a n d m o ve th e ca r u si n g a n i m a ti o n fu n cti o n s.
Ans.
#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
void car_wheel(int x,int y) {
setcolor(WHITE);
setfillstyle(SOLID_FILL,WHITE);
circle(x,y,10);
floodfill(x,y,WHITE);
circle(x,y,25);
}
void car_body() {
car_wheel(50,200);
car_wheel(200,200);
setcolor(RED);
line(25,200,0,210);
line(40,160,70,130);
bar(105,110,125,130);
line(0,160,40,160);
line(70,130,170,130);
line(170,130,200,160);
line(175,200,75,200);
line(200,160,260,160);
line(260,160,260,200);
line(260,200,225,200);
arc(50,200,0,180,25);
arc(200,200,0,180,25);
setfillstyle(SOLID_FILL,RED);
floodfill(150,170,RED);
}
void main() {
int gdriver = DETECT,gmode;
int i;
void *buff;
initgraph(&gdriver,&gmode,"e:\\tc\\bgi ");
car_body();
buff=malloc(imagesize(0,100,270,230));
getimage(0,100,270,230,buff);
putimage(0,100,buff,XOR_PUT);
i=0;
while(!kbhit()) {
if(i>500) i=0;
putimage(i,100,buff,OR_PUT);
delay(75);
putimage(i,100,buff,XOR_PUT);
putimage(i+5,100,buff,OR_PUT);
delay(75);
putimage(i+5,100,buff,XOR_PUT);
i =i+10 }
closegraph();
restorecrtmode();
getch();
}
Inform the students that the path d:\\tc\\bgi should be changed according to the machine settings. The code given here has been tested on
Turbo C 3.0.
1 2 2 . L i st th e d i ffe re n t g ra p h i cs fu n cti o n s a l o n g w i th e xa m p l e .
Ans.
C supports various graphics functions, such as:
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
18/24
8/21/2014
n bar(int x1, int y1, int x2, int y2): This draws a filled rectangle with diagonal from (x1, y1) to (x2,y2)
bar(10,25,100,75)
n circle(int x, int y, int r): This draws a circle with center at (x, y) and radius of r.
Example: circle(50,50,10)
n 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(100,100,0,90,20) draws the first quarter of the circle, arc with center (100,100) and radius 20.
1 2 3 . Exp l a i n th e u se o f g e ti m a g e () a n d p u ti m a g e () w i th e xa m p l e s?
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().
For example, to capture a rectangle whose diagonal is defined by (10, 50) and (50, 125), you can use the getimage() function as:
int area = imagesize(10,50,50,125);
unsigned char * buf = malloc(arear);
getimage(10,50,50,125, 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:
n
n
n
n
Graphics
Sound
Animation
Video
1 2 6 . Wi th i l l u stra ti o n b ri e fl y n a rra te th e o ri g i n a n d d e ve l o p m e n t o f m u l ti m e d i a te ch n o l o g y?
Ans. Multimedia is an effective medium to express information in a more attractive way. It makes use of text, pictures, audio, animation,
and video. It was started more then 25 years ago. However, it only became popular with the advent of desktop computers.
Audio was the first multimedia data incorporated into desktop computing, with the introduction of soundboards built around the tonesynthesis chips. In addition, video could also be captured, displayed and stored on a computer disk with the help of digital overlay and
capture boards installed on any ordinary computer.
However, the use of audio and video on desktop computers was limited due to their large size and high computing power requirements.
These limitations were overcome through the introduction of compression/decompression engines for reducing the sizes of these files. As
the demand increased for multi standard compression on the same system, several manufacturers introduced a new generation of
compression chips that supported software programming. These chips contained hardware engines for operations requiring high
computing power and also integrated processors that can be programmed to control data flow within the chip. Such technologies made
audio and video boards capable of transferring data to computer systems efficiently, in some cases, in real time.
The advent of RISC technology, parallel processing architecture, high speed hard disk, optical disk drives and a variety of interfacing devices
made it possible to design computer systems that have multimedia features as standards.
The latest breakthrough in the field of multimedia was the advent of the Internet and other high-speed networking technologies. These have
presented new opportunities such as video conferencing, medical imaging, and scientific visualization.
1 2 7 . Gi ve d i ffe re n t a p p l i ca ti o n s fo r m u l ti m e d i a ?
Ans. Multimedia finds application in the field of entrainment, marketing, broadcasting, advertising, publication, telecommunications,
training, collaborative engineering, and design manufacturing process because of its user-friendly operation.
1 2 8 . Wh a t a re so u n d ca rd s?
Ans. Sound card is the hardware for sound input and output. It is used with speakers, headphones, and microphones to record and play
sound. Some sound cards also include MIDI, .Wav, and MP3.
1 2 9 . H o w d o g ra p h i cs h e l p i n d i g i ta l i m a g i n g ?
Ans. In digital imaging, film less camera may capture an image electronically, or an image may be traditionally created and scanned, or it
may be created directly on the computer using graphics packages. The last option is where graphics help digital imaging. Direct graphics
can be created on a computer in sophisticated, feature-rich packages such as Photoshop. These graphics editing packages allow creation
of realistic digital images for use in multimedia applications.
In addition, graphics packages also help to edit digital images, which have been scanned or captured in digital cameras.
1 3 0 . Wh a t a re th e d i ffe re n t ch o i ce s fo r d i g i ta l i m a g i n g ?
Ans. There are three different choices for digital imaging:
n A film less camera may capture an image electronically
n The image may be created within the computer using various paints and illustration programs
n The image may be created traditionally and than scanned into digital form
1 3 1 . Wh a t a re th e d i ffe re n t ki n d s o f fi l m l e ss ca m e ra s a va i l a b l e i n th e m a rke t?
Ans. There are five different types of film less cameras suitable for digital imaging available in the market:
n Video floppy disk Cameras
n
n
n
n
Digital Cameras
PCMCIA Cameras
Filmless Camera backs
Still Video Cameras
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
19/24
8/21/2014
n R e n d e ri n g : The process of converting your designed objects with texturing and animation into an image or a series of images is called
rendering.
n Wra p p i n g : 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.
1 3 7 . Wh a t i s th e m e a n i n g o f fi l e fo rm a t?
Ans.
The method by which 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 the file. Several different types of file formats are used by various kinds of software. For example: the GIF file format used
for Web page images is a standard format that can be opened by any program that supports that standard format.
1 3 8 . Wh y d o w e u se a sca n n e r? N a m e th e d i ffe re n t typ e s o f sca n n e rs?
Ans. Scanner is a peripheral device, which captures real object or image and saves it in a digital file as a graphic. Different types of
scanner are as follows:
n Flatbed or Sheet-fed Scanner
n Film Scanner
n Handheld Scanner
n 3 D Scanner
1 3 9 . Wh a t a re th e co m p o n e n ts o f a m u l ti m e d i a syste m ?
Ans. The components of a multimedia system are as follows:
n Monitor
n
n
n
n
n
n
n
n
n
n
n
CPU
Mouse
Keyboard
Microphone
CD drive and disc
Speaker
Digital camera
Joystick
Scanner
Printer
Web camera
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
20/24
8/21/2014
1 4 9 . Gi ve th e ste p s to u se th e i m a g e p ri n ti n g u ti l i ty o f Ph o to sh o p ?
Ans. In Photoshop, you can print a complete image, selected area of an image, or even one or more layers.
To print a complete image, select File --> Print from the main menu (or press Ctrl + P). The Print dialog box opens up as shown in the
following figure:
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.
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.
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.
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. The Page Setup dialog box opens as shown in the following figure:
You can select the checkboxes if you want to include the corresponding options in the printed image:
n
Ca p ti o n : 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.
n
Ca l i b ra ti o n Ba rs: Select this checkbox to print the calibration and color bars for your image. A calibration bar is a row of 11 gray
squares of different values. A color bar is a row of 11 colors. These bars can be helpful when trying to calibrate to a specific printer. This
option is available only for a PostScript printer.
n
R e g i stra ti o n M a rks: 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.
Co rn e r Cro p M a rks: Select this checkbox to view horizontal and vertical lines around the corners of the image, defining where the
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
21/24
8/21/2014
Ce n te r Cro p M a rks: Select this checkbox to view the exact center of the image defined by two crossed lines.
L a b e l s: Select this checkbox to print the file name next to the image. You can also print the name of the appropriate color channel if
N e g a ti ve : Select this checkbox to print an image that appears like a negative of the original image. With this option selected, the
n
n
Em u l si o n D o w n : Select this checkbox to print the image as a horizontal mirror image of the original image.
In te rp o l a ti o n : Interpolation refers to a printer's ability to resample an image as they print it to improve its resolution. This option is
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
22/24
8/21/2014
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
23/24
8/21/2014
No comments:
Post a Comment
Enter your comment...
Comment as:
Publish
Google Account
Preview
Newer Post
Home
Older Post
Subscribe To
Posts
Comments
Satyendra Sharma
Add to circles
10 have me in circles
Labels
4th sem (1) 6 Sem KU Lab Practical (1) Assignments
Sem C Elective . (1) ibps (2) Icons Pack (2) Notification (1)
PRACTICAL
Bsc.IT -51 (1) solved Answers Bsc.IT -52 (1) solved Answers Bsc.IT -53 (1) solved Answers Bsc.IT -54 (1) solved Answers Bsc.IT -61 (1) solved Answers Bsc.IT -62 (1) solved Answers Bsc.IT -63 (1) solved Answers Bsc.IT -64 (1)
http://sslifehacker.blogspot.in/2013/05/graphics-and-multimedia-subject-code.html
24/24